Models

class tom_observations.models.ObservationRecord(*args, **kwargs)

Class representing an observation in a TOM.

A ObservationRecord corresponds with any set of related exposures at a facility, and is associated with a single target.

Parameters
  • target (Target) – The Target with which this object is associated.

  • facility (str) – The facility at which this observation is taken. Should be the name specified in the corresponding TOM facility module, if one exists.

  • parameters (str) – The set of parameters used in the API request made to create the observation, usually stored as JSON.

  • status (str) – The current status of the observation. Should be a valid status in the corresponding TOM facility module, if one exists.

  • scheduled_start (datetime) – The time at which the observation is scheduled to begin, according to the facility.

  • scheduled_end (datetime) – The time at which the observation is scheduled to end, according to the facility.

  • created (datetime) – The time at which this object was created.

  • modified (datetime) – The time at which this object was last updated.

class tom_observations.models.ObservationGroup(*args, **kwargs)

Class representing a logical group of observations.

Parameters
  • name (str) – The name of the grouping.

  • observation_records – Set of ObservationRecord objects associated with this ObservationGroup

  • created (datetime) – The time at which this ObservationGroup was created.

  • modified (datetime) – The time at which this ObservationGroup was modified.

class tom_observations.models.DynamicCadence(*args, **kwargs)

Class representing a dynamic cadence–that is, a cadence that follows a pattern but modifies its behavior depending on the result of prior observations.

Parameters
  • observation_group (ObservationGroup) – The ObservationGroup containing the observations that were created by this cadence.

  • cadence_strategy (str) – The name of the cadence strategy this cadence is using.

  • cadence_parameters (JSON) – The parameters for this cadence, e.g. cadence period

  • active (boolean) – Whether or not this cadence should continue to submit observations

  • created (datetime) – The time at which this DynamicCadence was created.

  • modified (datetime) – The time at which this DynamicCadence was modified.

class tom_observations.models.ObservationTemplate(*args, **kwargs)

Class representing an observation template.

Parameters
  • name (str) – The name of the ObservationTemplate

  • facility (str) – The module-specified facility name for which the template is valid

  • parameters (str) – JSON string of observing parameters

  • created (datetime) – The time at which this ObservationTemplate was created.

  • modified (datetime) – The time at which this ObservationTemplate was modified.