icecube.radcube.SpikeFilter module

class icecube.radcube.SpikeFilter.SpikeFilter(filename='')

Bases: object

Applies a filter to remove frequency-domain RFI spikes Spike filters are applied per-antenna-channel and must be tuned properly.

Parameters:

filename (str, optional) – Path to spike filter file

ApplyFilter(inputSpec, antkey, chkey, power=2)

Applies the spike filter to the passed in radio spectrum to remove RFI

Parameters:
  • inputSpec – A icecube.dataclasses.AntennaSpectrum object to be reweighted

  • antkey – The icecube.dataclasses.AntennaKey corresponding to which filter file to use to reweight the waveform

  • chkey – The channel key corresponding to which filter file to use to reweight the waveform

  • power – The number of times to apply the filter. Zero does nothing and it is recommended to use at least 1.

Returns:

A copy of the waveform with the filter applied.

GetFreqs()
GetGains(antkey, chkey)
HasKey(antkey, chkey)
LoadData(filename)

Loads up the ASCII spike filter file

Parameters:

filename – Location of the file with the spike filter information

SaveData(filename, freqs, gains)

Saves an ASCII file of the filters :param filename: Name of ASCII file to save to :param freqs: List of frequency values for the corresponding filter :param gains: Dict of the gain values. Keys should be (AntennaKey, ChannelKey). Entries should be array of gain values