WCSMapAll¶
- class grizli.utils.WCSMapAll(input, output, origin=0)[source]¶
Bases:
object
Sample class to demonstrate how to define a coordinate transformation
Initialize the class. Parameters ———- input :
WCSObject
Input WCS object.
- output
WCSObject
Output WCS object.
- originint, optional
Origin value.
- Attributes
- input
WCSObject
Input WCS object.
- output
WCSObject
Output WCS object.
- originint
Origin value.
- shiftNone
Shift attribute.
- rotNone
Rot attribute.
- scaleNone
Scale attribute.
- input
Methods Summary
backward
(pixx, pixy)Transform pixx,pixy positions from the output frame back onto their original positions in the input frame.
checkWCS
(obj, name)Check if the input object is a valid WCS object.
forward
(pixx, pixy)Transform the input pixx,pixy positions in the input frame to pixel positions in the output frame.
Return the ratio of plate scales between the input and output WCS.
rd2xy
(wcs, ra, dec)Transform input sky positions into pixel positions in the WCS provided.
xy2rd
(wcs, pixx, pixy)Transform input pixel positions into sky positions in the WCS provided.
Methods Documentation
- backward(pixx, pixy)[source]¶
Transform pixx,pixy positions from the output frame back onto their original positions in the input frame.
- Parameters
- pixxarray-like
The x-coordinates of the output pixel positions.
- pixyarray-like
The y-coordinates of the output pixel positions.
- Returns
- resulttuple
The transformed pixel positions in the input frame.
- checkWCS(obj, name)[source]¶
Check if the input object is a valid WCS object.
- Parameters
- obj
WCS
The input object to be checked.
- namestr
The name of the object.
- obj
- forward(pixx, pixy)[source]¶
Transform the input pixx,pixy positions in the input frame to pixel positions in the output frame.
- Parameters
- pixxarray-like
The x-coordinates of the input pixel positions.
- pixyarray-like
The y-coordinates of the input pixel positions.
- Returns
- resulttuple
The transformed pixel positions in the output frame.
- get_pix_ratio()[source]¶
Return the ratio of plate scales between the input and output WCS. This is used to properly distribute the flux in each pixel in ‘tdriz’.
- rd2xy(wcs, ra, dec)[source]¶
Transform input sky positions into pixel positions in the WCS provided.
- Parameters
- wcs
WCS
The WCS object containing the coordinate transformation.
- raarray-like
The right ascension (RA) values in degrees.
- decarray-like
The declination (Dec) values in degrees.
- wcs
- Returns
- pixxarray-like
The x-coordinates of the transformed pixel positions.
- pixyarray-like
The y-coordinates of the transformed pixel positions.
- xy2rd(wcs, pixx, pixy)[source]¶
Transform input pixel positions into sky positions in the WCS provided.
- Parameters
- wcs
WCS
The WCS object containing the coordinate transformation.
- pixxarray-like
The x-coordinates of the input pixel positions.
- pixyarray-like
The y-coordinates of the input pixel positions.
- wcs
- Returns
- raarray-like
The right ascension (RA) values in degrees.
- decarray-like
The declination (Dec) values in degrees.
- output