[AstroPy] Question about WCS and coordinate system
yannick.roehlly at lam.fr
Thu Nov 14 10:19:20 EST 2013
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")
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.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...
Size: 58825 bytes
Desc: not available
More information about the AstroPy