aburgasser / splat

SpeX Prism Spectral Analysis Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Index error when loading spectrum

davesahman opened this issue · comments

When I try to load one of my spectra, I get an Index Error. I downloaded a spectrum from SDSS to check it wasnt a problem with my spectra and still get the error. I attach as screenshot. I tried to upload the SDSS spectrum but github doesnt allow fits format files.

Any suggestions as to what's going wrong?

Thanks,
Dave

Screenshot 2021-07-07 at 13-46-47 test1 - Jupyter Notebook

SDSS spectra encode the wavelength scale into the header, while SPLAT assumes the wavelength is an axis in the fits file. This is common enough that we have a (completely undocumented) hook to read in SDSS data:

sp = splat.Spectrum(file='spec-4030-55634-0218.fits',instrument='BOSS')