sip_rot90

grizli.utils.sip_rot90(input, rot, reverse=False, verbose=False, compare=False)[source]

Rotate a SIP WCS by increments of 90 degrees using direct transformations between x / y coordinates

Parameters
inputHeader or WCS

Header or WCS

rotint

Number of times to rotate the WCS 90 degrees clockwise, analogous to numpy.rot90

reversebool, optional

If input is a header and includes a keyword ROT90, then undo the rotation and remove the keyword from the output header

verbosebool, optional

If True, print the root-mean-square difference between the original and rotated coordinates

comparebool, optional

If True, plot the difference between the original and rotated coordinates as a function of x and y

Returns
headerHeader

Rotated WCS header

wcsWCS

Rotated WCS

descstr

Description of the transform associated with rot, e.g, x=nx-x, y=ny-y for rot=±2.