[AstroPy] Questions & Clarifications

rahul .poruri rahul.poruri@gmail....
Sun Jun 30 11:04:06 CDT 2013


> Clarification 2 -
> > I was unable to open spectra FITS files (from the SDSS DR9) on DS9.
> > Am i missing any feature or does DS9 not have the capability to open
> spectra
> > FITS files?!
>
> Can you tell me a bit more about where you downloaded the spectrum
> file from, and also send the error you got from astropy.io.fits?


like i mentioned, my spectrum files are from the Data Release 9 of the SDSS
catalogue and they're spectra of quasars. And i was trying to open then in
DS9 - not using astropy.io.fits. I've been able to open the fits files in
python using astropy and then plot then but i wanted to use the blink
functionality in DS9 to be able to run through the spectra and look for
variations. The error is just

Unable to load fits
file.fits


> > Question 3 -
> > I want to plot the spectra on the same window, to compare - in case there
> > isn't a GUI to do the same. I created a list of all of the spectra in my
> > directory and it's a file with ',\n' as the line separators. I then
> changed
> > the attributes of
> >
> > class astropy.io.ascii.basic.Basic
> >
> > to
> >
> >
> > rdr = ascii.get_reader(Reader=ascii.Basic)
> > #rdr.header.splitter.delimiter = ' '
> > rdr.data.splitter.delimiter = ' ,\n '
> > #rdr.header.start_line = 0
> > rdr.data.start_line = 0
> > rdr.data.end_line = None
> > #rdr.header.comment = r'\s*#'
> > rdr.data.comment = r'\s*#'
> >
> > Now, i'm just using
> > list = astropy.io.ascii.read('fits_list.dat') to read the file and use
> > list[i][0] to access the file name, which i feed to my python code to
> > extract and plot the spectra.
> >
> > Is there a different/more straight forward way to do this?!
> >
> > Thanks in advance for the replies :)...
>
> Do you want to plot all of the spectra on the same plot, or on
> different plots on the same figure?
>

I want to plot all of the spectra on the same plot, as i mentioned rather
vaguely(sorry for that).
It's ~20 spectra so i don't know if subplots will make it any easier to
compare them - although plotting them on the same plot will make it
crowded, i feel it's a better option to having ~20 subplots in the same
figure. Or is there anyother way to go about plotting and comparing
spectra?!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/astropy/attachments/20130630/d301427e/attachment-0001.html 


More information about the AstroPy mailing list