CoordinateTransformation#
- class pygaia.astrometry.coordinates.CoordinateTransformation(desired_transformation)#
Bases:
object
Provides methods for carrying out transformations between different coordinate (reference) systems. Transformations between the following systems are supported:
ICRS or Equatorial (right ascension, declination)
Galactic (longitude, latitude)
Ecliptic (longitude, latitude)
The transformations can be applied to sky coordinates or Cartesian coordinates.
Note
The transformations here are only intended for systems that represent a rotated version of the ICRS. For transformations from and to non-ICRS systems (such as FK5) refer to Astropy’s coordinates package.
- transformation#
The transformation represented by the instance of this class.
- Type:
- rotationMatrix#
Rotation matrix corresponding to the transformation.
- Type:
array
Methods Summary
Query which is the starting coordinate system of this transformation.
Query which is the target coordinate system of this transformation.
transform_cartesian_coordinates
(x, y, z)Rotate Cartesian coordinates from one reference system to another.
transform_covariance_matrix
(phi, theta, covmat)Transform the astrometric covariance matrix to its representation in the new coordinate system.
transform_proper_motion_errors
(phi, theta, ...)Converts the proper motion uncertainties from one reference system to another, including the covariance term.
transform_proper_motions
(phi, theta, ...)Converts proper motions from one reference system to another.
transform_sky_coordinate_errors
(phi, theta, ...)Converts the sky coordinate uncertainties from one reference system to another, including the covariance term.
transform_sky_coordinates
(phi, theta)Convert sky coordinates from one reference system to another.
Methods Documentation
- start_coordinates()#
Query which is the starting coordinate system of this transformation.
- Returns:
from_sys – String with starting coordinate system.
- Return type:
str
- target_coordinates()#
Query which is the target coordinate system of this transformation.
- Returns:
to_sys – String with target coordinate system.
- Return type:
str
- transform_cartesian_coordinates(x, y, z)#
Rotate Cartesian coordinates from one reference system to another.
Use the rotation matrix with which the class was initialized. The inputs can be scalars or 1-dimensional numpy arrays. The length scale units of the inputs can be arbitrary but should of course be consistent.
- Parameters:
x (float or array) – Value of X-coordinate in original reference system.
y (float or array) – Value of Y-coordinate in original reference system.
z (float or array) – Value of Z-coordinate in original reference system.
- Returns:
xrot (float or array) – Value of X-coordinate after rotation
yrot (float or array) – Value of Y-coordinate after rotation
zrot (float or array) – Value of Z-coordinate after rotation
- transform_covariance_matrix(phi, theta, covmat)#
Transform the astrometric covariance matrix to its representation in the new coordinate system.
- Parameters:
phi (float) – The longitude-like angle of the position of the source (radians).
theta (float) – The latitude-like angle of the position of the source (radians).
covmat (array) – Covariance matrix (5,5) of the astrometric parameters.
- Returns:
covmat_rot – Covariance matrix in its representation in the new coordinate system.
- Return type:
array
- transform_proper_motion_errors(phi, theta, sigmuphistar, sigmutheta, rho_muphi_mutheta=0)#
Converts the proper motion uncertainties from one reference system to another, including the covariance term.
Equations (1.5.4) and (1.5.20) from section 1.5 in the Hipparcos Explanatory Volume 1 are used.
- Parameters:
phi (float or array) – The longitude-like angle of the position of the source (radians).
theta (float or array) – The latitude-like angle of the position of the source (radians).
sigmuphistar (float or attay) – Uncertainty in the proper motion in the longitude-like direction (including cos(latitude) factor).
sigmutheta (float or array) – Uncertainty in the proper motion in the latitude-like direction.
rho_muphi_mutheta (float or array) – Correlation coefficient of the proper motion errors. Zero by default.
- Returns:
sigMuPhiRotStar (float or array) – The transformed uncertainty in the proper motion in the longitude direction (including np.cos(latitude) factor).
sigMuThetaRot (float or array) – The transformed uncertainty in the proper motion in the longitude direction.
rhoMuPhiMuThetaRot (float or array) – The transformed correlation coefficient.
- transform_proper_motions(phi, theta, muphistar, mutheta)#
Converts proper motions from one reference system to another.
Use the prescriptions in section 1.5.3 of the Hipparcos Explanatory Volume 1 (equations 1.5.18, 1.5.19).
- Parameters:
phi (float or array) – The longitude-like angle of the position of the source (radians).
theta (float or array) – The latitude-like angle of the position of the source (radians).
muphistar (float or array) – Value of the proper motion in the longitude-like angle, multiplied by cos(latitude).
mutheta (float or array) – Value of the proper motion in the latitude-like angle.
- Returns:
muphistarrot (float or array) – Value of the transformed proper motion in the longitude-like angle (including the cos(latitude) factor).
muthetarot (float or array) – Value of the transformed proper motion in the latitude-like angle.
- transform_sky_coordinate_errors(phi, theta, sigphistar, sigtheta, rho_phi_theta=0)#
Converts the sky coordinate uncertainties from one reference system to another, including the covariance term.
Equations (1.5.4) and (1.5.20) from section 1.5 in the Hipparcos Explanatory Volume 1 are used.
- Parameters:
phi (float or array) – The longitude-like angle of the position of the source (radians).
theta (float or array) – The latitude-like angle of the position of the source (radians).
sigphistar (float or array) – Uncertainty in the longitude-like angle of the position of the source (radians or sexagesimal units, including cos(latitude) term)
sigtheta (float or array) – Uncertainty in the latitude-like angle of the position of the source (radians or sexagesimal units)
rho_phi_theta (float or array) – Correlation coefficient of the position uncertainties. Zero by default
- Returns:
sigPhiRotStar (float or array) – The transformed uncertainty in the longitude-like angle (including cos(latitude) factor)
sigThetaRot (float or array) – The transformed uncertainty in the latitude-like angle.
rhoPhiThetaRot (float or array) – The transformed correlation coefficient.
- transform_sky_coordinates(phi, theta)#
Convert sky coordinates from one reference system to another.
Use of the rotation matrix with which the class was initialized. Inputs can be scalars or 1-dimensional numpy arrays.
- Parameters:
phi (float or array) – Value of the longitude-like angle (right ascension, longitude) in radians.
theta (float or array) – Value of the latitude-like angle (declination, latitude) in radians.
- Returns:
phirot (float or array) – Value of the transformed longitude-like angle in radians.
thetarot (float or array) – Value of the transformed latitude-like angle in radians.