solarspatialtools.spatial.rotate_vector

solarspatialtools.spatial.rotate_vector(vector, theta)

2D rotation of a vector in cartesian form

Parameters

vector(x, y) numeric

A tuple (or numpy array) containing the input vector. To operate on multiple points, vector should be of the form: ((x1, x2, x3, x4), (y1, y2, y3, y4))

thetanumeric

Angle of rotation in radians

Returns

(x, y)numeric

A tuple (or numpy array) containing the rotated vector. Matches data type of input. If input an array of x’s and y’s, output will be oriented ((x1’, x2’, x3’, x4’), (y1’, y2’, y3’, y4’))