Reproject

class photutils.psf.sandbox.Reproject(wcs_original, wcs_rectified)[source]

Bases: object

Class to reproject pixel coordinates between unrectified and rectified images.

Parameters
wcs_original, wcs_rectifiedWCS or WCS

The WCS objects for the original (unrectified) and rectified images.

origin{0, 1}

Whether to use 0- or 1-based pixel coordinates.

Methods Summary

to_original(x, y)

Convert the input (x, y) positions from the rectified image to the original (unrectified) image.

to_rectified(x, y)

Convert the input (x, y) positions from the original (unrectified) image to the rectified image.

Methods Documentation

to_original(x, y)[source]

Convert the input (x, y) positions from the rectified image to the original (unrectified) image.

Parameters
x, y: float or array-like of float

The zero-index pixel coordinates in the rectified image.

Returns
x, y: float or array-like

The zero-index pixel coordinates in the original (unrectified) image.

to_rectified(x, y)[source]

Convert the input (x, y) positions from the original (unrectified) image to the rectified image.

Parameters
x, y: float or array-like of float

The zero-index pixel coordinates in the original (unrectified) image.

Returns
x, y: float or array-like

The zero-index pixel coordinates in the rectified image.