Stellar mass to halo mass ratio

class StellarMass.MultiDark

The class MultiDark is a wrapper to handle Multidark simulations results / outputs.

class StellarMass.StellarMass(Lbox=<Quantity 2500.0 Mpc>, boxDir='/home/comparat/data/MultiDark', snl=[], Hbox=<Quantity 67.77 km / (Mpc s)>, Melement=23593750000.0)[source]

Loads the environement to assign stellar masses to halos from dark matter only simulations, here MultiDark simulations. :param Lbox: length of the box in Mpc/h :param wdir: Path to the multidark lightcone directory :param boxDir: box directory name :param snl: list of snapshots available :param zsl: list of redshift corresponding to the snapshots :param zArray: redshift array to be considered to interpolate the redshift – distance conversion :param Hbox: Hubble constant at redshift 0 of the box :param Melement: Mass of the resolution element in solar masses. :param columnDict: dictionnary to convert column name into the index to find it in the snapshots

SMHMr(Mh, z)[source]

Computes the mu star parameter for a halo mass according to the Moster et al. 2013 equations

Returns :

$mu_* = 2left(0.0351 - 0.0247

rac{z}{1+z} ight)left(left[left( rac{10^{11.59 + 1.195 rac{z}{1+z}}}{M_h} ight)^{1.376 - 0.826 rac{z}{1+z}} + left( rac{M_h}{10^{11.59 + 1.195 rac{z}{1+z}}} ight)^{0.608 + 0.329 rac{z}{1+z}} ight]^{-1} ight)- 0.0225$

param Mh:halo mass array
param z:redshift array
meanSM(Mh, z)[source]

Computes the mu star parameter for a halo mass according to the Moster et al. 2013 equations

Returns :

$mu_* = 2left(0.0351 - 0.0247

rac{z}{1+z} ight)left(left[left( rac{10^{11.59 + 1.195 rac{z}{1+z}}}{M_h} ight)^{1.376 - 0.826 rac{z}{1+z}} + left( rac{M_h}{10^{11.59 + 1.195 rac{z}{1+z}}} ight)^{0.608 + 0.329 rac{z}{1+z}} ight]^{-1} ight)- 0.0225$

param Mh:halo mass array
param z:redshift array
sample_Ms(Mh, z, scatter=0.15)[source]

Draws a stellar mass from a lognormal distribution centered on mu_star with witdth sigma_star

Parameters:
  • Mh – halo mass
  • z – redshift
  • scatter – scatter in the stellar mass to halo mass relation