auromat.coordinates.wcs module¶
-
auromat.coordinates.wcs.
pix2world
(wcsHeader, width, height, startX=0, startY=0, corner=True, ascartesian=False)[source]¶ Calculate RA, Dec coordinates of a given pixel coordinate rectangle.
ra, dec = pix2world(..) ra and dec are indexed as [y,x]
Each array element contains the RA,Dec coords of the top left corner of the given pixel if corner==True, otherwise the coords of the pixel center. If corner==True, an additional row and column exists at the bottom and right so that it is possible to get the bottom and right corner values for those pixels.
Parameters: - wcsHeader (dictionary) – WCS header
- width – width of rectangle
- height – height of rectangle
- startX – x coordinate of rectangle, can be negative
- startY – y coordinate of rectangle, can be negative
If ascartesian=False:
Return type: tuple(ra, dec) with arrays of shape (height+1,width+1) if corner==True, else (height,width) If ascartesian=True:
Return type: array of shape (height[+1],width[+1],3) with x,y,z order
-
auromat.coordinates.wcs.
tan_pix2world
(header, px, py, origin, ascartesian=False)[source]¶ Fast reimplementation of astropy.wcs.wcs.wcs_pix2world with support for only the TAN projection. Speedup is about 2x.
Return type: tuple (ra,dec) in degrees, or cartesian coordinates in one array (h,w,3) if ascartesian=True