WhiteningFilter

class sofia_redux.scan.filters.whitening_filter.WhiteningFilter(integration=None, data=None)[source]

Bases: AdaptiveFilter

Initialize an integration whitening filter.

Parameters:
integrationIntegration, optional
datanumpy.ndarray (float), optional

An array of shape (nt, n_channels) where nt is the nearest power of 2 integer above the number of integration frames. i.e., if n_frames=5, nt=8, or if n_frames=13, nt=16. If not provided will be set to frame_data * frame_relative_weight.

Attributes Summary

channel_dependent_attributes

Return attributes that are dependent on the parent channels.

Methods Summary

calc_mean_amplitudes([channels])

Calculates the mean amplitudes in the window of a spectrum.

dft_filter([channels])

Return the filter rejection using a discrete FFT.

get_config_name()

Return the configuration name.

get_id()

Return the filter ID.

set_size(n)

Set the size of the profiles.

update_config()

Determine whether the filter is configuration and if it's pedantic.

update_profile([channels])

Update the profile for given channel(s).

whiten_profile([channels])

Create the channel filtering profiles for whitening.

Attributes Documentation

channel_dependent_attributes

Return attributes that are dependent on the parent channels.

This is required during a slim operation (reducing number of channels).

Returns:
set (str)

Methods Documentation

calc_mean_amplitudes(channels=None)[source]

Calculates the mean amplitudes in the window of a spectrum.

The amplitude of the FFT spectrum is calculated as the mean value within a given window (usually 1). The weight of the mean operation will also be stored in the amplitude_weights attribute. These are used later to calculate the channel profiles.

Parameters:
channelsChannelGroup, optional

The channels to update. By default, will use all filtering channels.

Returns:
None
dft_filter(channels=None)[source]

Return the filter rejection using a discrete FFT.

UNSUPPORTED FOR THE WHITENING FILTER.

Parameters:
channelsChannelGroup, optional

The channel group for which the filtering applied. By default, set to the filtering channels.

Returns:
None
get_config_name()[source]

Return the configuration name.

Returns:
config_namestr
get_id()[source]

Return the filter ID.

Returns:
filter_idstr
set_size(n)[source]

Set the size of the profiles.

Resampling will occur if the size of the profile changes.

Parameters:
nfloat or int

The new size.

Returns:
None
update_config()[source]

Determine whether the filter is configuration and if it’s pedantic.

Loads additional settings for the whitening filter including size of the profiles and assigning noise bins.

Returns:
None
update_profile(channels=None)[source]

Update the profile for given channel(s).

Parameters:
channelsChannelGroup, optional

The channels to update. By default, will use all filtering channels.

Returns:
None
whiten_profile(channels=None)[source]

Create the channel filtering profiles for whitening.

Will also set channel 1/f noise statistics.

Parameters:
channelsChannelGroup, optional

The channels to update. By default, will use all filtering channels.

Returns:
None