KillFilter

class sofia_redux.scan.filters.kill_filter.KillFilter(integration=None, data=None)[source]

Bases: FixedFilter

Initializes a kill filter.

The kill filter fully rejects or allows a response at a given frequency.

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.

Methods Summary

auto_dft()

Determine whether to use a full or discrete FFT.

count_parms()

Return the total dependent count of the filter.

get_config_name()

Return the configuration name.

get_id()

Return the filter ID.

get_reject_mask()

Return the rejection mask for the kill filter.

kill(frequency_range)

Sets the kill response of

response_at(fch)

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

set_integration(integration)

Set the filter integration.

update_config()

Apply settings from the integration configuration.

Methods Documentation

auto_dft()[source]

Determine whether to use a full or discrete FFT.

The DFT assumes 51 ops per datum, per rejected frequency. The FFT assumes 2 * FFT (back and forth) with 31 ops in each loop, 9.5 ops per datum, 34.5 ops per datum rearrange. The type of transform is determined by the fewest operations.

This is surprisingly accurate.

Returns:
None
count_parms()[source]

Return the total dependent count of the filter.

Returns:
int
get_config_name()[source]

Return the configuration name.

Returns:
config_namestr
get_id()[source]

Return the filter ID.

Returns:
filter_idstr
get_reject_mask()[source]

Return the rejection mask for the kill filter.

Returns:
masknumpy.ndarray (bool)
kill(frequency_range)[source]

Sets the kill response of

Parameters:
frequency_rangeRange

The range of frequencies to kill.

Returns:
None
response_at(fch)[source]

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

Parameters:
fchint or numpy.ndarray (int)

The frequency channel or channels in question.

Returns:
responsefloat or numpy.ndarray (float)
set_integration(integration)[source]

Set the filter integration.

Parameters:
integrationIntegration
Returns:
None
update_config()[source]

Apply settings from the integration configuration.

Sets the rejection response for the kill filter between two frequencies specified in the configuration key “filter.kill.bands”. The configuration value should be of the form “f1:f2” where f1 and f2 are the start and end frequencies (in Hz). Multiple frequency rejection bands may be specified with a comma in the configuration:

filter.kill.bands = <f1>:<f2>,<f3>:<f4>

The above lines will reject frequencies between f1 and f2, and also between f3 and f4.

Returns:
None