CCL
Functions
ccl_massfunc.c File Reference
#include "ccl.h"
#include "ccl_core.h"
#include "ccl_utils.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gsl/gsl_integration.h"
#include "gsl/gsl_interp.h"
#include "gsl/gsl_spline.h"
#include "ccl_power.h"
#include "ccl_massfunc.h"
#include "ccl_error.h"
#include "ccl_params.h"

Functions

void ccl_cosmology_compute_hmfparams (ccl_cosmology *cosmo, int *status)
 
void ccl_cosmology_compute_sigma (ccl_cosmology *cosmo, int *status)
 
double ccl_massfunc (ccl_cosmology *cosmo, double halomass, double a, double odelta, int *status)
 
double ccl_halo_bias (ccl_cosmology *cosmo, double halomass, double a, double odelta, int *status)
 
double ccl_massfunc_m2r (ccl_cosmology *cosmo, double halomass, int *status)
 
double ccl_sigmaM (ccl_cosmology *cosmo, double halomass, double a, int *status)
 

Function Documentation

◆ ccl_cosmology_compute_hmfparams()

void ccl_cosmology_compute_hmfparams ( ccl_cosmology cosmo,
int *  status 
)

Updates Tinker mass function fitting formulas for specific Delta

Parameters
cosmoCosmological parameters
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.

◆ ccl_cosmology_compute_sigma()

void ccl_cosmology_compute_sigma ( ccl_cosmology cosmo,
int *  status 
)

Computes sigma(R), the power spectrum normalization, over log-spaced values of mass and radii The result is attached to the cosmology object

Parameters
cosmoCosmological parameters
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.

◆ ccl_halo_bias()

double ccl_halo_bias ( ccl_cosmology cosmo,
double  smooth_mass,
double  a,
double  odelta,
int *  status 
)

Compute the linear halo bias for a cosmology and mass scale

Parameters
cosmoCosmological parameters
smooth_massMass to compute at, in units of Msun
aScale factor, normalized to a=1 today
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.
Returns
hb, the halo bias at the specified parameters

◆ ccl_massfunc()

double ccl_massfunc ( ccl_cosmology cosmo,
double  smooth_mass,
double  a,
double  odelta,
int *  status 
)

Compute halo mass function at a given mass for a given cosmology as dn/ dlog10(M)

Parameters
cosmoCosmological parameters
smooth_massMass to compute at, in units of Msun
aScale factor, normalized to a=1 today
odeltachoice of Delta
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.
Returns
massfunc, the value of the mass function at the specified parameters

◆ ccl_massfunc_m2r()

double ccl_massfunc_m2r ( ccl_cosmology cosmo,
double  smooth_mass,
int *  status 
)

Convert smoothing halo mass in units of Msun to smoothing halo radius in units of Mpc.

Parameters
cosmoCosmological parameters
smooth_massMass to compute at, in units of Msun
aScale factor, normalized to a=1 today
odeltachoice of Delta
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.
Returns
smooth_radius, the equivalent tophat smoothing radius corresponding to smooth_mass

◆ ccl_sigmaM()

double ccl_sigmaM ( ccl_cosmology cosmo,
double  smooth_mass,
double  a,
int *  status 
)

Calculate the standard deviation of density at smoothing mass M via interpolation. Return sigma from the sigmaM interpolation. Also computes the sigma interpolation if necessary.

Parameters
cosmoCosmological parameters
smooth_massMass to compute at, in units of Msun
aScale factor, normalized to a=1 today
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.
Returns
sigmaM, the standard deviation of density at mass scale M