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.

outputWCSObject

Output WCS object.

originint, optional

Origin value.

Attributes
inputWCSObject

Input WCS object.

outputWCSObject

Output WCS object.

originint

Origin value.

shiftNone

Shift attribute.

rotNone

Rot attribute.

scaleNone

Scale attribute.

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.

get_pix_ratio()

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
objWCS

The input object to be checked.

namestr

The name of the object.

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
wcsWCS

The WCS object containing the coordinate transformation.

raarray-like

The right ascension (RA) values in degrees.

decarray-like

The declination (Dec) values in degrees.

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
wcsWCS

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.

Returns
raarray-like

The right ascension (RA) values in degrees.

decarray-like

The declination (Dec) values in degrees.