imaginglss.utils.wcs_simplezea module¶
Python routines to apply world-coordinate system transformations based on the simpler ZEA projection used SFD98 milky way dust map
This code is designed to be light-weight, and specialized. The general ZEA projection is UNSUPPORTED. We handle two special cases
- CRVAL = -90 -90 (south)
- CRVAL = 90 90 (north)
The ZEA projection is described in http://fits.gsfc.nasa.gov/registry/tpvwcs/tpv.html and in: “Representations of celestial coordinates in FITS” Calabretta, M. R., and Greisen, E. W., Astronomy & Astrophysics, 395, 1077-1122, 2002.
-
imaginglss.utils.wcs_simplezea.
ang2pix
(coord, SCALE, CRPIX, NSGP)[source]¶ Convert RA, DEC to x,y, with simple ZEA transformation
A simplified version of the ZEA Transform from coord = (ra, dec) to pixel xy coordinate according the the WCS header.
Obviously PV distortion is not supported.
No checking is performed if a given RA, DEC lies outside the range.
Parameters: coord : array_like
coord = (RA, DEC), RA and DEC (in decimal degrees, vectorized)
SCALE : int
scaling factor
CRPIX : array_like
center pixel number of x, y
NSGP: int
+1 for North, -1 for Sourth.
Notes
Look up Section 5.?.? of
http://www.aanda.org/articles/aa/pdf/2002/45/aah3860.pdf
Although the source code in
https://code.google.com/p/astropysics/source/browse/astropysics/extinct.py
maybe a better explanation of what is done.
The transformation is used by SFD98 dust maps.
-
imaginglss.utils.wcs_simplezea.
pix2ang
(xy, SCALE, CRPIX, NSGP)[source]¶ Convert x, y to RA, DEC with simple ZEA transformation.
See
ang2pix()
-
imaginglss.utils.wcs_simplezea.
ang2pix_hdr
(coord, hdr, zero_offset=True)[source]¶ Apply forward (ra,dec)->(x,y) simple ZEA transformation
A convenience function for calling ang2pix, with the transformations described in a dictionary in the usual FITS header style for WCS transformations.
Parameters: coord : array_like
(ra, dec), RA and DEC (in decimal degrees, vectorized)
hdr : dict
WCS header as a dictionary
zero_offset : boolean, optional,
If True, the routine returns 0-indexed pixel coordinates (useful in Python or C) while if it is False pixels run from 1 (as in Fortran).
Returns: xy : array_like
xy = (x, y) pixel numbers.
-
imaginglss.utils.wcs_simplezea.
pix2ang_hdr
(xy, hdr, zero_offset=True)[source]¶ Apply backward (x,y)->(ra,dec) simple ZEA transformation
See
ang2pix_hdr()