Common#

Implementations of the CTAO Common Data Model Specification.

class SiteID(*values)[source]#

CTAO sites.

CTAO_NORTH = 'CTAO-North'#

Data created at CTAO North

CTAO_SOUTH = 'CTAO-South'#

Data created at CTAO South

EXTERNAL = 'EXTERNAL'#

Data external to CTAO

HQ = 'HQ'#

Data created at CTAO Headquarters

SDMC_DPPS = 'SDMC-DPPS'#

Data created by DPPS at the SDMC

SDMC_SUSS = 'SDMC-SUSS'#

Data created by SUSS at the SDMC

class TimeRefPos(*values)[source]#

Spatial location at which the observation time is valid.

From FITS standard v4

pydantic model TimeReference[source]#

Reference time for floating point time representations.

For timestamps represented as ISO time strings, this is not relevant.

Show JSON schema
{
   "title": "TimeReference",
   "description": "Reference time for floating point time representations.\n\nFor timestamps represented as ISO time strings, this is not relevant.",
   "type": "object",
   "properties": {
      "position": {
         "$ref": "#/$defs/TimeRefPos",
         "description": "Spatial location at which the observation time is valid.  From FITS standard v4 Options are: \"TOPOCENTER\", \"RELOCATABLE\".",
         "fits_keyword": "TREFPOS"
      },
      "time_mjd": {
         "anyOf": [
            {
               "properties": {
                  "value": {
                     "type": "number"
                  },
                  "unit": {
                     "type": "string"
                  }
               },
               "required": [
                  "value",
                  "unit"
               ],
               "type": "object"
            },
            {
               "type": "string"
            },
            {
               "type": "number"
            }
         ],
         "description": "Reference time in MJD",
         "fits_keyword": "MJDREF",
         "title": "Time Mjd",
         "unit": "d"
      },
      "unit": {
         "default": "s",
         "fits_keyword": "TIMEUNIT",
         "title": "Unit",
         "type": "string"
      },
      "system": {
         "$ref": "#/$defs/TimeSystem",
         "default": "TAI",
         "description": "The time scale of the time-related keywords.  For simulated data, use LOCAL. Options are: \"TT\", \"UTC\", \"UT1\", \"TAI\", \"GPS\", \"LOCAL\".",
         "fits_keyword": "TIMESYS"
      },
      "resolution": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "time resolution in the time unit.",
         "fits_keyword": "TIMEDELT",
         "ivoa_keyword": "t_resolution",
         "title": "Resolution"
      }
   },
   "$defs": {
      "TimeRefPos": {
         "description": "Spatial location at which the observation time is valid.\n\nFrom FITS standard v4",
         "enum": [
            "TOPOCENTER",
            "RELOCATABLE"
         ],
         "title": "TimeRefPos",
         "type": "string"
      },
      "TimeSystem": {
         "description": "The time scale of the time-related keywords.\n\nFor simulated data, use LOCAL.",
         "enum": [
            "TT",
            "UTC",
            "UT1",
            "TAI",
            "GPS",
            "LOCAL"
         ],
         "title": "TimeSystem",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "position",
      "time_mjd"
   ]
}

Config:
  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • validate_default: bool = True

Fields:
field position: TimeRefPos [Required]#

Spatial location at which the observation time is valid. From FITS standard v4 Options are: “TOPOCENTER”, “RELOCATABLE”.

field resolution: float | None = None#

time resolution in the time unit.

field system: TimeSystem = TimeSystem.TAI#

The time scale of the time-related keywords. For simulated data, use LOCAL. Options are: “TT”, “UTC”, “UT1”, “TAI”, “GPS”, “LOCAL”.

field time_mjd: WithJsonSchema(json_schema={'anyOf': [{'type': 'object', 'properties': {'value': {'type': 'number'}, 'unit': {'type': 'string'}}, 'required': ['value', 'unit']}, {'type': 'string'}, {'type': 'number'}], 'unit': 'd'}, mode=None)] [Required]#

Reference time in MJD

Constraints:
  • _represents = 24 h

  • _names = [‘d’, ‘day’]

  • _short_names = [‘d’]

  • _long_names = [‘day’]

  • _format = {}

  • __doc__ = day (d)

  • _physical_type_id = ((‘s’, 1),)

  • _hash = -4113273505871248541

  • func = <function _make_quantity.<locals>.deserialize at 0x7f912ed289a0>

  • return_type = dict | float | str

  • when_used = always

  • json_schema_input_type = typing.Any

  • json_schema = {‘anyOf’: [{‘type’: ‘object’, ‘properties’: {‘value’: {‘type’: ‘number’}, ‘unit’: {‘type’: ‘string’}}, ‘required’: [‘value’, ‘unit’]}, {‘type’: ‘string’}, {‘type’: ‘number’}], ‘unit’: ‘d’}

field unit: AstroPydanticUnit = 's'#
class TimeSystem(*values)[source]#

The time scale of the time-related keywords.

For simulated data, use LOCAL.

GPS = 'GPS'#

Global Positioning System time

LOCAL = 'LOCAL'#

Local Time

TAI = 'TAI'#

International Atomic Time

TT = 'TT'#

Terrestrial Time

UT1 = 'UT1'#

Universal Time

UTC = 'UTC'#

Coordinated Universal Time