APIΒΆ

pygnuastro.cosmology.age

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

pygnuastro.cosmology.angular_distance

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

pygnuastro.cosmology.to_absolute_mag

Return the conversion from apparent to absolute magnitude for an object at redshift z.

pygnuastro.cosmology.critical_density

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

pygnuastro.cosmology.comoving_volume

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

pygnuastro.cosmology.proper_distance

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

pygnuastro.cosmology.luminosity_distance

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

pygnuastro.cosmology.distance_modulus

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

pygnuastro.cosmology.velocity_from_z

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

pygnuastro.cosmology.z_from_velocity

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

pygnuastro.fits.img_read

Reads the contents of the 'hdu' extension/HDU of 'filename' into a NumPy array and returns it.

pygnuastro.fits.img_write

Write the input 'data' into the FITS file named 'filename'.