rotate

sofia_redux.scan.utilities.utils.rotate(positions, angle)[source]

Rotate 2 dimensional coordinates by a given angle.

Parameters:
positionsnumpy.ndarray

x, y positions of shape (N, 2)

anglefloat or astropy.units.Quantity or numpy.ndarray (float)

The rotation angle (anti-clockwise) in radians (float) or as an astropy unit. If supplied as an array, should be of shape (N,).

Returns:
numpy.ndarray

Rotated x, y positions