[AstroPy] Questions & Clarifications

Adrian Price-Whelan adrianmpw@gmail....
Sun Jun 30 10:52:44 CDT 2013


Hi Rahul --

Answers in-line below..

On Sun, Jun 30, 2013 at 11:46 AM, rahul .poruri <rahul.poruri@gmail.com> wrote:
> Sorry for the vague subject but i have a couple of questions -
>
> Clarification 1 -
> for a mollweide projection, having done
>
> subplot(111, projection="mollweide")
> scatter (ra,dec)
>
> what should the RA range be i.e from 0:360 or -180:180 ?!
> There was a discussion in the mailing list on mollweide projection plotting
> earlier where -180:180 was used as the range. Just wanted to get it
> clarified.
> Also, are mollweide projections the standard in astronomy?!

When plotting to a spherical projection with matplotlib, you have to
provide angles in *radians*. The longitudinal angle should be bound
(-180,180) and the latitudinal angle should be (-90,90).

> 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?

> If so, is there any other program i can use to open and *blink* through the
> spectra?!
> (other than fv by NASA's HEASARC)
>
> 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?


--
Adrian M. Price-Whelan ~ Columbia University ~ http://adrian.pw


More information about the AstroPy mailing list