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_channels and multiply the data by this reponse.

Parameters:
  • data (ndarray) – The 4D data array (a Dask Array is 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 of data should 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 (with bandpass_correction_coefficients()). By default, None (i.e. the bandpass response is taken as the output of get_bandpass()).

  • frequency (Quantity, optional) – The frequency axis (should be of the same size than data 2nd dimension). If lna_filter is set to None, this argument has no effect. By default, None.

Returns:

Bandpass response corrected data.

Return type:

ndarray

Raises:

ValueError – Raised if the shape of data does not match the number of channels.

See also

get_bandpass()