Reducing Infra-Red (IR) array data has many similarities to reducing CCD data. The major differences are usually an apparent lack of bias information (no bias frames or strips) and flatfields, and the need to remove dark current.
Normally if you have no bias frames then your data should already be
debiassed (this is typically an observing option), in this case unless
you want to remove defective pixels (ARD files can
be easily generated from a glitch file as it has a PIXEL keyword
- see §
),
and/or generate error estimates for your data (the PHOTOM
- SUN/45 package can make use of these), you can miss out
the debiassing stage. If you want to pass your data through DEBIAS use
the option to subtract a constant as in:
% debias in='irdata*' out='*_db' usecon zero=0.0
Another way that IR data can be debiassed is by subtracting the bias contribution at the same time as the dark current (since a dark current frame must have the same bias contribution). If you have data like this then you need to use the MAKECAL and CALCOR routines to create a master dark (if you have more then one dark count frame) and then subtract both contributions together. One less obvious point about this method is that you should not use dark counts that do not have exactly the same exposure as your data (this is because the bias level doesn't scale, it's an absolute value).
If you have bias frames then follow the normal CCD procedures for subtracting without bias strips.
The way that flatfielding is usually done with IR array data is by `dithering' the object frames on the sky (this also makes sure that the defective pixels are different, relative to the objects) and then median stacking them. Of course this will fail if your objects cover a large area of the detector and the typical contribution in the stack of images isn't sky at every pixel. You may of course have some sky frames that can be used as flatfields.
The following script shows how you might reduce you data if you want to deglitch and generate errors if your data is already debiassed.
#
# Clear any existing setup.
#
ccdclear reset accept
#
# Convert the glitch file into an ARD file.
#
$CCDPACK_DIR/glitch2ard GLITCH.DAT glitch.ard
#
# Debias all the frames using a 0 contribution.
#
debias in='"data*,dark*"' usecon=true zero=0 out='*_db' genvar=false \
mask=glitch.ard accept
#
# Dark subtraction. Note all dark frames and data frames have the same
# exposures
#
makecal in='dark*-db' out=master_dark expose=1 accept
calcor in='data*_db' cal=master_dark expose=1 out='*_dk'
#
# Median filter of the debias&dark corrected frames to produce the
# flatfield.
#
makeflat in='*_dk' method=median out=master_flat accept
#
# Now flatfield all frames.
#
flatcor in='*_dk' flat=master_flat out='*-fl'
#
# The next step is to mosaic the frames, using PAIRNDF, REGISTER,
# TRANNDF and MAKEMOS routines...
A copy of this file is available from $CCDPACK_DIR in the file ccdpack_ex7.csh.
Automated reductions are also possible for IR array data. The following script shows how to reduce data that has already been debiassed and uses the object data frames to produce a flatfield.
#!/bin/csh
#
# Initialise ccdpack
#
ccdpack
#
# Clear any existing global parameters.
#
ccdclear reset accept
#
# Convert the glitch file into an ARD file.
#
$CCDPACK_DIR/glitch2ard GLITCH.LIST glitch.ard
#
# Set some global preferences.
#
ccdsetup logto=terminal genvar=true mask=glitch.ard reset accept
#
# Present the darks, H, J and K data to CCDPACK.
#
present target='"^hframes,^darks"' onefilter filter=h modify \
adddark onedarktime darktime=1 biasvalue=0 reset accept
present target=^jframes onefilter filter=j modify adddark \
onedarktime darktime=1 biasvalue=0 reset accept
present target=^kframes onefilter filter=k modify adddark \
onedarktime darktime=1 biasvalue=0 reset accept
#
# Now reduce all that data.
#
schedule in='"^hframes,^jframes,^kframes,^darks"' irflats=true \
execute=true debias=4 spacesave=some reset accept
#
exit
A copy of this file is available from
$CCDPACK_DIR in the file ccdpack_ex8.csh.
CCDPACK