Real Time Extraction for CorMASS:
This page documents a crude
real-time extraction algorithm for CorMASS spectra. The program,
real.c, has the following features:
- It assumes that each spectral order has a second-order
functional shape on the array that is invarient with time
and with the in-slit position of the source. These shapes are
fit independently and the coefficients of the orders are inserted
in the function order(order,y-position). Orders are numbered in the
correct sense (i.e. the longest wavelength order visible on
the array is the 2nd order).
- The input file format is the standard CorMASS two-plane fits
output.
- The routine can operate on either a raw CorMASS fits image or can
difference a pair of CorMASS fits images and operate on the result.
For bright stars operating on a single image will produce a useful
spectrum. For faint stars it is
essential to subtract a sky image of equal integration time
in order for the routine to find the spectrum and extract
it with reasonable signal to noise.
-
real cm054 would extract a spectrum from
a single image
real cm054 cm055 would difference two frames before
extraction.
Differencing two spectra at different slit positions could produce
a satisfying result if the spectra are sufficiently separate
so that the "negative" spectrum falls in the "sky" aperture (see below).
- The routine first searches for the in-slit spectrum location
using the 4th spectral order. It simply determines which in-slit
position has the peak flux when summed along the spectrum.
- Once the in-slit offset is known the routine extracts
the sum of 5 pixels along the slit for each x-pixel location
along the order for each order specified (currently 3rd through
6th order).
- Sky flux is summed from five pixels not contained in
the spectral extraction region. The sky flux region is
10 pixels wide centered on the slit (i.e. spectrum pixels
falling in this region are excluded from the sum).
- The routine produces a diagnostic image called "diag" which
is a raw short integer of read1 and read2. Read1 is set to
zero. Read2 equal to
the original Read2-Read1 image with the spectral orders offset by (order*1000)
and the sky region offset by +9999. The routine
mkfits.c will convert this diagnostic image to a standard fits
image. Here is an example for a bright star.
- The output is written to a file cm###.sp where
### is the frame number of the "signal" image.
This file has four columns
1 2 3 4
-------------------------------------------------
pixel_number spec_flux sky flux spec_minus_sky
pixel number = order*256 + x-pixel-position
- The supermongo script file "sm" contains
some macros to quickly plot the results of the program.
cm ### -- will plot a spectral extraction from
four orders of a single image (I can't
wait to get a formula that converts these
pixel numbers to wavelength...)
cm2 ### ### -- will difference two images and plot.
sky ### -- will plot sky flux from a single frame.
- Here are some examples of what the program can do. The plots
cover orders 3 (top) through 6 (bottom). Short wavelengths
are plotted on the left. Order 3 is basically the H-band.
Order 4 contains the J-band but extends usefully to 1.0 microns
at the right of the plot.
Order 5 covers .83 to 1.15um. Order 6 covers .75 to .95um.
- A whirlgif of HD161903 extracted
at the top, middle, and bottom of the slit. The routine gives
a consistent answer. The horizontal shift is presumably due
to a shift of the position of the source within the slit.
- T-Tauri - look at those emission lines!
- VB10 - note the Ti0 and other broad
features in the 6th order. Here's a blink
between VB10 and HD161903.
- WR2 - One of J.D.'s Wolf-Rayet stars.
- ??? - Mike's mystery source. This was supposed to be a carbon star candidate in the Galactic plane. Looks more like an
HII region.
- Red Quasar - The bright emission line in the
bottom order is redshifted H-alpha.
- T-dwarf - And here it is blinked against HD162208.
- New - blinked against stellar spectrum. - blinked against previous T-dwarf.
- Note that the spectrum of VB10 is so good because
we did a single sky integration off source to remove the
array bias and sky lines to first order. It is possible that
we can difference two slit positions and obtain an equally good - if
not better - result. If the "negative" image
falls outside the spectral extraction region then it will be
subtracted (and thus added) from the positive signal and we
will reap a double benefit.
- Sky lines can also be processed out by removing a column
trimmed average along the slit making it easier to identify
and extract a faint spectrum. Here is code
which implements this trimmed average removal prior to
spectral extraction. It does a much better job of extracting
a faint spectrum from a single frame. I still find that I get
a better looking spectrum if I difference two frames with the
spectrum offset along the slit.
For additional information please e-mail Mike Skrutskie:
mfs4n@virginia.edu.

Last modified Monday, June 13, 2005
Copyright
© 1996-2005 University of Virginia Department of Astronomy.
All rights reserved. Maintained by the
webmaster
|
|