Coordinate Transforms

Numpy

radec_to_lm(radec[, phase_centre])

Converts Right-Ascension/Declination coordinates in radians to a Direction Cosine lm coordinates, relative to the Phase Centre.

radec_to_lmn(radec[, phase_centre])

Converts Right-Ascension/Declination coordinates in radians to a Direction Cosine lm coordinates, relative to the Phase Centre.

lm_to_radec(lm[, phase_centre])

Convert Direction Cosine lm coordinates to Right Ascension/Declination coordinates in radians, relative to the Phase Centre.

lmn_to_radec(lmn[, phase_centre])

Convert Direction Cosine lm coordinates to Right Ascension/Declination coordinates in radians, relative to the Phase Centre.

africanus.coordinates.radec_to_lm(radec, phase_centre=None)[source]

Converts Right-Ascension/Declination coordinates in radians to a Direction Cosine lm coordinates, relative to the Phase Centre.

\begin{eqnarray} & l =& \, \cos \, \delta \sin \, \Delta \alpha \\ & m =& \, \sin \, \delta \cos \, \delta 0 - \cos \delta \sin \delta 0 \cos \Delta \alpha \\ & n =& \, \sqrt{1 - l^2 - m^2} - 1 \end{eqnarray}

where \(\Delta \alpha = \alpha - \alpha 0\) is the difference between the Right Ascension of each coordinate and the phase centre and \(\delta 0\) is the Declination of the phase centre.

Parameters
radecnumpy.ndarray

radec coordinates of shape (coord, 2) where Right-Ascension and Declination are in the last 2 components, respectively.

phase_centrenumpy.ndarray, optional

radec coordinates of the Phase Centre. Shape (2,)

Returns
numpy.ndarray

lm Direction Cosines of shape (coord, 2)

africanus.coordinates.radec_to_lmn(radec, phase_centre=None)[source]

Converts Right-Ascension/Declination coordinates in radians to a Direction Cosine lm coordinates, relative to the Phase Centre.

\begin{eqnarray} & l =& \, \cos \, \delta \sin \, \Delta \alpha \\ & m =& \, \sin \, \delta \cos \, \delta 0 - \cos \delta \sin \delta 0 \cos \Delta \alpha \\ & n =& \, \sqrt{1 - l^2 - m^2} - 1 \end{eqnarray}

where \(\Delta \alpha = \alpha - \alpha 0\) is the difference between the Right Ascension of each coordinate and the phase centre and \(\delta 0\) is the Declination of the phase centre.

Parameters
radecnumpy.ndarray

radec coordinates of shape (coord, 2) where Right-Ascension and Declination are in the last 2 components, respectively.

phase_centrenumpy.ndarray, optional

radec coordinates of the Phase Centre. Shape (2,)

Returns
numpy.ndarray

lm Direction Cosines of shape (coord, 3)

africanus.coordinates.lm_to_radec(lm, phase_centre=None)[source]

Convert Direction Cosine lm coordinates to Right Ascension/Declination coordinates in radians, relative to the Phase Centre.

\begin{eqnarray} & \delta = & \, \arcsin \left( m \cos \delta 0 + n \sin \delta 0 \right) \\ & \alpha = & \, \arctan \left( \frac{l}{n \cos \delta 0 - m \sin \delta 0} \right) \\ \end{eqnarray}

where \(\alpha\) is the Right Ascension of each coordinate and the phase centre and \(\delta 0\) is the Declination of the phase centre.

Parameters
lmnumpy.ndarray

lm Direction Cosines of shape (coord, 2)

phase_centrenumpy.ndarray, optional

radec coordinates of the Phase Centre. Shape (2,)

Returns
numpy.ndarray

radec coordinates of shape (coord, 2) where Right-Ascension and Declination are in the last 2 components, respectively.

africanus.coordinates.lmn_to_radec(lmn, phase_centre=None)[source]

Convert Direction Cosine lm coordinates to Right Ascension/Declination coordinates in radians, relative to the Phase Centre.

\begin{eqnarray} & \delta = & \, \arcsin \left( m \cos \delta 0 + n \sin \delta 0 \right) \\ & \alpha = & \, \arctan \left( \frac{l}{n \cos \delta 0 - m \sin \delta 0} \right) \\ \end{eqnarray}

where \(\alpha\) is the Right Ascension of each coordinate and the phase centre and \(\delta 0\) is the Declination of the phase centre.

Parameters
lmnnumpy.ndarray

lm Direction Cosines of shape (coord, 3)

phase_centrenumpy.ndarray, optional

radec coordinates of the Phase Centre. Shape (2,)

Returns
numpy.ndarray

radec coordinates of shape (coord, 2) where Right-Ascension and Declination are in the last 2 components, respectively.

Dask

radec_to_lm(radec[, phase_centre])

Converts Right-Ascension/Declination coordinates in radians to a Direction Cosine lm coordinates, relative to the Phase Centre.

radec_to_lmn(radec[, phase_centre])

Converts Right-Ascension/Declination coordinates in radians to a Direction Cosine lm coordinates, relative to the Phase Centre.

lm_to_radec(lm[, phase_centre])

Convert Direction Cosine lm coordinates to Right Ascension/Declination coordinates in radians, relative to the Phase Centre.

lmn_to_radec(lmn[, phase_centre])

Convert Direction Cosine lm coordinates to Right Ascension/Declination coordinates in radians, relative to the Phase Centre.

africanus.coordinates.dask.radec_to_lm(radec, phase_centre=None)[source]

Converts Right-Ascension/Declination coordinates in radians to a Direction Cosine lm coordinates, relative to the Phase Centre.

\begin{eqnarray} & l =& \, \cos \, \delta \sin \, \Delta \alpha \\ & m =& \, \sin \, \delta \cos \, \delta 0 - \cos \delta \sin \delta 0 \cos \Delta \alpha \\ & n =& \, \sqrt{1 - l^2 - m^2} - 1 \end{eqnarray}

where \(\Delta \alpha = \alpha - \alpha 0\) is the difference between the Right Ascension of each coordinate and the phase centre and \(\delta 0\) is the Declination of the phase centre.

Parameters
radecdask.array.Array

radec coordinates of shape (coord, 2) where Right-Ascension and Declination are in the last 2 components, respectively.

phase_centredask.array.Array, optional

radec coordinates of the Phase Centre. Shape (2,)

Returns
dask.array.Array

lm Direction Cosines of shape (coord, 2)

africanus.coordinates.dask.radec_to_lmn(radec, phase_centre=None)[source]

Converts Right-Ascension/Declination coordinates in radians to a Direction Cosine lm coordinates, relative to the Phase Centre.

\begin{eqnarray} & l =& \, \cos \, \delta \sin \, \Delta \alpha \\ & m =& \, \sin \, \delta \cos \, \delta 0 - \cos \delta \sin \delta 0 \cos \Delta \alpha \\ & n =& \, \sqrt{1 - l^2 - m^2} - 1 \end{eqnarray}

where \(\Delta \alpha = \alpha - \alpha 0\) is the difference between the Right Ascension of each coordinate and the phase centre and \(\delta 0\) is the Declination of the phase centre.

Parameters
radecdask.array.Array

radec coordinates of shape (coord, 2) where Right-Ascension and Declination are in the last 2 components, respectively.

phase_centredask.array.Array, optional

radec coordinates of the Phase Centre. Shape (2,)

Returns
dask.array.Array

lm Direction Cosines of shape (coord, 3)

africanus.coordinates.dask.lm_to_radec(lm, phase_centre=None)[source]

Convert Direction Cosine lm coordinates to Right Ascension/Declination coordinates in radians, relative to the Phase Centre.

\begin{eqnarray} & \delta = & \, \arcsin \left( m \cos \delta 0 + n \sin \delta 0 \right) \\ & \alpha = & \, \arctan \left( \frac{l}{n \cos \delta 0 - m \sin \delta 0} \right) \\ \end{eqnarray}

where \(\alpha\) is the Right Ascension of each coordinate and the phase centre and \(\delta 0\) is the Declination of the phase centre.

Parameters
lmdask.array.Array

lm Direction Cosines of shape (coord, 2)

phase_centredask.array.Array, optional

radec coordinates of the Phase Centre. Shape (2,)

Returns
dask.array.Array

radec coordinates of shape (coord, 2) where Right-Ascension and Declination are in the last 2 components, respectively.

africanus.coordinates.dask.lmn_to_radec(lmn, phase_centre=None)[source]

Convert Direction Cosine lm coordinates to Right Ascension/Declination coordinates in radians, relative to the Phase Centre.

\begin{eqnarray} & \delta = & \, \arcsin \left( m \cos \delta 0 + n \sin \delta 0 \right) \\ & \alpha = & \, \arctan \left( \frac{l}{n \cos \delta 0 - m \sin \delta 0} \right) \\ \end{eqnarray}

where \(\alpha\) is the Right Ascension of each coordinate and the phase centre and \(\delta 0\) is the Declination of the phase centre.

Parameters
lmndask.array.Array

lm Direction Cosines of shape (coord, 3)

phase_centredask.array.Array, optional

radec coordinates of the Phase Centre. Shape (2,)

Returns
dask.array.Array

radec coordinates of shape (coord, 2) where Right-Ascension and Declination are in the last 2 components, respectively.