NuRadioReco.utilities.bandpass_filter module

NuRadioReco.utilities.bandpass_filter.get_filter_response(frequencies, passband, filter_type, order, rp=None, roll_width=None)[source]

Convenience function to obtain a bandpass filter response

Parameters:
frequencies: array of floats

the frequencies the filter is requested for

passband: list

passband[0]: lower boundary of filter, passband[1]: upper boundary of filter

filter_type: string or dict
  • ‘rectangular’: perfect straight line filter

  • ‘butter’: butterworth filter from scipy

  • ‘butterabs’: absolute of butterworth filter from scipy

  • ‘gaussian_tapered’ : a rectangular bandpass filter convolved with a Gaussian

or any filter that is implemented in NuRadioReco.detector.filterresponse. In this case the passband parameter is ignored

order: int

for a butterworth filter: specifies the order of the filter

rp: float

The maximum ripple allowed below unity gain in the passband. Specified in decibels, as a positive number. (Relevant for chebyshev filter)

roll_widthfloat, default=None

Determines the sigma of the Gaussian to be used in the convolution of the rectangular filter. (Relevant for the Gaussian tapered filter)

Returns:
f: array of floats

The bandpass filter response. Has the same shape as frequencies.