dran.calibration package#

Subpackages#

Submodules#

dran.calibration.calibrate module#

dran.calibration.calibrate.calibrate_pointing_corrected_ta(hps_ta, hps_err, hpn_ta, hpn_err, on_ta, on_err, log, row)[source]#
Parameters:
Return type:

PointingGainResult

dran.calibration.errors module#

exception dran.calibration.errors.CalibrationError[source]#

Bases: Exception

Base exception for calibration failures.

exception dran.calibration.errors.MissingResourceError[source]#

Bases: CalibrationError

Raised when a required packaged resource is missing.

exception dran.calibration.errors.UnsupportedFrontendError[source]#

Bases: CalibrationError

Raised when a frontend/backend type is not supported.

exception dran.calibration.errors.EphemerisDateOutOfRangeError[source]#

Bases: CalibrationError

Raised when an ephemeris table does not cover the requested date.

exception dran.calibration.errors.InvalidObservationDateError[source]#

Bases: CalibrationError

Raised when an observation date string is invalid or cannot be parsed.

dran.calibration.pointing module#

class dran.calibration.pointing.PointingGainResult(pc: float | None, ta_corr: float | None, ta_corr_err: float | None, reason: str)[source]#

Bases: object

Parameters:
pc: float | None#
ta_corr: float | None#
ta_corr_err: float | None#
reason: str#
dran.calibration.pointing.calc_pointing_correction(hps_ta, hps_err, hpn_ta, hpn_err, on_ta, on_err, data, missing_side)[source]#

Compute pointing correction factor and corrected antenna temperature with propagated uncertainty. Uses safe log transforms of scan peak temperatures to derive a pointing correction based on which beam side is missing, then applies the correction to on-source temperature and propagates errors via partial derivatives.

dran.calibration.pointing.calc_tcorr(Ta, pc, data)[source]#

Calculate the antenna temperature correction for high frequencies.

Parameters:
  • temperature (Ta - the on scan antenna)

  • correction (pc - the pointing)

  • parameters (data - the dictionary containing all the drift scan)

Returns:

corrTa - the corrected antenna temperature

dran.calibration.pointing.pointing_gain_from_halfpower(hpn_ta, hpn_err, on_ta, on_err, hps_ta, hps_err, data, log, missing_side)[source]#

Compute multiplicative pointing gain factor pc and 1-sigma uncertainty pc_err.

missing_side:

None -> both half-power points available (south and north) “n” -> missing north half-power, use (HPS, ON) form in caller if needed “s” -> missing south half-power, use (ON, HPN) form in caller if needed

This function expects the two temperatures supplied belong to the two half-power points used in the same equation.

Parameters:
Return type:

PointingGainResult

dran.calibration.row_accessors module#

dran.calibration.row_accessors.get_float(row, key, default=nan)[source]#

Read a float from a mapping. Returns default if the key is missing or invalid.

Parameters:
Return type:

float

Module contents#