CASPIR produces images of the infrared sky in one passband at a time. These
observations normally consist of a number of object and sky frames acquired
through the execution of a DO file. Typical observing sequences would:
1) Record a few frames of one object with small spatial offsets between
frames to counter ghosts and bad pixels, and to improve spatial sampling
of the images.
2) Record many frames of the same object with a dither pattern of
offsets to build up long exposures.
3) Record spatial mosaics of dithered sets of images with limited overlap
between frames to cover large regions of sky.
These observing sequences naturally lead to the definition of a
dataset
as the set of related observations of a given object in one filter.
In the extreme case, a dataset may contain only a single exposure.
Different datasets may require different reduction strategies, depending on
the nature of the observing sequence employed. The reduction of most
datasets will follow the path:
1) Create BIAS and DARK frames, and linearize object and sky frames.
2) Create dome FLAT frames, and remove pixel-to-pixel sensitivity variations.
3) Create background SKY frames, and subtract sky background from object frames
.
4) Define relative spatial offsets between each object frame in the dataset.
5) Combine all object frames in a dataset into a single image suitable for
analysis, using bad pixel masks to exclude bad pixels.
Users are cautioned that infrared imaging datasets often present a
greater data reduction challenge than optical CCD images both due
to the superior performance of optical CCD detectors (lower dark
current, read noise, and pixel-to-pixel sensitivity variations)
and especially due to the extreme background-limited nature of
most infrared imaging observations. The results at each step in
the reduction process should be carefully examined and problems
understood before proceeding. Many problems can be solved by the
exclusion of bad images from the data sets.
The reduction procedures described here use the local MSSSO CASPIR
package running in IRAF. The procedures (and this description) are
based heavily on the SQIID package and its documentation (written by
Mike Merrill at NOAO), but have been adapted at MSSSO for CASPIR
reductions. The CASPIR package is available via ftp to
merlin.anu.edu.au. You can retrieve it by typing:
Then put the following lines in your loginuser.cl file.
These define the IRAF variables caspirdir and caspirdb to
point to your CASPIR package directory and a convenient database
directory, respectively, then define the CASPIR package and load it
automatically on starting IRAF. You also need to include the line
in your .cshrc file. This lets you handle a larger number of
files in forming mosaics.
CASPIR writes FITS format data files at the telescope which can be
reduced in this form if your IRAF handles FITS files directly.
Otherwise, the FITS files must be converted to IRAF .imh files
before reduction can begin. To do this, restore all the data files for
one night to a disk directory, start IRAF, and type:
to convert FITS files to IRAF .imh files and remove the FITS files from
disk.
In any event, you need to create a list of all the data file names so type:
if you are working directly on the FITS files.
List processing is fundamental to efficient data reduction, and will be used
extensively in what follows. The
The following examples illustrate the capabilities of this task:
To generate a file containing a sequence of five filenames starting with
ir153, incremented by two, and having the suffix t, type:
Then tfiles contains the names:
as can be seen by typing any one of the following:
To select all frames in the list file allfiles recorded with
method 2, and write the filenames to a new list file m2files
with a t appended, type:
To select all frames in the list file allfiles obtained with the
Kn filter, and write the filenames to a new list file knfiles
with a t appended, type:
To select all frames in the list file allfiles obtained with the
HK grism, and write the filenames to a new list file hkfiles
with a t appended, type:
To select all frames in the list file allfiles with a header
exposure time string of
To select all dark frames in the list file allfiles, and write
the filenames to a new list file dfiles with a t appended,
type:
Two more general purpose tasks are mentioned before we begin the
reduction:
Proper data reduction requires accurate correction for the electrical
offsets introduced by the data acquisition system (BIAS frames), the
small additive effects of internal illumination, charge generation,
and charge leakage (DARK frames), the large additive effects of sky
illumination (SKY frames), and the multiplicative effects of position
dependent pixel sensitivity (FLAT frames). Implicit in this is the
need to correct for non-linearities in the responsivity of the
detector array.
BIAS and DARK calibration frames are required for the linearity
correction, so their creation is the first step in the data reduction
process.
BIAS frames are defined to be dark exposures of the minimum duration
possible for a given read-out method. The nature of the CASPIR array
prevents us obtaining zero length exposures. BIAS frames will
normally have been recorded with the
averages the three raw bias frames ir00[1-3], and writes the result to
the file bias.
The
DARK frames should be obtained for each exposure time used during a
night. These are used in the linearity correction routine to remove
dark current and exposure time dependent electrical offset effects.
The same stability concerns associated with BIAS frames also apply to
DARK frames. Cautious observes may intersperse DARK frame
measurements with object frames. Sets of DARK frames of the same
exposure time can also be combined with the
could be used to average four 5 sec DARK frames and write the result
to the file dark5.
The response of the CASPIR detector array to light has a quadratic
form which must be allowed for before accurate correction of other
additive and multiplicative effects can be achieved. CASPIR data are
linearized by subtracting a BIAS frame from the data, applying the
quadratic correction, subtracting a linearized DARK frame, converting
the data units from ADUs to electrons, dividing by the exposure time
to produce a signal rate in electrons/sec, and flipping the image
vertically to match the orientation on the data acquisition displays.
A convenient environment in which to conduct this and the remainder of
the basic imaging reduction is provided by the
To linearize all the images obtained with a 5 sec exposure time, first
form a list file of the image filenames using the
Now use
The flags linear, flatten, skysub, fixbad,
mosaic, coord, display, and phot define the
reduction steps that will be performed. The remainder of the
parameters are used in the execution of these basic functions. The
parameters relevant to the linearization of a particular dataset are
dark which specifies the single DARK frame to be used for the
entire dataset, and bias which specifies the single BIAS frame
to be used for the entire dataset. Note that the DARK frame must have
the same exposure time as the objects, so observations of different
exposure times must be linearised separately using multiple calls to
the
It is most convenient to linearize all observations obtained during a
given night at this stage of the reduction. A typical sequence might
be:
The creation of suitable FLAT and SKY frames is more difficult than
for BIAS and DARK frames, but they are crucial to the quality of the
final images. Different approaches may be necessary for different
types of CASPIR imaging data. Compared to optical band CCD
observations, most broadband observations with CASPIR are extremely
background limited. Furthermore, the background in the near-infrared
is variable at many temporal and spatial scales. Since infrared
sources are often much fainter than the broadband sky background, very
precise removal of the sky signal is required. Narrowband CASPIR
images with both pixel scales and J images with the 0.25'' pixels
have lower sky backgrounds and present different data reduction
challenges.
The primary goal in flatfielding images is to correct for
pixel-to-pixel sensitivity variations across the array, so that the
relative intensities of objects imaged in different parts of the array
are accurately recorded. Flattening the sky background is a secondary
effect, although this should also be achieved if the array responds
similarly to stellar continuum light and sky emission. Two
flatfielding strategies are possible: A set of sky images can be
combined to form a sky FLAT frame, or images of an illuminated screen
within the dome can be combined to form a dome FLAT frame. Better
photometric accuracy is achieved for CASPIR data using dome flats
because telescope thermal emission is removed by differencing
lamp on and lamp off pairs. The energy distribution of the
lamp probably also matches that of stars better than the sky
background, which is dominated by line emission shortward of about 2.2
Dome flats should be measured in sets of lamp on and lamp off
pairs for each filter and image scale required. Dome FLAT frames can be
created from linearized data with the
averages the lamp on frames ir007-11 and the lamp off frames
ir008-12, takes their difference, then normalizes the median pixel value of
the difference to unity, and writes the resulting dome FLAT frame to the file
flat_kn.
The
The comb_opt parameter should be average if the number of
on or off exposures is less than about 5 and median if greater
than about 5. The statsec default should generally be
satisfactory.
All frames obtained with a particular filter and image scale can be
flatten together by unsetting the linear flag in
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
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
The subtype parameter in
The destripe parameter in
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
or by explicitly listing the file names, e.g:
A typical
For single observation data sets, or minimally overlapped mosaics, it
is necessary to correct bad pixels by interpolation. In heavily
overlapped mosaics, bad pixels can be allowed for when these mosaics
are combined. However, in both cases it is necessary to attach a bad
pixel file to each image before correction can be achieved.
Bad pixels can be interpolated using the
If there is a comment line in the file containing the word
untrimmed, the coordinates of the bad pixel regions apply to the
original image, rather than a sub-section. The file
caspirdir$caspir.bad contains the standard CASPIR bad pixel list in
this format. It is possible that users will wish to add other bad
pixels to their own versions of this list.
Mosaics are combined with the powerful
The file ir001 can be any CASPIR data file. It is used as a
template to define the size of the bad pixel mask image. Good pixels
have a value of 1 and bad pixels have a value of 0 in the bad pixel
mask image.
The
To apply the appropriate bad pixel correction using the
If all else fails, use
The many hot pixels in the CASPIR array often leave a ``snow'' of
residual hot and cold pixels in the sky subtracted images. This is
especially serious at J where the sky level is initially lower.
These hot and cold pixels occur at random locations so cannot be
removed using a fixed bad pixel mask. The
Mosaicing is the most complex part of infrared imaging data reduction.
Several crude levels of mosaicing are provided in the
Selecting mostype=blind causes the object images in the dataset
to be combined at their nominal offsets from the base position, as
specified in the DO file used to acquire the data and as recorded in
the image header entries `offra' and `offdec'. This type of mosaic is
generally useful for a first look, or for minimally overlapped mosaics
where blind offsetting is all that can be achieved.
Selecting mostype=manual causes the object images to be display
at their nominal offsets so that the user can mark the location of a
suitable reference point with the image display cursor. The reference
point should be located within each of the images in the dataset, but
need not correspond to a particular object. No automatic centroiding
is performed on the marked position, so this option is most suitable
for noisy images where the centering determination is subjective. The
xoffset and yoffset parameters specify the position of the
reference object relative to the base position of the mosaic.
Selecting mostype=auto is useful if there is a moderately
unresolved reference object in the mosaic, and this source is in each
object image of the dataset. This will often be the case for dithered
observations of a single object. When mostype=auto is selected,
the nominal offsets are corrected by centroiding on the reference
object in each frame using the IRAF
Observations obtained with the radio.do pattern, described
above, require special treatement to estimate the nbL image offsets
from offsets determined from interspersed Kn images of the same
object. This is achieved by selecting mostype=radio.
These options provide a convenient way of assessing mosaiced data at
the telescope and of gauging the result of the data reduction steps
performed so far, before committing significant effort to the more
involved full mosaicing.
A world coordinate (RA and DEC) system can be defined for a mosaic
image produced with the
If the coord and display flags are set when
The
Once the world coordinate system grid has been defined, RA and DEC positions
of selected objects can be obtained by typing
Use the image display cursor to select objects and type any key to print the
coordinates. Exit
Introduction
ftp merlin.anu.edu.au
log in as `anonymous'
use your email address as password
cd pub/peter/
get caspir.tar.gz
bye
set caspirdir = ``home$scripts/caspir/''
set caspirdb = ``home$scripts/caspir/database/''
task $caspir = "caspirdir$caspir.cl"
caspir
unlimit descriptors
Preparations
files *%.fits%% > allfiles
rfits @allfiles//.fits * @allfiles
delete @allfiles//.fits
files *%.fits%% > allfiles
csplist task is a convenient list
generation utility for the reduction of CASPIR datasets. The csplist
task has the following parameters.
I R A F
Image Reduction and Analysis Facility
PACKAGE = caspir
TASK = csplist
keyword = list List key type
value = kn List key value
images = @ifiles List of images to search
(first_i= ir001) First image in list
(number = 21) Number of images in output list
(delta = 1) File number increment
(suffix = ) File name suffix
(mode = q)
csplist list first=ir153 num=5 delta=2 suffix=t > tfiles
ir153t
ir155t
ir157t
ir159t
ir161t
type tfiles
head tfiles
tail tfiles
csplist method 2 images=@allfiles suffix=t > m2files
csplist filter kn images=@allfiles suffix=t > knfiles
csplist grism HK_grism images=@allfiles suffix=t > hkfiles
5.0, and write the filenames to a new
list file 5files with a t appended, type:
csplist time 5.0 images=@allfiles suffix=t > 5files
csplist dark images=@allfiles suffix=t > dfiles
cspdisplay sequentially displays a list of images and
is useful for quickly gaining a feel for the quality of a dataset.
csppeek sequentially displays a list of images after a
specified dark frame has been subtracted from each frame. This task
is useful for quickly assessing raw data that are dominated by the
pedestal pattern until a dark frame has been subtracted. These tasks
have the following parameters:
I R A F
Image Reduction and Analysis Facility
PACKAGE = caspir
TASK = cspdisplay
images = List of input images
(zscale = yes) Autoscale display?
(z1 = ) Minimum level to be displayed
(z2 = ) Maximum level to be displayed
(statist= no) Calculate statistics?
(movie = no) Continuous movie mode?
(verbose= yes) Verbose output?
next_ima= yes Next image?
(imglist= )
(mode = ql)
I R A F
Image Reduction and Analysis Facility
PACKAGE = caspir
TASK = csppeek
images = ir168 List of input images
dark = ir366 Dark frame to use
(zscale = yes) Autoscale display?
(z1 = 0.) Minimum level to be displayed
(z2 = 6500.) Maximum level to be displayed
(verbose= yes) Verbose output?
next_ima= yes Next image?
(imglist= )
(mode = ql)
Forming Bias and Dark frames
Bias Frames
CASPIR/BIAS command. The
stability of BIAS frames over the duration of a night is questionable,
so caution dictates that sets of BIAS frames be recorded at the
beginning and end of each night. Intermittent problems with reading
out the array make it advisable to record several bias frames. The
quality of these should be checked visually using the csppeek
task, and acceptable frames combined using the cspcombine task.
For example,
cspcombine ir001,ir002,ir003 bias average
cspcombine task has the parameters listed below. The
comb_opt parameter defines how the frames are combined. This
should be average if the number of bias exposures is less than
about 5 and median if greater than about 5.
I R A F
Image Reduction and Analysis Facility
PACKAGE = caspir
TASK = cspcombine
images = ir001,ir002,ir003 List of raw input images
output = bias Combined output image
(comb_op= average) Type of combine operation
(verbose= yes) Verbose output?
(imglist= )
(mode = ql)
Dark Frames
cspcombine task,
for example,
cspcombine ir004,ir005,ir006 dark5 average
Linearity Correction
redimage task.
The redimage task is a multifunction procedure which operates
along the lines of the ccdproc task in noao.imred.ccdred.
redimage overwrites the input images at each stage of the
reduction so it is useful to make a copy of the raw data files before
proceeding. This can be done by typing
imcopy @allfiles @allfiles//r
csplist task
by typing:
csplist time 5.0 images=@allfiles > 5files
epar to set the redimage parameters as listed below.
I R A F
Image Reduction and Analysis Facility
PACKAGE = caspir
TASK = redimage
(images = @5files) List of CASPIR inputimages
(mosfile= ) Mosaic filename
(linear = yes) Linearize data?
(flatten= no) Divide by flatfield?
(skysub = no) 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= ) Flatfield frame to use
(statsec= [50:200,50:200]) Image section for computing statistics
(obstype= all) Type of observation made
(subtype= all) 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)
redimage task. Run redimage by exiting epar
using the :g command. redimage makes a copy of the
linearised data in files with the suffix ``l'' appended. These can be
used to replace the working files if subsequent processing steps must
be repeated, e.g., by typing:
imdelete @5files
imcopy @5files//l @5files
csplist time 0.3 images=@allfiles > 03files
redimage images=@03files linear+ bias=bias dark=dark03
csplist time 5.0 images=@allfiles > 5files
redimage images=@5files linear+ bias=bias dark=dark5
Flatfielding
m.
cspflat task. The inputs
required are a list of lamp on frames, a list of lamp off frames,
and an output filename. For example,
cspflat ir007,ir009,ir011 ir008,ir010,ir012 flat_kn comb_opt=average
cspflat task has the parameters listed below.
I R A F
Image Reduction and Analysis Facility
PACKAGE = caspir
TASK = cspflat
ons = ir007,ir008,ir009 List of lamp ON frames
offs = ir008,ir010,ir012 List of lamp OFF frames
flat = flat_kn Output flatfield frame
(comb_op= average) Type of combine operation
(statsec= [50:200,50:200]) Image section for calculating statistics
(verbose= yes) Verbose output?
(imglist= )
(mode = ql)
redimage, setting the flatten flag, and setting the
flatfile parameter to the appropriate FLAT frame filename. Run
redimage from the command line or by exiting epar via
the :g command. redimage makes a copy of the flattened
data in files with the suffix ``f'' appended. A typical sequence might
be:
csplist filter j images=@allfiles > jfiles
redimage images=@jfiles linear- flatten+ flatfile=flat_j
csplist filter h images=@allfiles > hfiles
redimage images=@hfiles linear- flatten+ flatfile=flat_h
csplist filter kn images=@allfiles > knfiles
redimage images=@knfiles linear- flatten+ flatfile=flat_kn
Sky Subtraction
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.
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.
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.
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.
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
delete tfiles
cat > tfiles
ir054
ir055
ir056
ir057
ir058
ir059
ir060
^D
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)
Fixing Bad Pixels
noao.proto.fixpix or
imedit tasks. Bad pixels are specified to these routines in an
ascii bad pixel file which is described in the help instruments
man pages. The file consists of lines describing rectangular regions
of the image. The regions are specified by four numbers giving the
starting and ending columns followed by the starting and ending rows,
for example,
# CASPIR - untrimmed
25 25 111 111
108 108 87 113
256 256 1 256
1 256 1 1
185 190 240 245
imcombine task which
uses more sophisticated bad pixel mask images. These are associated
with an image through the `BPM' header entry for the image. A bad
pixel mask image is a pixel list file (.pl extension). It is treated
like an image file and can be viewed with display and altered
with imedit etc. A bad pixel mask image is created from an
ascii bad pixel file using noao.imred.ccdred.badpiximage. The
following example shows how to form the bad pixel mask image
caspir.pl from the bad pixel file caspir.bad.
noao
imred
ccdred
cp caspirdir$caspir.bad .
badpiximage caspir.bad ir001 caspir
imcopy caspir caspir.pl
imdelete caspir
cspmask task can also be used to create a bad pixel list
file and a bad pixel mask image directly from a CASPIR image
(typically a FLAT frame) by defining upper and lower rejection
thresholds. The epar listing for cspmask is shown
below.
I R A F
Image Reduction and Analysis Facility
PACKAGE = caspir
TASK = cspmask
input = sflat_kn Input images
output = newcaspir.pl Clipped output images
lower_li= 0.8 Lower limit for in/exclusion
upper_li= 1.2 Upper limit for in/exclusion
(in_valu= 1.) Replacement value inside range
(out_val= 0.) Replacement value outside range
(section= [*,*]) Image section for replacement
(trimlim= [0:0,0:0]) trim limits around edge
(verbose= yes) Verbose output?
(outlist= )
(mode = ql)
redimage task, set the fixbad flag and nominate the type
of correction and the bad pixel filename using the badtype and
badfile parameters. badtype=interpolate causes
fixpix to be used to interpolate over bad pixels.
badtype=mosaic causes the bad pixel mask image filename to be
associated with each object image, but actual correction of bad pixels
is deferred until the mosaic is combined. The badfile parameter
should not include the file extension (.bad or .pl).
redimage will append this depending on the type of bad pixel
correction selected. Consequently, it is advisable to maintain a
.bad and a .pl copy of each bad pixel file used.
imedit to interactively `fix' bad pixels
by defining a circular aperture and replacing the pixel values within
the circle, e.g.:
imedit input output radius=5 width=5
Removing "Cosmic Rays"
cspclean task uses
the IRAF cosmicrays task to first clean the hot pixels assuming
they look like cosmic rays, then invert the image, and clean the cold
pixels again as if they were cosmicrays. Any automated cleaning
routine should be used with caution so some experimentation is
required to set the threshold levels to appropriate values. This can
be done using the ``training'' features build into cosmicrays.
Consult the cosmicrays documentation (by typing help
cosmicrays) for more details. A typical epar listing for
cspclean is shown below.
I R A F
Image Reduction and Analysis Facility
PACKAGE = caspir
TASK = cspclean
images = @tfiles List of input images
(outputs= @tfiles//c) List of output images
(coldpix= yes) Also clean cold pixels?
(train = yes) Train cosmic-ray/object discriminant?
(thresho= 0.2) Cosmic ray detection threshold above mean
(fluxrat= 7.) Flux ratio threshold percentage
(zscale = yes) Autoscale display?
(z1 = ) Minimum level to be displayed
(z2 = ) Maximum level to be displayed
(display= no) Display cleaned images?
(verbose= yes) Verbose output?
(imglist= )
(mode = ql)
Preliminary Mosaicing
redimage
task. Discussion of full interactive mosaicing is deferred to
Mosaicing . To mosaic a dataset using the redimage
task, set the mosaic flag, enter the mosaic output filename in
the mosfile parameter, and define the mosaicing type using the
mostype parameter.
proto.imcntr task. The
redimage parameter cboxsize defines the size of the
centroiding box used. This option produces excellent results for
suitable datasets with a moderately unresolved reference object. Some
care should be exercised in deciding whether centroiding has been
successful. This can usually be gauged from the appearance of
off-center stars in the mosaic. The xoffset and yoffset
parameters specify the position of the reference object relative to
the base position of the mosaic.
Coordinate Overlays
redimage task by setting the
coord flag. The coordinate system is defined from the base
position of the mosaic stored in the image header entries meanra
and meandec, and the maximum RA offset and the minimum DEC
offset used in combining the mosaic and stored in the mosaic header
entries moffra and moffdec when redimage forms the
mosaic.
redimage is run, an RA and DEC coordinate grid is overlaid on
the mosaic image when it is displayed. This may be helpful for
identifying objects in large mosaics and for determining the scale of
a mosaic.
images.tv.wcslab task can be used to overlay the world
coordinate grid at any time when the mosaic image is redisplayed.
Note that this does not work with SAOIMAGE under Solaris 2, and the
wcslab command must currently be issued twice when using the
XIMTOOL display under Solaris 2.
rimcursor wcs=world
rimcursor by typing <cntrl>d with the cursor in
the image display.