Extended-source standard reduction using interpolated sky subtraction EXTENDED_3x3
The script performs bad-pixel masking, null debiassing, dark subtraction, flat-field division, sky subtraction, registration, resampling, and mosaicking. The “Notes” give more details.
It is suitable for extended objects up to 2 arcminutes across with UFTI, 28 arcseconds with IRCAM, and 14 arcminutes across with IRIS2.
A World Co-ordinate System (WCS) using the AIPS convention is created in the headers should no WCS already exist.
For IRCAM, old headers are reordered and structured with headings before groups of related keywords. The comments have units added or appear in a standard format. Four deprecated headers are removed. FITS-violating headers are corrected. Spurious instrument names are changed to IRCAM3.
The bad-pixel mask applied is $ORAC_DATA_CAL/bpm.
Each dark-subtracted frame has thresholds applied beyond which pixels are flagged as bad. The lower limit is 5 standard deviations below the mode, but constrained to the range 100 to 1. The upper limit is 1000 above the saturation limit for the detector in the mode used.
The flat field is derived from the sky frames as follows. The mode (sigma-clipped mean) is used to offset each sky frame’s mode to that of the first sky frame. The corrected sky frames are combined pixel by pixel using a median of the values in each frame. The resultant frame is normalised by its median to form the flat field. This frame median is subtracted from the source frames after they have been flat-fielded. A flat field is created for each row of the grid of target frames, and applied only to that row of target frames.
The sky subtraction comes from linear interpolation of the sky modal values of the two flat-fielded sky frames which immediately bracket the target frame.
Registration is performed using common point sources in the overlap regions. If the recipe cannot identify sufficient common objects, it then tries the crosshead offsets. If these are null, the script resorts to the telescope offsets.
The resampling applies non-integer shifts of origin using bilinear interpolation. There is no rotation to align the Cartesian axes with the cardinal directions.
The recipe makes the mosaics by applying offsets in intensity to give the most consistent result amongst the overlapping regions. The noise will be greater in the mosaic’s peripheral areas, having received less exposure time. The mosaic is not normalised by its exposure time (that being the exposure time of a single frame).
Mosaics are made and displayed for each row, except the last. At the end of each cycle of 19 frames the full mosaic of nine target frames is created and displayed instead. On the second and subsequent cycles the full mosaic is added into a master mosaic of improving signal to noise. The exposure time is also summed and stored in the mosaic’s corresponding header. Likewise the end airmass header and end UT headers are updated to match that of the last-observed frame contributing to the mosaic.
Intermediate frames are deleted except for the flat-fielded (_ff suffix) frames.
The full mosaic in mdate_group_number_mos, where m is the instrument’s group prefix.
A mosaic for each row in mdate_group_number_mosrow_number, where row_number is 0 or 1.
The individual flat-fielded frames in idate_obs_number_ff, where i is the frame prefix. The naming format is slightly different for some non-UKIRT instruments.