astLib.astCalc

Package astLib :: Module astCalc |
[hide private]
[frames] | no frames]

# Module astCalc

source code

module for performing common calculations

(c) 2007-2011 Matt Hilton

(c) 2013-2014 Matt Hilton & Steven Boada

http://astlib.sourceforge.net

The focus in this module is at present on calculations of distances in a given cosmology. The parameters for the cosmological model are set using the variables OMEGA_M0, OMEGA_L0, OMEGA_R0, H0 in the module namespace (see below for details).

Functions | [hide private]
float |
dl(z) Calculates the luminosity distance in Mpc at redshift z. | source code
float |
da(z) Calculates the angular diameter distance in Mpc at redshift z. | source code
float |
dm(z) Calculates the transverse comoving distance (proper motion distance) in Mpc at redshift z. | source code
float |
dc(z) Calculates the line of sight comoving distance in Mpc at redshift z. | source code
float |
dVcdz(z) Calculates the line of sight comoving volume element per steradian dV/dz at redshift z. | source code
float |
dl2z(distanceMpc) Calculates the redshift z corresponding to the luminosity distance given in Mpc. | source code
float |
dc2z(distanceMpc) Calculates the redshift z corresponding to the comoving distance given in Mpc. | source code
float |
t0() Calculates the age of the universe in Gyr at z=0 for the current set of cosmological parameters. | source code
float |
tl(z) Calculates the lookback time in Gyr to redshift z for the current set of cosmological parameters. | source code
float |
tz(z) Calculates the age of the universe at redshift z for the current set of cosmological parameters. | source code
float |
tl2z(tlGyr) Calculates the redshift z corresponding to lookback time tlGyr given in Gyr. | source code
float |
tz2z(tzGyr) Calculates the redshift z corresponding to age of the universe tzGyr given in Gyr. | source code
float |
absMag(appMag, distMpc) Calculates the absolute magnitude of an object at given luminosity distance in Mpc. | source code
float |
Ez(z) Calculates the value of E(z), which describes evolution of the Hubble parameter with redshift, at redshift z for the current set of cosmological parameters. | source code
float |
Ez2(z) Calculates the value of E(z)^2, which describes evolution of the Hubble parameter with redshift, at redshift z for the current set of cosmological parameters. | source code
float |
OmegaMz(z) Calculates the matter density of the universe at redshift z. | source code
float |
OmegaLz(z) Calculates the dark energy density of the universe at redshift z. | source code
float |
OmegaRz(z) Calculates the radiation density of the universe at redshift z. | source code
float |
DeltaVz(z) Calculates the density contrast of a virialised region ΔV(z), assuming a ΛCDM-type flat cosmology. | source code
float |
RVirialXRayCluster(kT, z, betaT) Calculates the virial radius (in Mpc) of a galaxy cluster at redshift z with X-ray temperature kT, assuming self-similar evolution and a flat cosmology. | source code

Variables | [hide private]
float | OMEGA_M0 = `0.3` The matter density parameter at z=0.
float | OMEGA_L0 = `0.7` The dark energy density (in the form of a cosmological constant) at z=0.
float | OMEGA_R0 = `8.24e-05` The radiation density at z=0 (note this is only used currently in calculation of Ez).
float | H0 = `70.0` The Hubble parameter (in km/s/Mpc) at z=0.
float | C_LIGHT = `300000.0` The speed of light in km/s.
| __package__ = ``'``astLib``'``

Function Details | [hide private]

### dl(z) | source code
Calculates the luminosity distance in Mpc at redshift z. Parameters: `z` (float) - redshift Returns: float luminosity distance in Mpc

### da(z) | source code
Calculates the angular diameter distance in Mpc at redshift z. Parameters: `z` (float) - redshift Returns: float angular diameter distance in Mpc

### dm(z) | source code
Calculates the transverse comoving distance (proper motion distance) in Mpc at redshift z. Parameters: `z` (float) - redshift Returns: float transverse comoving distance (proper motion distance) in Mpc

### dc(z) | source code
Calculates the line of sight comoving distance in Mpc at redshift z. Parameters: `z` (float) - redshift Returns: float transverse comoving distance (proper motion distance) in Mpc

### dVcdz(z) | source code
Calculates the line of sight comoving volume element per steradian dV/dz at redshift z. Parameters: `z` (float) - redshift Returns: float comoving volume element per steradian

### dl2z(distanceMpc) | source code
Calculates the redshift z corresponding to the luminosity distance given in Mpc. Parameters: `distanceMpc` (float) - distance in Mpc Returns: float redshift

### dc2z(distanceMpc) | source code
Calculates the redshift z corresponding to the comoving distance given in Mpc. Parameters: `distanceMpc` (float) - distance in Mpc Returns: float redshift

### t0() | source code
Calculates the age of the universe in Gyr at z=0 for the current set of cosmological parameters. Returns: float age of the universe in Gyr at z=0

### tl(z) | source code
Calculates the lookback time in Gyr to redshift z for the current set of cosmological parameters. Parameters: `z` (float) - redshift Returns: float lookback time in Gyr to redshift z

### tz(z) | source code
Calculates the age of the universe at redshift z for the current set of cosmological parameters. Parameters: `z` (float) - redshift Returns: float age of the universe in Gyr at redshift z

### tl2z(tlGyr) | source code
Calculates the redshift z corresponding to lookback time tlGyr given in Gyr. Parameters: `tlGyr` (float) - lookback time in Gyr Returns: float redshift Note: Raises ValueError if tlGyr is not positive.

### tz2z(tzGyr) | source code
Calculates the redshift z corresponding to age of the universe tzGyr given in Gyr. Parameters: `tzGyr` (float) - age of the universe in Gyr Returns: float redshift Note: Raises ValueError if Universe age not positive

### absMag(appMag, distMpc) | source code
Calculates the absolute magnitude of an object at given luminosity distance in Mpc. Parameters: `appMag` (float) - apparent magnitude of object `distMpc` (float) - distance to object in Mpc Returns: float absolute magnitude of object

### Ez(z) | source code
Calculates the value of E(z), which describes evolution of the Hubble parameter with redshift, at redshift z for the current set of cosmological parameters. See, e.g., Bryan & Norman 1998 (ApJ, 495, 80). Parameters: `z` (float) - redshift Returns: float value of E(z) at redshift z

### Ez2(z) | source code
Calculates the value of E(z)^2, which describes evolution of the Hubble parameter with redshift, at redshift z for the current set of cosmological parameters. See, e.g., Bryan & Norman 1998 (ApJ, 495, 80). Parameters: `z` (float) - redshift Returns: float value of E(z)^2 at redshift z

### OmegaMz(z) | source code
Calculates the matter density of the universe at redshift z. See, e.g., Bryan & Norman 1998 (ApJ, 495, 80). Parameters: `z` (float) - redshift Returns: float matter density of universe at redshift z

### OmegaLz(z) | source code
Calculates the dark energy density of the universe at redshift z. Parameters: `z` (float) - redshift Returns: float dark energy density of universe at redshift z

### OmegaRz(z) | source code
Calculates the radiation density of the universe at redshift z. Parameters: `z` (float) - redshift Returns: float radiation density of universe at redshift z

### DeltaVz(z) | source code
Calculates the density contrast of a virialised region ΔV(z), assuming a ΛCDM-type flat cosmology. See, e.g., Bryan & Norman 1998 (ApJ, 495, 80). Parameters: `z` (float) - redshift Returns: float density contrast of a virialised region at redshift z Note: If OMEGA_M0+OMEGA_L0 is not equal to 1, this routine exits and prints an error message to the console.

### RVirialXRayCluster(kT, z, betaT) | source code
Calculates the virial radius (in Mpc) of a galaxy cluster at redshift z with X-ray temperature kT, assuming self-similar evolution and a flat cosmology. See Arnaud et al. 2002 (A&A, 389, 1) and Bryan & Norman 1998 (ApJ, 495, 80). A flat ΛCDM-type flat cosmology is assumed. Parameters: `kT` (float) - cluster X-ray temperature in keV `z` (float) - redshift `betaT` (float) - the normalisation of the virial relation, for which Evrard et al. 1996 (ApJ,469, 494) find a value of 1.05 Returns: float virial radius of cluster in Mpc Note: If OMEGA_M0+OMEGA_L0 is not equal to 1, this routine exits and prints an error message to the console.