FixedFilter

class sofia_redux.scan.filters.fixed_filter.FixedFilter(integration=None, data=None)[source]

Bases: Filter

Initializes a fixed filter.

The fixed filter has a fixed point response for each channel in an integration.

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

add_frame_parms([channels])

Add rejection parms to the frame parms.

get_config_name()

Return the configuration name.

get_id()

Return the filter ID.

get_mean_point_response([channels])

Return the channel mean point response of the filter.

get_point_response([channels])

Return the channel point responses for the filter.

post_filter_channels([channels])

Performs the post-filtering channels steps.

pre_filter()

Perform the pre-filtering steps.

pre_filter_channels([channels])

Performs the pre-filtering channels steps.

reset_point_response([channels])

Calculate and store the correct point response for the given channels.

response_at(fch)

Return the response at a given frequency channel(s).

set_integration(integration)

Set the filter integration.

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

add_frame_parms(channels=None)[source]

Add rejection parms to the frame parms.

Parameters:
channelsChannelGroup

The set of channels to filter. Defaults to the filter channels.

Returns:
None
abstract get_config_name()[source]

Return the configuration name.

Returns:
config_namestr
abstract get_id()[source]

Return the filter ID.

Returns:
filter_idstr
get_mean_point_response(channels=None)[source]

Return the channel mean point response of the filter.

Parameters:
channelsChannels or ChannelData

The set of channels for which to calculate the mean point response. Defaults to the filter channels.

Returns:
responsefloat
get_point_response(channels=None)[source]

Return the channel point responses for the filter.

Parameters:
channelsChannels or ChannelData, optional

Return the point response for a given set of channels. If not supplied, defaults to the filter channels.

Returns:
responsenumpy.ndarray (float)

An array of shape (channels.size,)

post_filter_channels(channels=None)[source]

Performs the post-filtering channels steps.

Parameters:
channelsChannelGroup

The set of channels to filter. Defaults to the filter channels.

The fixed filter adds the rejected sum to the channel and frame
dependents, sets the point response and multiplies the direct and
source filtering by the new calculated value. This reverses what
occurred in the pre-filtering step.
Returns:
None
pre_filter()[source]

Perform the pre-filtering steps.

During the pre-filtering steps, dependents are retrieved from the filter integration and cleared (subtracted from integration dependents, integration channels, and zeroed).

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

Performs the pre-filtering channels steps.

The fixed filter recalculates each channel point response to update the channel direct and source filtering by:

filtering /= point_response
Parameters:
channelsChannelGroup

The set of channels to filter. Defaults to the filter channels.

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

Calculate and store the correct point response for the given channels.

Parameters:
channelsChannelGroup

The set of channels for which to store the point response of the filter.

Returns:
None
abstract response_at(fch)[source]

Return the response at a given frequency channel(s).

Parameters:
fchint or numpy.ndarray (int or bool) or slice

The frequency channel or channels in question.

Returns:
responsenumpy.ndarray (float)
set_integration(integration)[source]

Set the filter integration.

Sets the padding of the FFT filter, the number of frequencies, the frequency spacing, and retrieves the channels from the integration if necessary.

Parameters:
integrationIntegration
Returns:
None