This code computes the average halo sparsity for massive halos (>1013 MSun h-1) at a given redshift for a given cosmological model by solving Eq. (4) in Corasaniti et al. (2018) for two different overdensity cases (<s200,500> and <s500,1000>) assuming mass function parametrizations from Despali et al. (2016) or calibrated against the RayGal simulation halo catalogs. In the case of the Despali et al. mass functions the average sparsity includes the matched halo correction calibrated on the RayGal simulations. The input linear matter power spectrum for a given set of cosmological parameters is given by the Eisenstein & Hu (1998) formulae of the linear transfer function, while the linearly extrapolated spherical collapse threshold is given by the formula from Kitayama & Suto (1996). For more details see Corasaniti et al. (2018) and Corasaniti, Sereno & Ettori (in preparation).
The code can be downloaded from the GitHub repository:
How to run the code
Modify the Makefile for your compiler and optimization flags (default is gfortran -O3) and compile with the command
run the code with the command
Enter the values of: Omegam, Omegab h2, h, sigma8, ns, w0, wa and zout the redshift output of the halo sparsity (values should be separated by a coma or entered one by one touching the return key after each entry).
Namelist files for LCDM-WMAP7 and Planck cosmological parameters can be found in the NAMELIST folder, in such a case run as:
./sparsity < NAMELIST/par_XXX.nml
The code output on the screen the value of the sparsity.
The code can be easily modified to compute the sparsity over a discretized redshift interval zmin < z < zmax, and it can be hacked with a bit of work to include other mass function parametrizations (see corresponding functions in module MF in mf_commons.f90) and also extended to include sparsity definitions for other overdensity thresolds.
If you use the code please cite: