Barak 0.3.2 documentation

barak.virial.find_rvT

«  barak.virial.deltavir   ::   Contents   ::   barak.voigt.voigt  »

barak.virial.find_rvT

barak.virial.find_rvT(M, z, cosmo=None, mu=0.59)[source]

Find the virial radius, circular velocity and temperature for a dark matter halo at a given mass and redshift.

Parameters :

mass : array_like, shape N

Total halo mass (including dark matter) in solar masses.

z : array_like, shape M

Redshift.

cosmo : cosmology (optional)

The cosmology to use.

mu : float (optional)

The mean molecular weight. The virial temperature is proportional to mu.

Returns :

vir : named tuple of ndarrays with shape (N, M)

The virial radius (proper kpc), circular velocity (km/s) and temperature (K). If N or M is 1, that dimension is suppressed.

Notes

The value of mu depends on the ionization fraction of the gas; mu = 0.59 for a fully ionized primordial gas (the default), mu = 0.61 for a gas with ionized hydrogen but only singly ionized helium, and mu = 1.22 for neutral primordial gas.

Examples

>>> vir = find_rvT(1e12, 0)
>>> print vir.r, vir.v, vir.T
261.195728743 128.338776885 588643.476006
>>> r,v,T = find_rvT(1e12, [0.5, 1, 1.5, 2])
>>> r
array([ 198.57846074,  156.44358398,  127.91018732,  107.74327378])
>>> v
array([ 147.1888328 ,  165.82959995,  183.39536858,  199.82317152])
>>> T
array([  774259.0063081 ,   982789.81965216,  1202024.36495813,
       1427014.0148491 ])

«  barak.virial.deltavir   ::   Contents   ::   barak.voigt.voigt  »