[AstroPy] Reading in wavelength-calibrated spectra

Kevin Gullikson kevin.gullikson.signup at gmail.com
Tue Aug 14 11:10:47 EDT 2012


Hi,

I have some spectra that were reduced in iraf, and I would like to read
them in to python to do some fitting that I already have code for. However,
I am having trouble reading in the wavelength calibration. The spectra are
echelle, and the wavelengths are defined with this thing in the header that
looks like this:

"
WAT2_001= 'wtype=multispec spec1 = "1 32 2 10672.221264362
0.086046403007761 20'
WAT2_002= '46 0. 6.65 26.40 1. 0. 1 5 1. 2046. 10761.5346117191
87.998952480064'
WAT2_003= ' -1.32409633589482 -0.0165054046288388 -0.00680394594704411"
spec2 ='
WAT2_004= ' "2 33 2 10348.8582697 0.083445037904806 2046 0. 34.60 58.07 1.
0. 1'
WAT2_005= ' 5 1. 2046. 10435.4699172677 85.3379030819273 -1.2833101652519
-0.01'
WAT2_006= '53518242619121 -0.0057861452751027" spec3 = "3 34 2
10043.881872825 '
...
"

The numbers give the conversion from pixel coordinates to wavelength
coordinates.
I was wondering if there was a python function that could correctly read
all that in, parse it, and give me a spectrum in flux vs wavelength? I have
tried playing with pywcs but that seems only to work for images?

Cheers,

Kevin Gullikson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20120814/17fbba6e/attachment.html>


More information about the AstroPy mailing list