...
The Ca HK and Guide Camera sub-FITS will be created on the KPF FIU computer (an ASL Lancelot located within the K1 server room). This computer must NFS mount the /data/ partition from kpf-asl-prime to use that file system for writing out the data. That said, as long the kpf-asl-prime has access to the KPF FIU computer’s filesystem and the dispatchers broadcast through a keyword the location of the file output, the L0 assembler could find the files.
...
FITS Header Keyword
...
Names and Data Origins
The assembler will need to pull data from two different sources to construct the final primary header. The first are the individual FITS files themselves. The second source of data are values from various other subsystems that are broadcast as keywords during the exposure.
...
The contents of the primary headers of multi-extension files (such as those from the red and green cameras) be copied into the primary but in a manner that preserves their location, unless those contents are specific to a single amplifier. Those should be moved to the headers of the sub-images themselves.
Each keyword in the primary header be 8 characters.
Copying FITS Header Keywords into the L0
...
Primary Header
To create new keywords in the primary header that preserve the origin of the original data when it is copied from a sub-FITS primary header, each keyword gets a two letter prefix that shows the origin of the keyword.
...
RDTM_ZO = 'GMT ' / time zone Keyword TM_ZONE Red
Telemetry
...
Before,
...
During, and
...
After the
...
Exposure
Keck and Lick Observatories rely on a 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
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.
Construction of the
...
Final FITS
...
Primary Header
Create a blank primary header data unit which will become the final one
Read in each primary header from the sub-FITS, and move keywords to the L0 primary or to other FITS extensions as appropriate.
For each input file, compare the DATE-BEG and DATE-END values with those from
kpfexpose.STARTTIME
andkpfexpose.ENDTIME
. If thekpfexpose
values are significantly older than the values in the files, use the values in the files. These file values becometime_beg
andtime_end
used for queriesUse
keyheader
to make three queries. One attime_beg
plus an offset, one at the average oftime_beg
andtime_end
which is calledtime_mid
, and finally one attime_end
plus an offset.The comments are part of the keyheader configuration file and can include the dispatchers and dispatcher keywords that the data come from.
...