FlatwCDM¶
- class astropy.cosmology.FlatwCDM(*args, **kwargs)[source]¶
Bases:
astropy.cosmology.core.wCDM
FLRW cosmology with a constant dark energy equation of state and no spatial curvature.
This has one additional attribute beyond those of FLRW.
- Parameters
- H0
python:float
orQuantity
[‘frequency’] Hubble constant at z = 0. If a float, must be in [km/sec/Mpc]
- Om0
python:float
Omega matter: density of non-relativistic matter in units of the critical density at z=0.
- w0
python:float
, optional Dark energy equation of state at all redshifts. This is pressure/density for dark energy in units where c=1. A cosmological constant has w0=-1.0.
- Tcmb0
python:float
or scalarQuantity
[‘temperature’], optional Temperature of the CMB z=0. If a float, must be in [K]. Default: 0 [K]. Setting this to zero will turn off both photons and neutrinos (even massive ones).
- Neff
python:float
, optional Effective number of Neutrino species. Default 3.04.
- m_nuquantity-like [‘energy’, ‘mass’] or numpy:array_like, optional
Mass of each neutrino species in [eV] (mass-energy equivalency enabled). If this is a scalar Quantity, then all neutrino species are assumed to have that mass. Otherwise, the mass of each species. The actual number of neutrino species (and hence the number of elements of m_nu if it is not scalar) must be the floor of Neff. Typically this means you should provide three neutrino masses unless you are considering something like a sterile neutrino.
- Ob0
python:float
orpython:None
, optional Omega baryons: density of baryonic matter in units of the critical density at z=0. If this is set to None (the default), any computation that requires its value will raise an exception.
- name
python:str
orpython:None
, optional Name for this cosmological object.
- H0
Examples
>>> from astropy.cosmology import FlatwCDM >>> cosmo = FlatwCDM(H0=70, Om0=0.3, w0=-0.9)
The comoving distance in Mpc at redshift z:
>>> z = 0.5 >>> dc = cosmo.comoving_distance(z)
Methods Summary
efunc
(z)Function used to calculate H(z), the Hubble parameter.
inv_efunc
(z)Function used to calculate \(\frac{1}{H_z}\).
Methods Documentation