Cosmology (pygnuastro.cosmology)

This library does the main cosmological calculations that are commonly necessary in extra-galactic astronomical studies. The main variable in this context is the redshift (z). The cosmological input parameters in the functions below are H0, o_lambda_0, o_matter_0, o_radiation_0 which respectively represent the current (at redshift 0) expansion rate (Hubble constant in units of km/sec/Mpc), cosmological constant (Λ), matter and radiation densities. The pygnuastro.cosmology module provides the same functions as it’s Gnuastro Library counterpart.

Note

For all functions below, the redshift(z) is the only required argument. The default values taken by the other arguments are: H0 = 67.66, olambda = 0.6889, omatter = 0.3111, oradiation = 0.0. (Constants from Plank 2018 (arXiv:1807.06209, Table 2)) As the summation of the cosmological constants(olambda, omatter and oradiation) should be 1, in order to pass custom values for these, all three have to be provided by the user.

pygnuastro.cosmology.age()

Returns the age of the universe at redshift z in units of Giga years.

Parameters:
  • z (float) – Redshift

  • H0 (float/None) – Hubble constant in units of km/sec/Mpc

  • olambda (float/None) – Cosmological Constant

  • omatter (float/None) – Matter Density

  • oradiation (float/None) – Radiation Density

Returns:

The age of the universe at redshit z in units of Giga years.

Return type:

float

pygnuastro.cosmology.angular_distance()

Return the angular diameter distance to an object at redshift z in units of Mega parsecs.

Parameters:
  • z (float) – Redshift

  • H0 (float/None) – Hubble constant in units of km/sec/Mpc

  • olambda (float/None) – Cosmological Constant

  • omatter (float/None) – Matter Density

  • oradiation (float/None) – Radiation Density

Returns:

The angular diameter distance to an object at redshift z in units of Mega parsecs.

Return type:

float

pygnuastro.cosmology.to_absolute_mag()

Return the conversion from apparent to absolute magnitude for an object at redshift z. This value has to be added to the apparent magnitude to give the absolute magnitude of an object at redshift z.

Parameters:
  • z (float) – Redshift

  • H0 (float/None) – Hubble constant in units of km/sec/Mpc

  • olambda (float/None) – Cosmological Constant

  • omatter (float/None) – Matter Density

  • oradiation (float/None) – Radiation Density

Returns:

The conversion from apparent to absolute magnitude for an object at redshift z. This value has to be added to the apparent magnitude to give the absolute magnitude of an object at redshift z.

Return type:

float

pygnuastro.cosmology.critical_density()

Returns the critical density at redshift z in units of g/cm3.

Parameters:
  • z (float) – Redshift

  • H0 (float/None) – Hubble constant in units of km/sec/Mpc

  • olambda (float/None) – Cosmological Constant

  • omatter (float/None) – Matter Density

  • oradiation (float/None) – Radiation Density

Returns:

The age of the universe at redshit z in units of Giga years.

Return type:

float

pygnuastro.cosmology.comoving_volume()

Returns the comoving volume over 4pi stradian to z in units of Mega parsecs cube.

Parameters:
  • z (float) – Redshift

  • H0 (float/None) – Hubble constant in units of km/sec/Mpc

  • olambda (float/None) – Cosmological Constant

  • omatter (float/None) – Matter Density

  • oradiation (float/None) – Radiation Density

Returns:

The comoving volume over 4pi stradian to z in units of Mega parsecs cube.

Return type:

float

pygnuastro.cosmology.proper_distance()

Returns the proper distance to an object at redshift z in units of Mega parsecs.

Parameters:
  • z (float) – Redshift

  • H0 (float/None) – Hubble constant in units of km/sec/Mpc

  • olambda (float/None) – Cosmological Constant

  • omatter (float/None) – Matter Density

  • oradiation (float/None) – Radiation Density

Returns:

The proper distance to an object at redshift z in units of Mega parsecs.

Return type:

float

pygnuastro.cosmology.luminosity_distance()

Return the luminosity diameter distance to an object at redshift z in units of Mega parsecs.

Parameters:
  • z (float) – Redshift

  • H0 (float/None) – Hubble constant in units of km/sec/Mpc

  • olambda (float/None) – Cosmological Constant

  • omatter (float/None) – Matter Density

  • oradiation (float/None) – Radiation Density

Returns:

The luminosity diameter distance to an object at redshift z in units of Mega parsecs.

Return type:

float

pygnuastro.cosmology.distance_modulus()

Return the distance modulus at redshift z (with no units).

Parameters:
  • z (float) – Redshift

  • H0 (float/None) – Hubble constant in units of km/sec/Mpc

  • olambda (float/None) – Cosmological Constant

  • omatter (float/None) – Matter Density

  • oradiation (float/None) – Radiation Density

Returns:

The critical density at redshift z in units of g/cm3.

Return type:

float

pygnuastro.cosmology.velocity_from_z()

Return the velocity (in km/s) corresponding to the given redshift (z).

Parameters:
  • z (float) – Redshift

  • H0 (float/None) – Hubble constant in units of km/sec/Mpc

  • olambda (float/None) – Cosmological Constant

  • omatter (float/None) – Matter Density

  • oradiation (float/None) – Radiation Density

Returns:

The velocity (in km/s) corresponding to the given redshift (z).

Return type:

float

pygnuastro.cosmology.z_from_velocity()

Return the redshift corresponding to the given velocity (v in km/s).

Parameters:
  • z (float) – Redshift

  • H0 (float/None) – Hubble constant in units of km/sec/Mpc

  • olambda (float/None) – Cosmological Constant

  • omatter (float/None) – Matter Density

  • oradiation (float/None) – Radiation Density

Returns:

The redshift corresponding to the given velocity (v in km/s).

Return type:

float