Note

For a description of the style convention and how JSON structures are documented see section JSON Data Structures.

Named JSON structures are indicated as {JSON}.

FITS Keywords

Download JSON Schema or view it here.

FITS keywords are provided as a JSON-array of FitsKeyword {JSON} objects, where each object describe one keyword. The following example show one FITS standard value keyword and one ESO hierarchical keyword:

[
  {
    "type": "valueKeyword",
    "name": "OBJECT",
    "value": "OBJECT,SKY"
  },
  {
    "type": "esoKeyword",
    "name": "OBS TPLNO",
    "value": 2
  }
]

FitsKeyword {JSON}

(Union[ValueKeyword, EsoKeyword, LiteralKeyword])

FitsKeyword represent any valid FITS keyword type.

ValueKeyword {JSON}

(object)

ValueKeyword is a JSON object that represents a FITS value keyword.

Example:

{
   "type": "valueKeyword",
   "name": "RA",
   "value": 53.087446,
   "comment": "[deg] 03:32:20.9 RA (J2000) pointing"
}

Object members are:

type (“valueKeyword”)

This is a union discriminator and must have the literal string value "valueKeyword".

name (str)

Logical Keyword Name (up to 8 characters).

Examples:

  • RA

  • DEC

  • OBJECT

value (Union[str, boolean, number])

For both ValueKeyword and EsoKeyword the value field provide the typed keyword value. See JSON to FITS type conversion for mapping between JSON and FITS.

comment (Optional[str])

Optional comment.

EsoKeyword {JSON}

(object)

This object represents a HIERARCH ESO FITS keyword [ RD6].

Example:

{
   "type": "esoKeyword",
   "name": "DET EXP ID",
   "value": 44,
   "comment": "Unique exposure ID"
}
type (“esoKeyword”)

This is a union discriminator and must have the literal string value "esoKeyword".

name (str)

Logical Keyword Name which does not include the HIERARCH ESO prefix.

Examples:

  • DET CHIP GAIN

  • TEL AIRM START

  • ADA GUID RA

value (Union[str, boolean, number])

For both valueKeyword and esoKeyword the value field provide the typed keyword value. See JSON to FITS type conversion for mapping between JSON and FITS.

comment (Optional[str])

Optional comment.

LiteralKeyword {JSON}

(object)

This object represents a fully formatted FITS keyword record.

Example:

{
   "type": "literalKeyword",
   "value": "HIERARCH ESO DPR CATG = 'SCIENCE' / Observation category"
}
type (“literalKeyword”)

This is a union discriminator and must have the literal string value "literalKeyword".

value (str)

Fully formatted FITS keyword record with optional trailing spaces.

FITS and JSON Type Conversion

Table 9 JSON to FITS type conversion

JSON

FITS

Notes

Example

string

string

Do not use single-quotes '.

Timepoints are represented as strings.

"foobar" -> 'foobar', "2020-07-28T04:57:00.8836" -> '2020-07-28T04:57:00.8836'

boolean

logical

true -> T, false -> F

number

integer or float

Dictionary will be used to format the value correctly (not yet implemented).

integer range: -9223372036854775807 .. 9223372036854775807

float range: -1.79769313486231e+308 .. 1.79769313486231e+308

Note

There is no built-in type in either JSON or FITS to represent a time point (date/datetime). DICD [RD1] standard time format is ISO 8601: YYYY-MM-DDThh:mm:ss.sss or YYYY-MM-DD when only date is shown.

When it is time to format the value a dictionary will be used to validate the keyword and perform the formatting of the raw value as well as to provide the comment field (see ctd project for additional details on the dictionary system).