[AstroPy] mollweide projection plotting (celestial sphere in Galactic coord)?

Slavin, Jonathan jslavin at cfa.harvard.edu
Thu Jun 20 09:17:17 EDT 2013


Hi Guillaume,

This code makes a nice plot, though the longitude is backward as compared
with a normal sky map (i.e. longitude generally runs right-to-left).  A
couple little things you might want to know.  Numpy has a pi value, so you
don't need to import math -- just use numpy.pi.  Are you familiar with this
trick:for reversing arrays:  y = y[::-1]?  Also instead of x =
np.zeros(len(y)) you can do x = np.zeros_like(y).  Just thought I'd pass
these along.

Jon

On Thu, Jun 20, 2013 at 7:10 AM, <astropy-request at scipy.org> wrote:

> Date: Thu, 20 Jun 2013 13:15:27 +0200
> From: Guillaume Blanc <blanc at apc.univ-paris7.fr>
> Subject: Re: [AstroPy] mollweide projection plotting (celestial sphere
>         in      Galactic coord) ?
> To: Kelle Cruz <kellecruz at gmail.com>
> Cc: "<astropy at scipy.org>" <astropy at scipy.org>
> Message-ID: <9B3255E6-4F1B-4B26-9A80-2889775C405F at apc.univ-paris7.fr>
> Content-Type: text/plain; charset="windows-1252"
>
> Hi,
>
> Thanks a lot. I was able to do what I wanted using matplotlib. Here is the
> code, and below the corresponding figure, if someone is interested.
>
> Guillaume Blanc
>



________________________________________________________
Jonathan D. Slavin                 Harvard-Smithsonian CfA
jslavin at cfa.harvard.edu       60 Garden Street, MS 83
phone: (617) 496-7981       Cambridge, MA 02138-1516
fax: (617) 496-7577            USA
________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20130620/39393920/attachment.html>


More information about the AstroPy mailing list