[AstroPy] Reading in wavelength-calibrated spectra

Kelle Cruz kellecruz at gmail.com
Tue Aug 14 11:35:29 EDT 2012


i'm guessing it's probably gonna be easiest to export spectrum from IRAF to
plain text (wspectext) and just use asciitable to read in.

kelle

On Tue, Aug 14, 2012 at 11:10 AM, Kevin Gullikson <
kevin.gullikson.signup at gmail.com> wrote:

> 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
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
>
>


-- 
Kelle Cruz, PhD — http://kellecruz.com/
917.725.1334 — Hunter ext: 16486 — AMNH ext: 3404
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20120814/d49e4ec3/attachment.html>


More information about the AstroPy mailing list