maddg._residuals.calculate_residuals

maddg._residuals.calculate_residuals(sensors: SensorCollection, satellite: Satellite, sim_duration_days: float, t_start_mjd: float = 60759.218222610245) DataFrame | None[source]

Calculates the residuals.

Parameters:
  • sensors (madlib.SensorCollection) – Collection of Sensors

  • satellite (madlib.Satellite) – The Satellite object observed in the simulation

  • sim_duration_days (float) – Duration of the simulation (days)

  • t_start_mjd (float, optional) – Time (MJD) at the start of the simulation, by default astropy.time.Time.now().mjd

Returns:

pandas DataFrame of results (or None, if nobs == 0)

Return type:

pd.DataFrame | None

Raises:

MadlibException – Raised if nobs != nexpected… number of actual and expected observations were not the same, so residuals cannot be calculated. This is likely a random occurrence.