
SPECTRA EXTRACTION MASK CREATION

The wavelength reference tables are provided with XOasis, and are
stored in a special directory. First use this function to make a
work copy into you work directory, so that you will be able to
try modifications without impairing basic data integrity.
Principles
- The special micropupil frame is used for that; it has been
obtained with OASIS set to the spectroscopic
configuration, but with the grism and the beam steerer
removed from the optical path.
- The background noise is computed, and a suitable low
threshold is applied to the frame.
- The micropupil images are detected, and a gaussian fit
gives the center of each image.
- The cross-dispersion profile of each spectrum is evaluated from
the mean profile of the micro-pupils integrated in the dispersion
direction and the local actual width of the profile.
- A special algorithm is used to compute the lens array
characteristics and the distorsion coefficients of the
spectrograph optics.
- The values obtained are stored in a new table, which is
the Mask table, to be used later to extract the
spectra, after it has been completed in forthcoming steps.
Use
- Click on Mask in the main menu, then on
Search lenses.
- Fill in the Input micropupil frame (find its name in the
Observation Logbook)
and Output mask table (use some nice clear
significant name like {scenario name}mask or
mask{scenario name}) input
fields. You may want to use the "Browse folder" icons at the
end of the zones, you may also drag and drop a file from the
reduction folder.
- Click Accept to start the process, Cancel to leave
without any action.
- The procedure should find 1125 +/- 5 lenses (displayed as
centers of classes).
The distortion center should be near [1050,1050] pixels and the
distortion parameter should have a small value
(something like 7.e-9). The calculated array step should be near
57 pixels and the lens position angle near +/- 6.6 degrees.
Finally the RMS residual of the fit should be of the order of 1
pixel or less. If any of the displayed values are wildly different
from this ones, check the input file and the resulting table.
Note also that the [display result] button will display the lenses
positions : you can thus check for missing lenses if any.
Options description
- Debug :
This switches the program to verbose mode, and more
informations are recorded into the history file (see section
[Start] in the left menu).
Action buttons
- Save :
All the input values (files names, coordinates) are saved,
and become the new default values for this user.
- Recall :
The input fields are reset to the last saved values.
- Default :
The input fields are reset to the general defaults;
for instance, the file names are set to blank.
- Accept, Cancel, Help do what you think.
Principles
- A nice proprietary algorithm is used to take care of noise,
emission lines, and so on...
- Transverse scans of the spectra pattern allow to trace
the spectra crossings along each scan line.
- A local (see preceding paragraph) profile fit is performed
on each line to find the position of each spectrum ridge.
Use
- Click on Mask in the main menu, then on
Find maxima.
- In the window which pops up, fill in the Input flat field
frame and Output maxima data file zones;
you may want to use the "browse folder" buttons at the end of
the zones, you may drag and drop a file name from the
reduction folder. One usually chooses a name which is a
close relative of the one of the mask table, replacing the
"mask" substring by "max".
- Click Accept to start the process, Cancel to leave
without any action.
- The program must detect a large number of maxima
(around 100000 with the default value of 5 lines per step).
Check also the threshold value; it depends on the flux level of
the exposure, a typical value being 1000 for a 20000 counts maximum
level.
Finally the fraction of rejected points should be quite small,
at worst a few percent. In case of doubt, you can play with the
[search only one line] button and display the fit with the
[display result] button.
Note that some maxima are not fitted because they are above the
threshold; note also that the wings of the profile are not well
fitted. Only the coordinate of the crest is important at this point,
and a few missing values will not affect the final results.
Options description
- Line step :
You may choose here the step for the scan lines across the
spectra pattern.
For instance, "5" means that the scan is performed
once every 5 lines in the frame. This is a good value, and
it is the general default.
- Debug :
This switches the program to verbose mode, and more
informations are recorded into the history file (see section
[Start] in the left reduction menu).
- Search only line ... :
The scan is performed on this particular line only.
- Save values :
All the input values (files names, lines) are saved,
and become the new default values for this user.
- Recall values :
The input fields are set to the last saved values.
- Default values :
The input fields are set to the general defaults; for instance,
the file names are set to blank.
Principles
This function adjusts the optical parameters of OASIS
spectrographic stage so that, for a regularly spaced set of
wavelengths lambda inside the scenario limits,
a ray of wavelength lambda emitted
by lens N will end on spectrum N, as detected by
the previous Find maxima function.
Use
Click on Mask in the main menu, then on Create Mask;
you must before have used successfully the [Search
Lenses] and [Find Maxima] functions.
The program fits a model of the spectrograph to get precise values
of optical parameters (position of the beam steerer,
grism, lens array, camera and collimator distortions).
It uses the lens positions derived by [Search lenses],
the positions of the continuum maxima obtained by [Find maxima]
and a comparison between the true positions of the selected
lines in the reference calibration table and the measured ones
in the calibration exposure. The key parameter is the final RMS
residual displayed at the end of the process; it should be less
or equal to 0.1 pixel. A significantly larger value
(e.g. 0.25 pixel) indicates a problem. In that case the user
should look at the data. Check that all the important lines are
present in the reference table: if some are missing, edit the table
to add them. The presence in the table of very faint lines may
also lead to some difficulty. There is a flag (column MASK) in the
table to set or unset lines for the mask creation process.
Just flag it to 1 (use) or 0 (skip) and rerun the mask creation.
Another helpful value to check is the number of rejected points;
it should be less than a few percent. Finally the exit status of
the routine should be 0. If not, the routine has failed to converge
or you required too much precision (the default value of 0.01 is
usually good enough if you do not want to spend nights and days
waiting for the iteration process to end).
A visual look at the quality of the fit is given by the [Plot mask
and max] function described in the next section of this page.
You can simultaneously plot the full mask and
max (be prepared to a long display time on a slow machine), which
show up in two contrasting colors,
and then make use of the zoom, or restrict the plot to a narrow
window of e.g. 100 pixels width (keeping the full 2048 pixels,
or at least some large value like 500 or 1000, in y).
Repeating this for the 3 other corners and the center will give you
a reasonable idea of the fit quality; zooming is important as you
are looking for subpixel deviations. For that, click on [zoom] in the
bottom row of buttons, define the window with the left mouse button,
un-zoom by right-clicking.
- Standard parameters
You are invited to enter here :
- The Input Maxima datafile name : this is the
file just created by the [Find Maxima] function.
- The Input Calibration frame name : this is the
GUMBALL spectral calibration lamp frame associated with
the GUMBALL continuum exposure you are using to create
the extraction mask.
- The Wavelength Reference table name : this is to
be selected among the ones offered when you use the
browse icon at the end of the input zone. Names are
self-explanatory, and you must choose a reference file
according to the spectral lamp you used for the
calibration frame.
- The Input/Output mask name : this is the mask
table which has been first created during the Search
Lenses process, and already updated during the
Find maxima step.
- Optional parameters
There is only one : you may specify the Tolerance, that
is the mean cross-dispersion error between a real spectrum
crest and the polynomial path describing this crest.
- Debug parameters
If you check the [Debug] button, you may choose to skip
first, or second, or both, pass(es), or just save the initial
values found before any adjustment is performed. If they are
really crazy, do not hope any result...
Principles
The maxima and the mask "lines" are plotted to allow the user to
check visually the relative fit of the two.
Use
Click on Mask in the main menu, then on
Plot max & mask.
Options description
- Standard parameters
The mask, or the maxima lines, or both, will be plotted,
according to
the (left) Max and Mask buttons beeing checked or not.
- Max : enter here the name of the mask file
pertaining to the current scenario. You may want
to use the browse icon at the end of the input
field, or to drag and drop the file from the
reduction folder.
- Mask : same thing for the mask file
pertaining to the curent scenario.
- Optional parameters
- Full frame plot : as you expected. But this
may be lonnnnnnnnnng on some machines...
- Xaxis / Yaxis : you may chose here to
restrict the plot to a region containing few
spectra, making thus the plot much more readable.
A good idea is to plot three regions, one central,
two on both sides of the CCD frame;
for instance :
[50,50 ; 100,2000], [1000,50 ; 1050,2000],
[1950,50 ; 2000,2000].

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

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