[AstroPy] Question about WCS and coordinate system

Yannick Roehlly yannick.roehlly at lam.fr
Thu Nov 14 10:19:20 EST 2013

Hi all,

I'm struggling with making an all sky plot using the
lambda_mollweide_sfd_ebv.fits reddening map available there

When using aplpy, the coordinates are reversed so I'm trying to
understand what's going wrong using only astropy.

import numpy as np
from matplotlib import pyplot as plt
from astropy.wcs import wcs
from astropy.io import fits
hdulist = fits.open("lambda_mollweide_sfd_ebv.fits")
imshow(np.log(hdulist[1].data), cmap="cubehelix")

I'm trying to find the position of the Large Magelanic Cloud which
should be around the pixel 2862, 562 (figure attached).

wcs1 = wcs.WCS(hdulist[1].header)
print(wcs1.wcs_pix2world([[2862, 562]], 1))

-> [[ 80.13878056  33.70194417]]

But the LMC should be around 280, -32

Do I do something wrong?

A secondary question would be: when using WCS pix2world and world2pix,
what is the coordinate system used? The one declared in the fits header?



How many weeks are there in a light year?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: figure.jpg
Type: image/jpeg
Size: 58825 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/astropy/attachments/20131114/a0a5169c/attachment.jpg>

More information about the AstroPy mailing list