cogwheel.skyloc_anglesΒΆ

Coordinate transformations to and from right ascension and declination.

Functions

cart3d_to_latlon

Return latitude and longitude in radians corresponding to a Cartesian 3d vector assumed normalized to 1.

cart3d_to_thetaphi

Return spherical angles in radians corresponding to a Cartesian 3d vector r, assumed normalized to 1.

get_rotation_matrix

Return a rotation matrix R such that R @ r = r', where r' are the coordinates in the new frame (@ is matrix multiplication).

latlon_to_cart3d

Return a unit vector (x, y, z) from a latitude and longitude in radians.

lon_to_ra

Convert longitude to right ascension.

normalize

Divide a vector by its norm.

ra_to_lon

Convert right ascension to longitude.

thetaphi_to_cart3d

Return a unit vector (x, y, z) from spherical angles in radians.

x_rotation_matrix

Rotation matrix about x axis in 3d space.

z_rotation_matrix

Rotation matrix about z axis in 3d space.

Classes

SkyLocAngles

Class that defines a coordinate system for sky localization.