---------- Forwarded message ----------
From:
Philip Muirhead <muir...@astro.cornell.edu>
Date: Sun, May 10, 2009 at 12:39 PM
Subject: TSPEC Extractor
To: Kelle Cruz <
ke...@astro.caltech.edu>, Jason Melbourne <
jm...@caltech.edu>, "
and...@ipac.caltech.edu" <
and...@ipac.caltech.edu>
Hi Kelle, Jason and Andreea
I wrote an IDL program that does a extraction on TSPEC images for
point sources that you may be interested in playing with:
http://astrosun2.astro.cornell.edu/~muirhead/tspec_extract.zip
It works by walking along the spectra, rectifying the tilted slit with
a 2D spline, and fitting a Gaussian with a fixed center and width plus
an offset to account for OH lines. You can calibrate the centers and
widths of the Gaussians with your science target, or you can use a
bright star to figure it out if your science targets are faint.
You use tspec_calibrate to get the centers and widths of the Gaussian
model (on a bright star) then use tspec_extract to extract your
science. OR you can just run tspec_extract and it will use the
science target for the calibration, but only do this if your stars
have SNR>10 or so in each pixel.
The header of
tspec_extract.pro should explain everything. Although,
I'm new at writing general purpose software, so it might read poorly.
What's novel here is 1) the running rectification of the slit and
subsequent subtraction of OH lines and 2) a method for removing cosmic
rays and detector anomalies by sigma clipping the Gaussian fit.
You feed it one exposure at a time, and you have to do the
flat-fielding, bias-subtraction (or median subtraction), and bad-pixel
flagging yourself (you can also use sigma_filter from the astro
library for bad pixels). If you nod and subtract, the calibration of
the centers and the widths will be done on the positive star. You can
run this on several images at various points along the slit, shift
them to overlap, and add/filter as you see fit.
Also, it doesn't do any telluric calibration. For that I suggest the
SPEX group's telluric calibration IDL program, adapted for use with
any near-IR spectrum:
http://adsabs.harvard.edu/abs/2003PASP..115..389V
I will slowly be adding more routines to my website
(
astro.cornell.edu/~muirhead) to deal with the electronic anomalies in
the images. Terry Herter has been developing models for the crosstalk
and capacitive coupling that causes all the weird patterns on the
detector, which I'm working on incorporating into IDL. So stay tuned.
-Phil
ps - If you do end up trying this, I am very interested in feedback.
Especially if there are hidden dependencies that I missed.
Caltech, Dept. of Astronomy