Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

TYPE

NAMING CONVENTION

CONTENT

Level 0

KP.YYYYMMDD.SSSSS.SS.fits

Unprocessed data.

The date used for this is:

  1. if DATE-END exists, the DATE-END in the Red camera, or, if no Red data, the Green Camera

  2. the time when the shutter was closed passed into the call to the FITSAssembly class

  3. if neither of the above times exist, then the current timestamp when the final filename is needed

...

Assembly

  • After each observation, the FITS Assembler pulls images with the appropriate obsIDs from the separate subsystem interim directories

  • These sub-FITS are then directly copied into the larger L0 FITS, in the correct order, with no modifications, as shown in this schematic:

...

Keck and Lick Observatories rely on a postgres Postgres database that collects and records all keyword values and their time of broadcast. The keyheader program takes a timestamp and finds the last broadcast value for a given keyword at that timestamp. The program then turns that into a FITS header compatible output. A request for the kpfexpose.EXPOSE value becomes

...

The final L0 assembler will take the kpfexpose.STARTTIME and kpfexpose.ENDTIME, offset each by a small time, and then search for the telemetry in the keyheader database around those times. Those are denoted as the time_beg and time_end in the FITSAssmeble FITSAssemble library. Some states will only be true between those times (shutters will only be open during an exposure for example) so a third time is searched which is just the average the start and end times.

...

  1. Create a blank primary header data unit which will become the final one

  2. Read in each primary header from the sub-FITS, and move keywords to the L0 primary or to other FITS extensions as appropriate.

  3. For each input file, compare the DATE-BEG and DATE-END values with those from kpfexpose.STARTTIME and kpfexpose.ENDTIME. If the kpfexpose values are significantly older than the values in the files, use the values in the files. These file values become time_beg and time_end used for queries

  4. Use keyheader to make three queries. One at time_beg plus an offset, one at the average of time_beg and time_end which is called time_mid, and finally one at time_end plus an offset.

  5. The comments are part of the keyheader configuration file and can include the dispatchers and dispatcher keywords that the data come from.

...

Dispatcher Implementation

The dispatcher is provided by the service kpfassemble.

Keyword

Value

Type

ALL_CAMERAS

Green,Red,Ca_HK

Contains the list of detector systems that could be used for assembly

bitmask - same values as the kpfexpose.TRIG_TARG mask

CAMERAS

Green,Red

Contains the list of cameras expected, from the kpfexpose.TRIG_TARG

String - simply a copy of the kpfexpose.TRIG_TARG ASCII value

ERRMSG

Hopefully none, notes errors in file assembly

String

LOUTFILE

/data/L0/KP.20220516.58872.81.fits

Full location and filename of the output file

String

MESSAGE

kpfexpose.EXPOSE is Readout, will wait for 120.00

Status messages, gives state of dispatcher

String

OBSID

6823

The observation ID for the data used in the file construction. See above

Integer

OUTDIR

/data/L0

The data output location, this is user selectable

String

TEST

YES

If yes, the MESSAGE keyword is much more chatty.

Boolean