nenupy.io.tf_utils.correct_bandpass
- nenupy.io.tf_utils.correct_bandpass(data, n_channels, lna_filter=None, frequency=None)[source]
Correct the Polyphase-filter band-pass response at each sub-band. This methods computes the bandpass theoretical response of sub-bands made of
n_channelsand multiply thedataby this reponse.- Parameters:
data (
ndarray) – The 4D data array (a DaskArrayis also accepted). The first two dimensions are assumed to be corresponding to time and frequencies respectively. The two others are the Jones matrices (2, 2).n_channels (
int`) – The number of channels per subband. The second dimension ofdatashould equal to the product of the number of channels with the number of subbands.lna_filter (
int, optional) – NenuFAR LNA filter at which the data were acquired. Its value must be 0, 1, 2 or 3 (corresponding to 10, 15, 20, or 25 MHz high-pass filter respectively). The bandpass response is modified to account for the selected filter (withbandpass_correction_coefficients()). By default,None(i.e. the bandpass response is taken as the output ofget_bandpass()).frequency (
Quantity, optional) – The frequency axis (should be of the same size thandata2nd dimension). Iflna_filteris set toNone, this argument has no effect. By default,None.
- Returns:
Bandpass response corrected data.
- Return type:
- Raises:
ValueError – Raised if the shape of data does not match the number of channels.
See also