A Guide to Kermit Data

Kermit writes data as FITS files which are fairly standard but nonetheless there are a few details you may want to be aware of.

Data Format

Kermit FITS files contain an NxNxM array of 32 bit integers. N may be one of {64, 128, 256, 512, 1024, 2048}. M will usually be 1, but may be 2 for images read out in "CDS no subtraction" mode (which saves both the initial and final CDS reads separately), or may be > 2 for fast subarray frames mode.

The values stored in the 32 bit integers are the sum total of counts read at that pixel during the exposure. If NREADS > 1, this means that the value stored in the FITS file is the sum of all the reads, while you probably want their average. To achieve this normalization, you almost certainly want to normalize the image by dividing it by the NREADS FITS keyword value.

The values in the image are also the sum of all the coadds. If you want the total amount of flux during the entire integration time (for instance if you care about photon noise statistics) then this is fine. If instead you want to know the average counts read in per each single coadd, then you should also divide by NCOADDS.

Exposure Time

Describe EXPTIME, COADDTIM headers here.

The DATE-OBS keyword records the start of exposure time in accordance with <<relevant FITS standard>>, for instance "2004-03-22T08:19:18.409182".  This time is in UTC. A caveat: While this time is recorded to microsecond precision, it's actually the time that the C driver software send the expose command to the DSP electronics. The actual exposure time begins a small fraction of a second later, after the DSP has received and processed the command and clocked out the relevant waveforms to the detector. This delay is variable between <<<compute range of possible delays>>>. Furthermore, the actual photon-sensitive exposure doesn't begin until after the chip is reset NRESETS times, which further delays the actual exposure start from the DATE-OBS value.

Subarray Position

Subarrays smaller than 1024x1024 are positionable. These positions are not arbitrary but are controlled by the readout channel and coadder board geometries. The location of a given subarray is stored in the FITS header; you'll need to pay attention to this for darks, flats, etc.  The location is potentially stored in three different ways:
  1. All Kermit data contain the keywords SUB_COAD (which coadder board read out this subarray) and SUB_OFFS (what offset into the readout channel was used). The combination of subarray size (NAXIS1), SUB_COAD, and SUB_OFFS, is sufficient to uniquely identify a subarray location - these are the same three numbers used for Kermit exposure mode strings.
  2. Kermit data more recent than 2004-03-13 also contain the EXP_MODE keyword. This is the same exposure mode string as used in the Kermit Exposure Palette window, and contains potentially NAXIS1, SUB_COAD, SUB_OFFS, NREADS, and NRESETS. This keyword is redundant with the rest of the FITS header but is provided for convenience. By sorting on this keyword you can identify and organize different exposures without having to worry about paying attention to multiple keywords.
  3. Kermit data more recent than <<<<date>>>>> also contain the SUB_X and SUB_Y keywords. These keywords give the coordinates of the lower left corner of the active subarray relative to the lower left corner of the entire array.
  4. Kermit data more recent than <<<<date>>>> also contain the CCDSEC keyword. This keyword gives the subarray position relative to the entire array formatted consistently with the IRAF CCDSEC convention, "[startx:endx, starty,endy]".  Note that this notation starts with pixel 1 in IRAF convention rather than pixel 0 as IDL would use. For instance [1:2048,1:2048] would be the entire chip, while [100:356,768:1024] would be a 256x256 subarray located 100 pixels in from the left edge and at the top of the first quadrant.  CCDSEC is technically redundant with NAXIS1, SUB_COAD, and SUB_OFFS, but the conversion from one to the other is highly non-obvious unless you know all sort of annoying chip geometry details, which none of you probably care about, so just use CCDSEC. :-)

Motor Positions

Kermit has four movable elements. Three of these move between named positions. The current position names are stored as the FILTER, M2, and PUPIL FITS keywords. The Focus stage moves to numerical positions between 0 (longest focus, array is farthest from the telescope) and -8900 (shortest focus; array closest to telescope). The physical distance corresponding to this motion is about two centimeters. The current focus position is stored as the FOCUS keyword.

The raw numerical positions for all motors are also stored as the MOTORS keyword. This is particularly useful if any of the first three motors have been offset slightly from their nominal positions using the "jog" command--the offsets will be recorded here.

This page last updated on 2004-03-24 by Marshall Perrin.