reproject

stcal.outlier_detection.utils.reproject(wcs1, wcs2)[source]

Compute reprojection from wcs1 to wcs2.

Given two WCSs return a function which takes pixel coordinates in wcs1 and computes them in wcs2.

It performs the forward transformation of wcs1 followed by the inverse of wcs2.

Parameters:
  • wcs1 (gwcs.wcs.WCS) – WCS objects that have pixel_to_world_values and world_to_pixel_values methods.

  • wcs2 (gwcs.wcs.WCS) – WCS objects that have pixel_to_world_values and world_to_pixel_values methods.

Returns:

Function to compute the transformations. It takes x, y positions in wcs1 and returns x, y positions in wcs2.

Return type:

_reproject