Stage 1: co-add into groups
Stage 1: co-add into groups.
With reference to your nightlog, select the _wce files that
consitute each "group" of observations. A group would typically be an
observation of one target at one instrument configuration.
Inspect each of these frames and check for any obvious defects. If
you discard and frames, be sure to discard the same number of
main-beam and offset-beam frames. The main-beam frames will have 0,0
as the RA and DEC offsets in the nightlog, the offset-beam frames will
typically be 11.74 arcsec away from 0,0. If you were nodding to blank
sky, the offset will be much larger, and the offset-beam frames will
also be SKY frames.
Form a group frame which consists of the sum of all the main beam
observations minus the sum of all the offset beam observations.
Do this for each group of observations you are going to reduce at
this time. You should at least have a standard star group and a target
group at this point.
In these group files, the "sky" areas should be relatively free of
sky-lines. Sky line residuals up to a few tens of counts can be
removed (see later). You should have a positive band acorss the image
representing the positive image of the spectrum of the target. If you
were nodding along the slit, you should also have a negative band
across the image representing the offset-beam negative image of the
If your observations spanned a long time interval, ie a large
change in position of the telescope as you tracked the object across
the sky, then you should consider adding your observations into
"sub-groups" of an hour or so's data, extracting the spectra from each
of these seperately, then doing a cross-correlation to determine any
shift due to instrument flexure, and applying this shift before adding
the spectra together
If you wish, at this point, you can subtract off the residual sky
lines. Use your favourite DR package. You should mask off the areas of
the image containing the target spectra, then have the package fit a
low order polynomial to the residual sky flux in each column. The
polynomial fit should then be subtracted from the whole image,
including the areas where the target spectra are, obviosuly.