<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> Clarification 2 -<br>
> I was unable to open spectra FITS files (from the SDSS DR9) on DS9.<br>
> Am i missing any feature or does DS9 not have the capability to open spectra<br>
> FITS files?!<br>
<br>
</div>Can you tell me a bit more about where you downloaded the spectrum<br>
file from, and also send the error you got from astropy.io.fits?</blockquote><div><br></div><div>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 </div>
<div><br></div><div>Unable to load fits </div><div>file.fits</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> Question 3 -<br>
> I want to plot the spectra on the same window, to compare - in case there<br>
> isn't a GUI to do the same. I created a list of all of the spectra in my<br>
> directory and it's a file with ',\n' as the line separators. I then changed<br>
> the attributes of<br>
><br>
> class astropy.io.ascii.basic.Basic<br>
><br>
> to<br>
><br>
><br>
> rdr = ascii.get_reader(Reader=ascii.Basic)<br>
> #rdr.header.splitter.delimiter = ' '<br>
> rdr.data.splitter.delimiter = ' ,\n '<br>
> #rdr.header.start_line = 0<br>
> rdr.data.start_line = 0<br>
> rdr.data.end_line = None<br>
> #rdr.header.comment = r'\s*#'<br>
> rdr.data.comment = r'\s*#'<br>
><br>
> Now, i'm just using<br>
> list = astropy.io.ascii.read('fits_list.dat') to read the file and use<br>
> list[i][0] to access the file name, which i feed to my python code to<br>
> extract and plot the spectra.<br>
><br>
> Is there a different/more straight forward way to do this?!<br>
><br>
> Thanks in advance for the replies :)...<br>
<br>
</div>Do you want to plot all of the spectra on the same plot, or on<br>
different plots on the same figure?<br></blockquote><div><br></div><div>I want to plot all of the spectra on the same plot, as i mentioned rather vaguely(sorry for that). </div><div>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?! </div>
</div></div></div>