nenupy.io.tf_utils.apply_dreambeam_corrections

nenupy.io.tf_utils.apply_dreambeam_corrections(time_unix, frequency_hz, data, dt_sec, time_step_sec, n_channels, skycoord, parallactic=True)[source]

Correct for polarization systematics using DreamBeam. The module DreamBeam is required for this function. It generates the Jones matrices \(\mathbf{J}\) affecting the light received by NenuFAR’s \(X\) and \(Y\) dipoles, taking into account projection, parallactic angle and beam effects.

\[\begin{split}\mathbf{d}_{\rm corr}(t, \nu) = \mathbf{J}(t, \nu) \begin{pmatrix} X(t, \nu)\overline{X}(t, \nu) & X(t, \nu)\overline{Y}(t, \nu)\\ Y(t, \nu)\overline{X}(t, \nu) & Y(t, \nu)\overline{Y}(t, \nu) \end{pmatrix} \overline{\mathbf{J}^\top}(t, \nu)\end{split}\]
Parameters:
  • time_unix (ndarray) – Time axis of size \(n_t\) corresponding to the first dimension of data in unix format.

  • frequency_hz (ndarray) – Frequency axis of size \(n_{\nu}\) corresponding to the second dimension of data in Hz.

  • data (ndarray) – Data to be corrected, shaped as \((n_t, n_{\nu}, 2, 2)\), where the two by two matrices are \(((X\overline{X}\ X\overline{Y}), (Y\overline{X}\ Y\overline{Y}))\).

  • dt_sec (float) – Time resolution of the data in seconds.

  • time_step_sec (float) – Time resolution at which the Jones matrices are computed. Unless required, it is typiclaly sufficient to request a solution every few seconds.

  • n_channels (int) – Number of channnels per subband. It is expected that \(n_{\nu} = n_c \times n_{\rm sb}\).

  • skycoord (SkyCoord) – Sky coordinates of the target tracked during the observation.

  • parallactic (bool, optional) – If set to True, the Jones matrices take into account parallactic angle rotation effects (see for example correct_parallactic()), by default True

Returns:

The corrected data \(\mathbf{d}_{\rm corr}(t, \nu)\) shaped as as \((n_t, n_{\nu}, 2, 2)\).

Return type:

ndarray

Raises:

ValueError – If time_unix and/or frequency_hz do not match first and second dimensions of data. Or if frequency_hz’s size is not divisible by n_channels.