Detailed API documentation#

pygaia.astrometry.constants Module#

Provides numerical constants useful for astrometric calculations.

pygaia.astrometry.coordinates Module#

Provides tools for coordinate transformation and epoch propagation.

Functions#

angular_distance(phi1, theta1, phi2, theta2)

Calculate the angular distance between pairs of sky coordinates.

Classes#

CoordinateTransformation(desired_transformation)

Provides methods for carrying out transformations between different coordinate (reference) systems.

Transformations(value)

Enumeration with the available coordinate tranformations.

EpochPropagation()

Provides methods for transforming the astrometry and radial velocity of a given source to a different epoch.

pygaia.astrometry.vectorastrometry Module#

Provides vector astrometry functions.

Functions#

spherical_to_cartesian(r, phi, theta)

Convert spherical to Cartesian coordinates.

cartesian_to_spherical(x, y, z)

Convert Cartesian to spherical coordinates.

normal_triad(phi, theta)

Calculate the so-called normal triad [p, q, r] associated with a spherical coordinate system.

elementary_rotation_matrix(axis, rotationAngle)

Construct an elementary rotation matrix describing a rotation around the x, y, or z-axis.

phase_space_to_astrometry(x, y, z, vx, vy, vz)

From the given phase space coordinates calculate the astrometric observables, including the radial velocity, which here is seen as the sixth astrometric parameter.

astrometry_to_phase_space(phi, theta, ...)

From the input astrometric parameters calculate the phase space coordinates.

pygaia.errors.astrometric Module#

Provides functions for simulation the astrometric uncertainties in the Gaia catalogue data for Gaia DR3+. The code reproduces the uncertainty model described on the Gaia science performance pages.

Functions#

parallax_uncertainty(gmag[, release])

Calculate the sky averaged parallax uncertainty as a function of G, for a given Gaia data release.

position_uncertainty(gmag[, release])

Calculate the sky averaged position uncertainties from G, for a given Gaia data release.

proper_motion_uncertainty(gmag[, release])

Calculate the sky averaged proper motion uncertainties from G, for a given Gaia data release.

total_position_uncertainty(gmag[, release])

Calculate the sky averaged total position uncertainty as a function of G and for the given Gaia data release.

total_proper_motion_uncertainty(gmag[, release])

Calculate the sky averaged total proper motion uncertainty as a function of G and for the given Gaia data release.

pygaia.errors.photometric Module#

Provides functions for simulating the photometric (\(G\), \(G_\mathrm{BP}\), \(G_\mathrm{RP}\)) uncertainties on the Gaia broad-band photometry for Gaia DR3+. The code reproduces the uncertainty model described on the Gaia science performance pages.

Code taken (with permission) from the notebook at gaia-dpci/gaia-dr3-photometric-uncertainties

Functions#

magnitude_uncertainty(band[, maglist, release])

Provide the uncertainty for \(G\), \(G_\mathrm{BP}\), and \(G_\mathrm{RP}\) as a function of magnitude (math:G, \(G_\mathrm{BP}\), and \(G_\mathrm{RP}\), respectively).

Classes#

LogMagUncertainty()

Estimate the log(mag) vs mag uncertainty for \(G\), \(G_\mathrm{BP}\), \(G_\mathrm{RP}\) based on Gaia EDR3 photometry.

pygaia.errors.spectroscopic Module#

Provides functions for simulating the radial velocity uncertainties in the Gaia DR3+ catalogue data. The code reproduces the uncertainty model described on the Gaia science performance pages.

Functions#

radial_velocity_uncertainty(grvs, teff, logg)

Simulate the Gaia DR3 radial velocity uncertainty for the input list of \(G_\mathrm{RVS}\), \(T_\mathrm{eff}\), and \(\log(g)\) values.

pygaia.errors.utils Module#

Utility functions for the uncertainty simulations.

Functions#

calc_z_plx(gmag)

Calculate the value for the parameter z in the formula for parallax errors as a function of G and (V-I).

calc_z_gmag(gmag)

Calculate the value for the parameter z in the formula for G magnitude errors as a function of G and (V-I).

calc_z_bprp(gmag)

Calculate the value for the parameter z in the formula for the BP and RP magnitude errors as a function of G and (V-I).

pygaia.photometry.transformations Module#

Provides transformations between Gaia and a few other photometric systems.

The transformations are taken from the Gaia DR3 documentation.

Functions#

gbrminv_from_vminic(vminic)

Transformation from Johnson-Cousins \(V-I_\mathrm{c}\) to Gaia magnitudes.

gminic_from_vminic(vminic)

Transformation from Johnson-Cousins \(V-I_\mathrm{c}\) to \(G-I_\mathrm{c}\).

grvs_from_gmingrp(gminrp)

Calculate \(G_\mathrm{RVS}\) from the input value(s) of \(G-G_\mathrm{RP}\).

grvs_from_vminic(vminic)

Calculate \(G_\mathrm{RVS}\) from the input value(s) of \(V-I_\mathrm{c}\).

pygaia.photometry.utils Module#

Provides utility functions for photometric transformations. Values of \(M_V\) and \(V-I_\mathrm{c}\) are from Pickles (1998).

Functions#

vminic_from_spt(spt)

Obtain \((V-I_\mathrm{c})\) for the input spectral type.

vabs_from_spt(spt)

Obtain \(M_V\) (absolute magnitude in \(V\)-band) for the input spectral type.

gabs_from_spt(spt)

Obtain \(M_G\) (absolute magnitude in \(G\)-band) for the input spectral type.

pygaia.plot.sky Module#

Function for visualizing coordinate transformations on the sky.

Functions#

plot_coordinate_transformation_on_sky(...[, ...])

Produce a sky-plot in a given coordinate system with the meridians and parallels for another coordinate system overlayed.