Parameters for "getspec"
An epar on getspec will look like this:
This task will:
1) extract 1D spectra of the supernova,
2) wavelength calibrate them,
3) flux calibrate them,
4) combine them into one spectrum, and
5) copy the final spectrum into the CSP database.
You have to fill in the "images" parameter with the names of the
spectra to be extracted, and the "reference" parameter with the
name of a reference image to be used to define apertures and tracing
for the input images. If you leave "reference" blank, the task will
use the aperture defined with the "lower" and "upper" parameters and
you will have to trace the spectrum interactively.
Then you must fill in the "lamp" parameter with the name of the
comparison lamp obtained at the supernova position, and the
"ref_lamp" parameter which specifies the name of the reference
lamp image for the night (the one you used with the task
The "slit" parameter specifies the header keyword that defines the
slit aperture, and the "slit_nar" and "slit_wide" parameters specify
the narrow slit and wide slit identifiers, respectively. These parameters
are used to separate spectra according to the slit width and apply
an aperture correction to the narrow slit spectra.
Start by editing the snphot$sn.coo file. This is a text file
with a list of supernovae. The first column specifies the supernova name;
the next two columns have precise equatorial coordinates (2000.0) for
each supernova. Enter the name of this file in the "sn_coo" parameter.
The "dir" parameter specifies the directory where you want to
place the final spectra. For CSP spectra you need to set it
The "extinct" parameter specifies the atmospheric extinction
file. This file must match the one you used with the task
"fluxcal". The "sensitivity" parameter is the instrument response
function that you derived with the task "fluxcal".
The "lower" and "upper" parameters define the lower and upper
limits relative to the central pixel of the extraction window
for the supernova when the "reference" parameter is left blank.
The "w1", "w2", "dw", and "nw" parameters are self-explanatory
and define the format for the output spectra.
The final spectra will be named according to the CSP convention.
For this purpose you need to specify the telescope header keyword
in the parameter "telescope", the intrument name in the "instrument"
parameter, the wavelength range (b, g, or r) in the "wavelength"
parameter, and the UT date and time of observation in the "date"
and "obstime" parameters.
The observatory ID must be entered in the "observatory" parameter.
The "ra", "dec", and "equinox" parameters specify the right ascension
declination, and equinox header keywords. This information will be used
to find the name of the supernova in the snphot$sn.coo catalogue file.
The value specified in the "tolerance" parameter will be used to match
the image coordinates with those of the catalogue.
Running the task "getspec"
The task "getspec" will call "apall" and you will have the chance
to interactivelly perform the extractions. If the parameter "reference"
was specified, the aperture window will be taken from the reference
image. Otherwise the aperture will be defined by the "lower" and
"upper" parameters. As usually you can interactively modify the object
and background apertures, the background fitting function, etc.
When extracting supernova spectra try to get rid of the underlying
galaxy as much as possible by modifying the order of the background fit.
The task will prompt you to trace the spectrum. If the "reference"
parameter was specified you can skip this step, in which case the
tracing function will be taken from the reference image. This
is a useful option when the supernova is faint. When the supernova
is bright enough go ahead with the interactive trace fitting.
After extracting and reviewing the object spectra, "getspec" will
extract and identify the comparison lamp by calling the task "reidentify".
This is a non-interactive step. You will get on the screen the result
of the reidentification. Make sure that most of the features were
reidentified and that the RMS of the fit is less than 0.1 pixel.
Then the task will apply the wavelength and flux calibrations to the
The task will proceed to separate the calibrated spectra according
to the slit width and report you the results on the screen.
If more than one wide-slit spectrum is found "getspec" will compute
the average, and plot it for you. You do not need to bother to clean
Then the task will plot the narrow-slit spectra. You can overplot
these spectra to manually clean bad pixels and cosmic rays. This
is necessary if you have two or less spectra of the same object.
If you have 3 or more spectra, the combining operation will perform
a median cleaning. You can still fix any remaining bad pixels on
the final (combined) image.
If the object is already in the supernova list defined in
the parameter "sn_coo", the task will find it according to
the header coordinates and propose you a name for the final
spectrum which includes the SN name, the observed wavelength region,
a correlative number in case you want to save multiple spectra
for the same supernova, the telescope, the instrument used,
and the observation date. If the object is not included in the
supernova list, you have to type its name.
If both a wide-slit and a narrow-slit spectrum were obtained for the
same supernova, the task will compute the ratio of both spectra
and prompt you to interactively fit this ratio with the task fit1d.
The resulting fit will be used to apply a slit width correction to the
Finally, the task will ask you if you want to copy the resulting
spectrum to the directory specified with the "dir" parameter.