DopplerIdeal#

class DopplerIdeal(name: str, instrument: Instrument, sigma: ArrayWUnits = None, state_definition: list = None, sequence_definition=None, meas_bias=None, antenna_name: str = None, doppler_transmit_frequency: ArrayWUnits = None, ground_station_2: GroundStation = None)#

Bases: Measurement

Generates ideal Doppler observables between an observer and a target.

This ideal model assumes no light-time, no media effects, no antenna offset, and no spacecraft spin.

The two-way Doppler observable is modelled as a frequency shift proportional to the line-of-sight range rate:

\[f_D = -\frac{f_0}{c}\,\dot{\rho}\]

where \(f_0\) is the transmit frequency, \(c\) is the speed of light, and \(\dot{\rho}\) is the two-way range rate.

Three-way Doppler

When ground_station_2 is provided the observable becomes

\[f_D = -\frac{f_0\,TR}{c}\,(\dot{\rho}_1 + \dot{\rho}_2)\]

where \(\dot{\rho}_1\) and \(\dot{\rho}_2\) are the range rates to the transmitting and receiving ground stations respectively. Position and velocity partials are implemented for both stations. Partials w.r.t. gs_delta_location or rangerate_bias_Hz in the three-way case raise NotImplementedError until validated.

Parameters:
  • name (str) – The name of the measurement model.

  • instrument (Instrument) – An “antenna” instrument is used for radiometric measurement models.

  • sigma (ArrayWUnits, optional) – Measurement standard deviation. Defaults to None.

  • state_definition (list, optional) – StateVector definition list. Defaults to None.

  • sequence_definition (list, optional) – Sequence definition list. Defaults to None.

  • antenna_name (str, optional) – Name of the antenna on which the measurement model works. Used to read antenna characteristics. Defaults to None.

  • doppler_transmit_frequency (ArrayWUnits, optional) – Transmit frequency for Doppler. Defaults to None.

  • ground_station_2 (GroundStation, optional) – Receiving ground station for three-way Doppler. Defaults to None (two-way mode).

Raises:
  • NotImplementedError – If gs_delta_location or rangerate_bias_Hz appear in the state definition (two-way or three-way).

  • RuntimeError – If the units extracted from the measurements are not consistent.

  • RuntimeError – If neither an EpochArray nor start/end Epochs are provided.

See also

scarabaeus.Measurement

Abstract base class for all measurement models.

Attributes:
antenna_name

The name of the antenna.

doppler_transmit_frequency

The Doppler transmission frequency

ground_station_2

The second ground station.

instrument

The instrument.

name

The name of the model.

sequence_definition

The sequence definition.

sigma

The standard deviation of the measurement model.

state_definition

The state vector definition.

Methods

compute_partials(target, epoch_array, frame)

Stacks together measurement _partials for an epoch array at different epochs.

computed_measurements(target, epoch_array, ...)

Computs the doppler measurement between target.name and self.instrument.name (2-way doppler).

generate_measurement_dataset(dataset_name, ...)

Generates a MeasurementDataSet object that can be used by filters downstream.

observed_measurements(file_name, meas_name, ...)

Reads measurements from a .json file.

residuals(observed_meas, computed_meas)

Generates the measurement model's residuals given observed and computed ArrayWFrames.

update_reference_state(state_vector)

Call this once per iteration (before generate_measurement_dataset). The model will pull: - meas_bias_ideal_* (as ArrayWUnits) - gs_delta_location_ECEF_* (as ArrayWFrame) for this instrument (matching spice_id).

write_observed_measurements(target, ...)

Generates synthetic measurements and write them as a .json file.

compute_partials(target: Spacecraft, epoch_array: EpochArray, frame: Frame = J2000 (0 - SOLAR SYSTEM BARYCENTER)) list#

Stacks together measurement _partials for an epoch array at different epochs.

Parameters:
  • target (Spacecraft) – The target spacecraft.

  • epoch_array (EpochArray) – The epochs.

  • frame (Frame, optional) – The reference frame. Defaults to a J2000 Frame object.

Returns:

_partials – A list with all the _partials evaluated at different epochs in the epoch_array.

Return type:

list

computed_measurements(target: Spacecraft, epoch_array: EpochArray = None, epoch_start: EpochArray = None, epoch_end: EpochArray = None, tstep: float = 1, frame: Frame = J2000 (0 - SOLAR SYSTEM BARYCENTER), noisy: bool = False) ArrayWFrame#

Computs the doppler measurement between target.name and self.instrument.name (2-way doppler). If a receiver station is specified as an instrument (i.e. a ground station), 3-way doppler is computed instead.

Parameters:
  • target (Spacecraft) – The target spacecraft.

  • epoch_array (EpochArray, optional) – An array of epochs (times) at which the range rate measurements should be computed. If provided, overrides epoch_start, epoch_end, and tstep.

  • epoch_start (EpochArray, optional) – The starting epoch for the range ratemeasurement computations. Required if epoch_array is not provided.

  • epoch_end (EpochArray, optional) – The ending epoch for the range ratemeasurement computations. Required if epoch_array is not provided.

  • tstep (float) – The time step, in seconds, between consecutive range ratemeasurements if epoch_array is not provided. Defaults to 1 second.

  • frame (Frame) – The reference frame in which the range rate computation is performed.

  • noisy (bool) – Indicates if noise is added to the computed range rate measurement. Defaults to False.

Returns:

  • t1, t2, t3 (list[EpochArray]) – Epoch arrays (transmit / bounce / receive); identical for the ideal model (no light-time correction).

  • meas_AWF (ArrayWFrame) – Computed Doppler measurements (Hz) packed as an ArrayWFrame.

generate_measurement_dataset(dataset_name: str, target: Body, observed_meas: tuple | list | None = None, epochs: EpochArray | None = None, frame: Frame = J2000 (0 - SOLAR SYSTEM BARYCENTER), noisy: bool = False) list[MeasurementDataSet]#

Generates a MeasurementDataSet object that can be used by filters downstream.

Parameters:
  • dataset_name (str) – The name of the MeasurementDataSet.

  • target (Spacecraft) – The target spacecraft.

  • epoch_list (EpochArray, optional) – The epochs. Defaults to None.

  • epoch_start (EpochArray, optional) – The starting epoch. Defaults to None.

  • epoch_end (EpochArray, optional) – The end epoch. Defaults to None.

  • tstep (int, optional) – The integration timestep. Defaults to 1.

  • observed_measurements (list, optional) – The observed measurements. Defaults to None.

  • frame (Frame, optional) – The reference frame. Defaults to a J2000 Frame object.

  • noisy (bool, optional) – Indicates if noise is added to the measurements or not. Defaults to False.

Returns:

mds_list – A list of MeasurementDataSet objects representing the measurements with their key properties to be used by a filter.

Return type:

list[MeasurementDataSet]

:raises If the observed_meas list is only made by 3 elements`, it throws an error because it needs the 4th element in the list for the indices of :py:class:`the outlier_flag:

Notes

The MeasurementDataSet output is generated in 6 steps:

  1. Computed measurements

  2. Partials

  3. Residuals

  4. Sigmas

  5. Outlier flag

  6. Pack everything in a list

  7. Pack the list in a MeasurementDataSet object

observed_measurements(file_name, meas_name: str = 'meas_ideal', units: Units = unitless, frame: Frame = J2000 (0 - SOLAR SYSTEM BARYCENTER)) Tuple[EpochArray, ndarray, ArrayWFrame]#

Reads measurements from a .json file.

Parameters:
  • file_name (str) – The filename of the .json file containig the measurement information.

  • meas_name (str, optional) – The name of the measurement data to access from the dictionary. Defaults to 'meas_ideal'.

  • units (Units, optional) – Units to be used to write the output AWU. Defaults to unitless.

  • frame (Frame, optional) – Frame to be used to write the output AWF. Defaults to a J2000 Frame object.

Returns:

meas_time_et, meas_sec, meas_obs – A tuple with the following values corresponding to their respective indices:

  • [0] = meas_time_etEpochArray

    The time in ephemeris time.

  • [1] = meas_Secnumpy.ndarray

    The times in seconds.

  • [2] = meas_obsArrayWFrame

    An AWF with the quantities in AWU.

  • [3] = meas_outliersnumpy.ndarray

    The np.array of measurements outliers

Return type:

Tuple[EpochArray, numpy.ndarray, ArrayWFrame]

Notes

The writing of the json assumes or requires units and frames.

residuals(observed_meas: ArrayWFrame, computed_meas: ArrayWFrame) ArrayWFrame#

Generates the measurement model’s residuals given observed and computed ArrayWFrames.

Parameters:
  • observed_meas (ArrayWFrame) – The observed measurements values (O).

  • computed_meas (ArrayWFrame) – The computed measurements values (C).

Returns:

residuals – AWF with the residual O-C.

Return type:

ArrayWFrame

update_reference_state(state_vector: StateArray)#

Call this once per iteration (before generate_measurement_dataset). The model will pull:

  • meas_bias_ideal_* (as ArrayWUnits)

  • gs_delta_location_ECEF_* (as ArrayWFrame)

for this instrument (matching spice_id).

write_observed_measurements(target: Spacecraft, epoch_array: EpochArray = None, epoch_start: EpochArray = None, epoch_end: EpochArray = None, tstep: float = 1, frame: Frame = J2000 (0 - SOLAR SYSTEM BARYCENTER), noisy: bool = False, file_name: str = 'ideal_measurement', check_visibility: bool = False, elevation_mask: float = 10.0, folder_path_override: str = None) None#

Generates synthetic measurements and write them as a .json file. The input of this method encapsulate the ones needed for the “computed_meas” method in each measurement model class.

Parameters:
  • target (Spacecraft) – The target spacecraft for which the range measurement is to be computed.

  • epoch_array (EpochArray, optional) – An array of epochs (times) at which the range measurements should be computed. If provided, overrides epoch_start, epoch_end, and tstep.

  • epoch_start (EpochArray, optional) – The starting epoch for the range measurement computations. Required if epoch_array is not provided.

  • epoch_end (EpochArray, optional) – The ending epoch for the range measurement computations. Required if epoch_array is not provided.

  • tstep (float, optional) – The time step, in seconds, between consecutive range measurements. If epoch_array is not provided. Defaults to 1 second.

  • frame (Frame , optional) – The reference frame in which the range computation is performed. Defaults to None.

  • noisy (bool , optional) – Whether to add noise to the computed range measurement. Defaults to False.

  • file_name (str, optional) – The filename of the JSON in which the measurement is saved, Defaults to 'ideal_measurement'.

  • check_visibility (bool, optional) – When True, epochs where the instrument cannot observe the target are removed before generating measurements. The specific check is instrument-dependent: GroundStation uses an elevation-angle test; Camera uses a FOV projection test. Defaults to False.

  • elevation_mask (float, optional) – Minimum elevation angle in degrees used by the GroundStation visibility check. Ignored for Camera instruments. Only relevant when check_visibility=True. Defaults to 10.0.

  • folder_path_override (str, optional) – If provided, the JSON file is saved directly to this path instead of the default data/measurements/radiometric or data/measurements/optical folder. The directory is created automatically if it does not exist. Defaults to None.

Return type:

None

property antenna_name: str#

The name of the antenna.

property doppler_transmit_frequency#

The Doppler transmission frequency

property ground_station_2: GroundStation#

The second ground station.

property instrument: Instrument#

The instrument.

property name: str#

The name of the model.

property sequence_definition: dict#

The sequence definition.

property sigma: ArrayWUnits#

The standard deviation of the measurement model.

property state_definition: dict#

The state vector definition.