unit_to_radec_jacobian

giant.ufo.detector:

giant.ufo.detector.unit_to_radec_jacobian(unit)[source]

This function computes the Jacobian matrix for going from a unit vector to a right ascension/declination in degrees.

Mathematically this is given by:

\[\begin{split}\frac{\partial (\alpha, \delta)}{\partial \hat{\mathbf{x}}} = \frac{180}{\pi}\left[\begin{array}{ccc} -\frac{y}{x**2+y**2} & \frac{x}{x**2+y**2} & 0 \\ 0 & \frac{1}{\sqrt{1-z**2) & 0 \end{array}\right]\end{split}\]

This function is vectorized so that multiple jacobians can be computed at once. In this case the unit vectors in the input should be a shape of 3xn where n is the number of unit vectors and the output will be nx2x3.

Parameters:

unit (ndarray) – The unit vectors to compute the jacobian for as a numpy array

Returns:

the nx2x3 jacobian matrices.

Return type:

ndarray