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

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

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.