Vital |
02/21/2014 05:57PM (Read 2897 times)
|
|
|
Status: offline
Registered: 01/16/2014
Posts: 4
|
Hello everyone! I wonder if anyone could help me with a small issue regarding the 10th release from the telescope sloan.
This would be such a file I am using:
https://www.dropbox.com/s/4sj0w47k0129o55/spec-0394-51913-0472.fits
(which I got from the website: http://dr10.sdss3.org/basicSpectra)
I understand that the issue lies in the fact that the spectrum header does not include any straight forward indication on the number of pixels or images number... However, it is evident that the files have some kind of flux information... I read some spectra are compressed and this could give you the same error: (ERROR: MWCS: dimension mismatch (mw_open)) but I tried with funpack,fpack but no luck
What I am doing wrong?
|
|
|
|
fitz |
02/21/2014 07:14PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
The problem is that the spectra are stored as FITS binary tables and not in the spectral format IRAF tasks currently understand. We are working on tools to make files like this usable directly, however for the moment you'll need to do something like use TDUMP (or other TABLES package tasks) to write out the bintable as wavelength/flux pairs, and then RSPECTEXT to read them into a format the ONEDSPEC tasks can understand.
|
|
|
|
Vital |
02/21/2014 09:42PM
|
|
|
Status: offline
Registered: 01/16/2014
Posts: 4
|
Dear Fitz,
Thank you very much for your reply. I am not familiar with those steps you described... Do you know where I could find them described in a bit more detail?
On the other hand, I have some experience with pyfits... would you know if someone has created a script to transform these spectra into an IRAF-readable configuration?
Thanks again for your time
|
|
|
|
fitz |
02/21/2014 09:52PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Thank you very much for your reply. I am not familiar with those steps you described... Do you know where I could find them described in a bit more detail?
See the help pages for the tasks, particularly the examples section.
On the other hand, I have some experience with pyfits... would you know if someone has created a script to transform these spectra into an IRAF-readable configuration?
Not off hand, but you could Google it and I'm sure something will turn up.
|
|
|
|
Vital |
02/24/2014 05:32PM
|
|
|
Status: offline
Registered: 01/16/2014
Posts: 4
|
I did not find the right procedure to open the dr10 SDSS release with IRAF but with python/pyfits, the right procedure is the following:
import pyfits
FitsFile = pyfits.open(FolderName + FileName)
Spectra = FitsFile[1].data
Int = Spectra['flux']
WavelenRange = 10.0**Spectra['loglam']
FitsFile.close()
|
|
|
|