Averages and files observations as the current dark
The bad-pixel mask applied is the binning-appropriate match taken from the
$ORAC_DATA_CAL/index.mask calibration index.
Intermediate frames are deleted.
The dark called dark_<instrument>_<UT night>_<Xbin>_<Ybin> where <instrument> is the LCOGT instrument identifier and <Xbin>, <Ybin> are the binning factors in X and Y.
The dark is filed in $ORAC_DATA_OUT/index.dark after checking whether it’s mean is within the allowed tolerance.
If $FINAL_DATA_OUT is set, the masterdark is converted to FITS and copied there and a PNG version of the masterdark is created and moved to $FINAL_DATA_OUT.
The processing engines are from the Starlink packages KAPPA and CCDPACK.
Uses the Starlink NDF format.
History is recorded within the data files.
The title of the data is propagated through the intermediate file to the dark.