
SKY SUBTRACTION

- Principles :
Using an image of the observed field, reconstructed from spectroscopic
data from a datacube of the same family, the user selects
graphically a zone which is supposed to be empty, and so is able to give
the pure sky spectrum. This region is then translated into a selection
to be made over the spectra set, in fact into the table associated with
all the datacubes which derive from the same raw object datacube. This
selection will be used during the next step (Compute the
sky spectrum) to restrict the
spectra summation over the selected spatial area.
- Use :
- Prepare an image of the field, to be used as a coordinates
reference. For that, from the main menu, click on Analyse,
then on Integrate spectra, and output an image corresponding
to a whole wavelength range spectral integration; use a cosmics
removed datacube as data base, to avoid spatial ghosts due to
cosmic impacts. The datacube chosen must be of the same "family"
as the datacube you will to subtract the sky from; that is, it must be
associated with the same initial fits table.
It is not necessarily the datacube to be sky-subtracted, although this
one is usually a good choice. But you may, after a complete reduction,
discover on a line-only reconstructed image that in the area you
elected as empty, there are some emission blobs. It is then time to
redefine the sky area on this last image, and redo the computations,
starting with the sky subtraction function. For image reconstruction,
see details in the
Analyse data section of this
manual.
- In the main menu, click on Sky, then on
Define sky area; the RTD interface pops up. Click on
File, Open, and chose the image you just computed.
Click on Auto set cut levels to get a better view of the low
levels, and play with the zoom button to make things completely
comfortable.
Click on Select, then on Select an area. A square,
with four conspicuous nodes at the summits, appears. You can move it
(center mouse button depressed), drag a node (left button depressed),
add more nodes (right click). Envelop the empty zone you whish to
choose as the sky area.
- In the RTD menu, click on Select, then on Apply selection
to. In the window which pops up, enter the name of the table
you whish to select. It is usually the table which has been created at
the spectra extraction time, and is associated with all the datacubes
created since that by the various reduction steps already done.
Select the New action, which means that you are going to get
rid of any previous selection. Then click on Accept.
- You may want to enclose in a polygon the object itself, and define
as the clear sky region the outside of the polygon. In such a case,
select the Use area outside polygon option.
- If you want to use as sky area the reunion of several zones,
repeat the above point (no need to close RTD, just drag the previous
polygon to the new location, reshape it, and reselect the table; if
you think there are too many nodes on this previous polygon, erase it
with the [Select]/[Clear selection] function and define a new one by
[Select]/[Select an area]).
But when you are about to Apply selection to,
choose the Join
action, so the previous selection will be kept, and the new zone
added to the previous one(s).
- You may combine at will New, Join, Intersect,
Inside and
Outside to satisfy your needs. For instance, in a field where
appear only two stars, enclose one
of the stars in a polygon, apply selection with New and
Use area outside of polygon; then, enclose the other star in a
polygon, and apply selection with Intersect and Use area
outside of polygon.. Another interesting possibility is to define
two selections on two different images (for instance one reconstructed
from the continuum, the other from lines), and Intersect them.
- To Check the final selection, it is a good idea to plot
the selected table, just to be sure you did not get lost in the
Inside/Outside/Join/Intersect jungle...
In the main menu, use the Display item, choose
Spectrum and table. Then File, Plot table. Give
the name of your table, and chose X taken from column = A,
Y taken from column = D.
If you like to see the lens numbers, choose Label each data point
using column
= no, and click Plot with label instead of Plot.
- Important warnings :
- RTD is unable to make a selection over a very small area,
due to the fact
that each polygon summit has a circular "dead" neighbouring
where no point can
be selected. If the summits get very close, their neighbourings
overlap and no place is left for any lens to be selected.
Approximately ten lenses must be enclosed within the
polygon to get them selected.
- Once the table has been selected (i.e. restricted)
by the above
described function, it remains so. If you want to regain access
to the complete son datacubes, you must deselect the table, using
the [Tools]/[Table access]/[Table select] function. Otherwise,
some selection-aware functions may perform on the fraction of the
datacube corresponding to the table selection. Not all functions
take into account table selection, but this is a risk.
- Principles :
The "mean" spectrum of the area selected in the previous step is computed,
and will become the sky spectrum from the corresponding frame.
- Use :
- Click on Sky, then on Compute sky spectrum. The input
window pops up.
- Enter the Input datacube, which is usually the
datacube with cosmic rays removed, and the Output spectrum name,
that is the name of the resultant sky spectrum. You may type them,
or use the browse
icon at the end of the field, or drag and drop them from the
Reduction folder window. Click then on Accept.
- Options :
- Method :
You may choose Histogram, Median, or Mean. The
two last do what you expect, and the first one (default) uses an
algorithm which, to make short a long story, computes the common part
of the spectra in the area, which is by definition the true sky
spectrum.
- Save values :
All the input values (files names, coordinates) are saved,
and become the new default values for this user. They can
be recalled at will, and are used each time the
Compute sky spectrum window is opened.
- Recall values :
The values (files names, coordinates) saved by the user,
are loaded to the various input fields.
- Default values :
The input fields are set to the general default values;
for instance, the file names are set to blank.
- Principles
Straightforward : the sky spectrum, evaluated from the same frame,
is subtracted from every spectrum of the input
datacube. This datacube must have been flat-fielded before.
- Use
- In the main menu, click on Sky, then on Sky
subtraction; the Subtract sky spectrum window pops up.
- Enter the name of the Input datacube from which you will
to subtract the sky spectrum, the name of the file holding the
Sky spectrum (which you obtained in the preceding step
Compute sky spectrum), and the
name of the output sky-subtracted datacube
which will be created.
- Click on Accept.
- Parameters
- Normalisation factor : provided here just to allow the
formerly hopeless astronomer to use a sky spectrum computed on another
frame, with a different exposure time; not very clean,
but as long as nobody knows ;-)... Should stay at 1.0 for "normal"
operation...
- Debug :
the program is switched to verbose mode, and more
informations are recorded into the history file (click on
Getting started in the left menu for details).
- Save values :
All the input values (files names, coordinates) are saved,
and become the new default values for this user. They can
be recalled at will, and are used each time the
Subtract sky spectrum window is opened.
- Recall values :
The values (files names, normalisation factor) saved by the user,
are loaded to the various input fields.
- Default values :
The input fields are set to the general default values;
for instance, the file names are set to blank.

Back to top of chapter.
|
Back to OASIS home page.
|

Last update: 11/01/1999. Send comments to
martin@cfht.hawaii.edu
