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 ofdatain unix format.frequency_hz (
ndarray) – Frequency axis of size \(n_{\nu}\) corresponding to the second dimension ofdatain 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 thedatain 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 toTrue, the Jones matrices take into account parallactic angle rotation effects (see for examplecorrect_parallactic()), by defaultTrue
- Returns:
The corrected data \(\mathbf{d}_{\rm corr}(t, \nu)\) shaped as as \((n_t, n_{\nu}, 2, 2)\).
- Return type:
- Raises:
ValueError – If
time_unixand/orfrequency_hzdo not match first and second dimensions ofdata. Or iffrequency_hz’s size is not divisible byn_channels.