Models¶
Observation Records vs. Observation Groups¶
In the TOM Toolkit, Observation Records represent the details of an individual observation as submitted to the observatory. This is what will be updated with a new status as the observation is completed.
Observation Groups are any arbitrary collection of observations that might be related to each other in some way. This might be everything observed on a certain night, everything observed by a single user, or some other science-based grouping.
- 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
Targetwith 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 (dict) – The set of parameters used in the API request made to create the observation
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
ObservationRecordobjects associated with thisObservationGroupcreated (datetime) – The time at which this
ObservationGroupwas created.modified (datetime) – The time at which this
ObservationGroupwas 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) – TheObservationGroupcontaining 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
DynamicCadencewas created.modified (datetime) – The time at which this
DynamicCadencewas modified.
- class tom_observations.models.ObservationTemplate(*args, **kwargs)¶
Class representing an observation template.
- Parameters:
name (str) – The name of the
ObservationTemplatefacility (str) – The module-specified facility name for which the template is valid
parameters (dict) – Observing parameters
created (datetime) – The time at which this
ObservationTemplatewas created.modified (datetime) – The time at which this
ObservationTemplatewas modified.
- class tom_observations.models.Facility(*args, **kwargs)¶
Class representing individual telescope facilities.
- Parameters:
site_code (str) – Short-hand code used to reference the facility
mpc_observatory_code (str) – Three-digit reference code for the facility from the Minor Planet Center
full_name (str) – Name of the facility
short_name (str) – Abbreviated name for the facility
location (str choice field) – Location of observatory
latitude (float) – Latitude of facility if Earth-based in decimal degrees
longitude (float) – Langitude of facility if Earth-base in decimal degrees
elevation (float, may be negative) – Elevation of facility above mean sealevel if Earth-based
orbit (str choice field) – Type of orbit if facility is space-based
diameter (float) – Diameter of primary optic or detector
typical_seeing (float) – Typical seeing at the facility, units of arcsec
detector_type (str) – Descriptor of the messenger or wavelength range measured by the facility
info_url (URL) – URL where more information on the facility can be found
api_url (URL) – URL of the facility’s API if any