rotator – Rotation and geometry functions

Rotation

Rotator([rot, coord, inv, deg, eulertype])

Rotation operator, including astronomical coordinate systems.

rotateVector(rotmat, vec[, vy, vz, do_rot])

Rotate a vector (or a list of vectors) using the rotation matrix given as first argument.

rotateDirection(rotmat, theta[, phi, ...])

Rotate the vector described by angles theta,phi using the rotation matrix given as first argument.

Geometrical helpers

vec2dir(vec[, vy, vz, lonlat])

Transform a vector to angle given by theta,phi.

dir2vec(theta[, phi, lonlat])

Transform a direction theta,phi to a unit vector.

angdist(dir1, dir2[, lonlat])

Returns the angular distance between dir1 and dir2.