ORAC-DR has a totally flexible system for controlling the automatic selection of calibration frames. This note describes how it works and how to override it
The type of calibrations used depend, obviously, on the instrument and the data reduction recipes used. Typically there are three kinds of calibration frames:
Library frames provided by the observatory (bad pixel masks, rotation transformations,
etc). These are maintained by the instrument scientist as appropriate. They are located in
ORAC_DATA_CAL
.
Nightly frames that are generated during observing. The may be taken in specific
calibration observations, e.g. by taking a “dark” (at UKIRT) or “skydip” (at JCMT) frames.
They might also be generated from actual observations of targets (such as “sky flats”) or
calibration values (such as “flux conversion factors”) calculated as part of a recipe. These
are located in ORAC_DATA_OUT
.
“Rule” files that contain the rules for what constitutes an appropriate calibration frame.
These are located in ORAC_DATA_CAL
.
ORAC-DR treats the first two kinds rather differently.
Library frames reside ORAC_DATA_CAL
and their selection is hardwired either in the instrument class or
in a DR primitive. The users are unlikely to be concerned with them unless they want to override
them with their own.
Nightly frames are handled in a more complicated way. A DR recipe that generates a calibration frame is responsible for filing it with the pipeline. The pipeline will hand it back to recipes that require calibration recipes according to a set of rules that are defined on a per-instrument basis by the ORAC-DR infrastructure as well as a per-frame basis by the calibration rules files.
When a frame is reduced and files as a calibration, it is added to an index file located in
ORAC_DATA_OUT
named after the type of calibration, e.g., dark frames are filed in index.dark. When the
pipeline is run up and needs a calibration frame but has not been asked to reduce one in that
session it will look in the index files for one that may have been reduced at a previous
time.
If the pipeline is unable to find a suitable calibration it will complain vociferously and exit. This may seem extreme, but remember that ORAC-DR is designed for online use at an observatory. If an observer has not taken appropriate calibrations, we wish to point it out to them in the strongest terms because we do not want them to end up with un-reduceable data.
You can override the pipeline’s selection of calibration frame by using the ORAC-DR -calib
command line option. Use this override judiciously, as in general the pipeline does a fine
job.
The ORAC-DR -calib
command line option is used by giving comma separated key=value pairs (e.g.
’-calib dark=file1,bias=file2
’). The following keys can be used for general instruments. Specific
instruments may have extra calibration overrides that can be used.
baseshift - Use the given comma separated doublet (e.g. "0,0"
) as the frame’s base
position.
bias - Use the given frame as a bias.
dark - Use the given frame as a dark.
flat - Use the given frame as a flat.
mask - Use the given frame as a mask. This option is usually used for bad pixel masks.
polrefang - Add the given value to the measured polarisation angle to align the polarimeter’s reference angle to north.
readnoise - Use the given value for the detector readnoise.
referenceoffset - Use the given comma separated doublet (e.g. "0,0"
) as the frame’s
reference offset, which is difference between the frame centre and the reference pixel
derived from the FITS headers.
rotation - Use the given frame as a rotation matrix.
sky - Use the given frame as a sky observation.
standard - Use the given frame as a standard star observation.
When files are given the extension should be left off. As an example, if you have made a new bad pixel mask and wish to use it with ORAC-DR, the following command would be used: