ska_sdp_instrumental_calibration.xarray_processors.delay module

ska_sdp_instrumental_calibration.xarray_processors.delay.calculate_delay(gaintable, oversample)[source]

Applies the delay to the given gaintable

Parameters:
  • gaintable (xr.Dataset) -- Gaintable

  • oversample (int) -- Oversample rate required for the delay

Returns:

delay

Return type:

xr.DataSet

ska_sdp_instrumental_calibration.xarray_processors.delay.apply_delay(gaintable, delay)[source]

Applies the delay to the given gaintable

Parameters:
  • gaintable (xr.Dataset) -- Gaintable

  • oversample (int) -- Oversample rate required for the delay

Returns:

Gaintable with updated gains

Return type:

xr.Dataset

ska_sdp_instrumental_calibration.xarray_processors.delay.update_delay(gaintable, _offset, delay, pol)[source]

Updates the delay to the gains

Parameters:
  • gaintable (xr.Dataset) -- Gaintable

  • _offset (np.array) -- Calculated offset per station

  • delay (np.array) -- Calculated delays per station

  • pol (int) -- Polarisations of the gains

Returns:

Updated delay and offset.

Return type:

np.array

ska_sdp_instrumental_calibration.xarray_processors.delay.coarse_delay(gains, oversample)[source]

Calculates the coarse delay

Parameters:
  • frequency (xarray) -- Frequency of the gains

  • gains (xarray) -- Gains from previous calibration step

  • oversample (int) -- Oversample rate

Returns:

Array of coarse delays for all stations

Return type:

np.array

ska_sdp_instrumental_calibration.xarray_processors.delay.calculate_gain_rot(gain, delay, offset, freq)[source]

Calculates gain rotation

Parameters:
  • gain (xarray) -- Gains

  • delay (np.array) -- Delays

  • offset (np.array) -- Offset

  • freq (xarray) -- Frequency

Returns:

Array of calculated gain rotation

Return type:

np.array