The strong and variable near-infrared background has contributions from OH airglow in the J, H, and K bands, moonlight (either directly or reflected off clouds) especially in the J band, and from thermal emission from the telescope and sky in the K and L bands which varies with temperature and humidity. Although the 10-30% variations in background caused by these factors do not strongly limit the S/N of observations (except at K and L for large changes in temperature), they greatly complicate both the creation of mosaics of large regions and accurate surface photometry of objects with extents comparable to CASPIR's field of view. For such observing programs, it is best to obtain sufficient object exposures (and intermixed sky exposures if necessary) to create a SKY frame for each dataset. For programs with single or a few observations of many objects, a sky calibration based on observations of several objects, possibly combined with subtracting a fitted surface from the final image, is the best that can be accomplished. These grouped observations could be treated as one dataset for the purposes of sky subtraction. It is useful to remember that variable airglow can cause the sky background to vary at H by a factor of 2 and at J by 40% on hour timescales.
SKY frames for a dataset are created using the redimage task by
setting the skysub flag, and supplying values to the
obstype, subtype, scale, skyfile, nrun, and
destripe parameters. obstype defines the type of sky
observations in the dataset. obstype=all indicates that all
images in the dataset are to be included in the creation of SKY
frames. obstype=oso indicates that the first image in the
dataset is an object image, and this is followed by a sequence of an
off-source sky image and an object image, ending with an object image.
Only the off-source sky images will be included in the creation of SKY
frames. obstype=sos indicates that the first image in the
dataset is an off-source sky image, followed by object and off-source
sky image pairs, ending with a sky image. Only the off-source sky
images will be included in the creation of SKY frames.
obstype=soos indicates that the dataset consists of sequences of
sky, object, object, sky frames. Only the off-source sky images will
be included in the creation of SKY frames. obstype=osso
indicates that the dataset consists of sequences of object, sky, sky,
object frames. Only the off-source sky images will be included in the
creation of SKY frames. obstype=nod indicates that the dataset
consists of object frames where the object has been nodded between two
locations on the array in an ABBA sequence. Only the B position
frames are used to create the A position SKY frame, and the A position
frames to create the B position SKY frame. obstype=radio,
obstype=gc, and obstype=brc are patterns used for specialised
observing sequences. It is likely that these patterns will include
most observing sequences in user defined DO files. redimage
can be extended to include other sky types if this proves necessary.
Standard star measurements recorded in pairs with the star displaced
on the array can be processed by selecting obstype=standard.
This is a special type requiring exactly two input images. An output
image is formed by subtracting the second (sky) image of the
standard star from the first (object) image of the standard
star. A permanent output file is produced with the name
stdnnn_mmm where nnn is the number of the first standard
star image and mmm is the number of the second standard star
image. This sky-subtracted standard star image can be automatically
processed in each the following steps except that mosaicing and
creating a coordinate grid will be ignored. These steps are not
applicable to this image. It is most likely that users will fix bad
pixels and then measure aperture photometry on the standard star image
after sky subtracting.
The subtype parameter in redimage defines the type of sky
subtraction that is performed. subtype=all defines that all sky
images in the dataset will be included in the creation of a single SKY
frame, which is then scaled to the median pixel value of each object
image if scale=yes, and subtracted from them. This is adequate
for small datasets where the total time span of the observation is
less than about 20 minutes. Larger datasets need to be subdivided
into smaller units, with individual SKY frames. This is achieved by
setting subtype=running. This causes a SKY frame to be formed
for each object image in the dataset from the median of nrun sky
images taken immediately before and after the object image. The
object image itself is not included in the running median. The SKY
frame created for each object image is then scaled to the median pixel
value of the object image, if scale=yes, and subtracted from it.
In each ofthese cases, the last formed sky frame is saved in the file
named ``sky''. subtype=file defines that the file specified by
the parameter skyfile will be used as the sky frame for the
dataset. This frame is scaled to the median pixel value of each
object image, if scale=yes, before being subtracted.
The destripe parameter in redimage determines whether a
residual column bias pattern is to be defined and subtracted from each
image after normal sky subtraction. Usually this will not be
necessary. However, nbL images obtained with readout method 1
suffer from DC drifts in the bias levels of the four output amplifiers
between the object and sky frames that are manifest as a residual
column bias pattern with four pixel period that is often not removed
by normal sky subtraction. When the destripe parameter is set,
redimage determines the shape of this bias pattern by
projecting the image in the column direction to a 1D spectrum, and
then subtracting this spectrum off each row in the image.
Individual datasets must be sky subtracted separately. It is most
convenient to form a list file containing the names of all the images
in the dataset and use redimage to process them. This can be
done using csplist by typing, e.g.:
delete tfiles csplist list first=ir054 num=7 > tfiles ; tail tfiles
or by explicitly listing the file names, e.g:
delete tfiles cat > tfiles ir054 ir055 ir056 ir057 ir058 ir059 ir060 ^D
A typical redimage parameter list for sky subtracting a single
oso dataset in the list file tfiles using a running median
SKY frame subtraction is shown below.
I R A F
Image Reduction and Analysis Facility
PACKAGE = caspir
TASK = redimage
(images = @tfiles) List of CASPIR input images
(mosfile= ) Mosaic filename
(linear = no) Linearize data?
(flatten= no) Divide by flatfield?
(skysub = yes) Sky subtract?
(fixbad = no) Fix known bad pixels?
(mosaic = no) Mosaic image set?
(coord = no) Add coordinate grid?
(display= no) Display result?
(phot = no) Measure photometry?
(bias = bias) Bias frame to use
(dark = dark5) Dark frame to use
(flatfil= flat_kn) Flatfield frame to use
(statsec= [50:200,50:200]) Image section for computing statistics
(obstype= oso) Type of observation made
(subtype= running) Type of sky subtraction to use
(scale = yes) Scale sky to match object?
(skyfile= sky) Sky frame to use
(nrun = 4) Number of frames for running sky subtraction
(destrip= no) Subtract column pattern after sky subtraction
(badtype= mosaic) Type of bad pixel correction
(badfile= caspirdir$caspir) Bad pixel file
(mostype= blind) Type of mosaic to make
(xoffset= 0.) X offset of centroid star from object
(yoffset= 0.) Y offset of centroid star from object
(cboxsiz= 9) Size of automatic mode centroiding box
(radius = 40.) Radius of object aperture in pixels
(buffer = 1.) Background buffer width in pixels
(width = 20.) Width of background annulus in pixels
(verbose= yes) Verbose output?
(imglist= )
(skylist= )
(mode = ql)