Table of Contents:
Description of sub-FITS
sub-FITS are FITS files containing images or data (or both) and are created by subsystems throughout KPF
Some are created by devices (i.e. Archons) and some by dispatchers (i.e. Ca HK Detector dispatcher)
Each sub-FITS is designed to be stand-alone, and contain all of the relevant subsystem information within
The sub-FITS are assembled together by the FITS Assembler to form a single ‘L0’ FITS file per observation
KPF L0 FITS Format
As per Data Format, the post-observation 'Level 0' (L0) format expected by the DRP is:
There is one L0 FITS per observation
It contains all of the raw data from the observation
Within HDU 1 it also contains header data from the overall system (i.e. telescope and observatory) that is not contained within the sub-FITS headers
obsID
The KPF “Observation ID” (obsID) is utilized to ensure that the appropriate images and data are assembled together into the correct L0 FITS.
The rationale is to prevent images/data from an observation being combined with images/data from the next observation. This could happen at the end of an exposure, when the images are being read out from the CCD but the system is changing or preparing for the next exposure.
The obsID will be stored in a keyword. It will be an integer that is incremented at the start of each new KPF observation/exposure.
Each subsystem will take this obsID and:
use it within the sub-FITS filenames (“subsystem-prefix_obsID.FITS”)
this allows for straightforward assembly of correct files, and the assembler only needs to look at filenames
place it within the header of each sub-FITS
maintains obsID traceability after the L0 is assembled and the sub-FITS filenames are lost
Directory Structure for FITS Files
Proposed directory structure for KPF:
kpf-asl-prime → KPF FITS Main Directory → L0 FITS Directory
→ Sub-FITS Directory → Green
→ Red
→ Ca_HK
→ ExpMeter
→ GuideCam
→ Solar_Irrad
The sub-FITS sub-directories will hold the separate FITS from each subsystem before L0 assembly
The sub-FITS will not be immediately deleted after L0 assembly, but will remain in the directory for one month (TBC) as a backup
Final L0 Filename
As per KPF File Names, the L0 Filename expected by the DRP is:
TYPE | NAMING CONVENTION | CONTENT |
---|---|---|
Level 0 | KP.YYYYMMDD.SSSSS.SS.fits | Unprocessed data. |
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:
Description of Process
First thoughts on the sequence for the FITS Assembler:
get the current obsID value from the obsID keyword
create an empty L0 FITS file (with correct filename) to append to
pull telemetry from the desired KTL keywords and append them to the primary header in HDU 1
append the obsID to the primary header in HDU 1
look in the /Green sub-FITS directory for a file named “KPF_Green_obsID.FITS”
if it exists, append it to the L0 FITS file as per diagram above
if it does not exist, append empty GREEN_AMP1, GREEN_AMP2, GREEN_AMP3, GREEN_AMP4 HDUs to the L0 FITS
look in the /Red sub-FITS directory for a file named “KPF_Red_obsID.FITS”
if it exists, append it to the L0 FITS file as per diagram above
if it does not exist, append empty RED_AMP1, RED_AMP2, RED_AMP3, RED_AMP4 HDUs to the L0 FITS
look in the /Ca_HK sub-FITS directory for a file named “KPF_Ca_HK_obsID.FITS”
if it exists, append it to the L0 FITS file as per diagram above
if it does not exist, append empty CA_HK HDU to the L0 FITS
look in the /ExpMeter sub-FITS directory for a file named “KPF_ExpMeter_obsID.FITS”
if it exists, append it to the L0 FITS file as per diagram above
if it does not exist, append empty EXPMETER HDU to the L0 FITS
look in the /GuideCam sub-FITS directory for a file named “KPF_GuideCam_obsID.FITS”
if it exists, append it to the L0 FITS file as per diagram above
if it does not exist, append empty GUIDECAM HDU to the L0 FITS
Notes on file locations of Ca HK and Guide Camera FITS
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). I believe these sub-FITS will need to be transferred from there to kpf-asl-prime in order for the FITS Assembler to access them.
This copying could happen:
immediately after each sub-FITS is created. This is likely the preferred approach as the Ca HK detector and Guide Camera will read out faster than the main spectrometer Green and Red detectors. If the Ca HK detector dispatcher and the Guide Camera dispatcher copied their sub-FITS to kpf-asl-prime immediately after creation, they would be saved on kpf-asl-prime and ready to assemble likely before the main spectrometer CCDs have finished reading out.
by the FITS Assembler. Not ideal as then the FITS Assembler has to stop and wait for the files to arrive before proceeding.
by some better approach I haven’t thought of…
Add Comment