ps_line_hm.c File Reference

Documented halo-model computation of line power spectrum, including clustering and stochastic contributions beyond Poisson limit. More...

#include "header.h"
Include dependency graph for ps_line_hm.c:

Functions

double PS_line_HM (struct Cosmology *Cx, double k, double z, double M_min, long mode_mf, long line_type, int line_id)
 Compute the clustering contribution to the line power spectrum using halo-model. More...
 
double PS_shot_HM (struct Cosmology *Cx, double k, double z, double M_min, double *input, long mode_mf, long line_type, int line_id)
 Compute the shot noise contributions, including corrections beyond poisson limit (see 1706.08738 for more details) If nfw=1, the dependance of the power spectrum on the halo profile is neglected. More...
 
static int mhmc_integ (const int *ndim, const cubareal x[], const int *ncomp, cubareal ff[], void *p)
 The integrand function passed passed to Cuhre integration routine of CUBA library to compute the corrections to mass integration. More...
 
void mhmc (struct Cosmology *Cx, double z, long mode_mf, double *result)
 Compute the corrections to mass integration of HM matter power spectrum. More...
 
static int HM_1h2h_integ (const int *ndim, const cubareal x[], const int *ncomp, cubareal ff[], void *p)
 The integrand function passed passed to Cuhre integration routine to compute 1- and 2-halo integrals. More...
 
void HM_1h2h (struct Cosmology *Cx, double k, double z, double M_min, long mode_mf, long line_type, long mode_hm, double *result)
 Compute the mass integrals needed for 1- and 1-halo line, line-matter and matter power spectrum If nfw=1, the dependance of the power spectrum on the halo profile is neglected. More...
 
static int b22_ls_integrand (const int *ndim, const cubareal x[], const int *ncomp, cubareal ff[], void *p)
 The integrand function passed passed to Cuhre integration routine to compute large-scale limit of b22 (shot-noise contribution) More...
 
double b22_ls (struct Cosmology *Cx, double z)
 Compute the large-scale limit of P_b2b2 loop. More...
 

Detailed Description

Documented halo-model computation of line power spectrum, including clustering and stochastic contributions beyond Poisson limit.

Azadeh Moradinezhad Dizgah, November 4th 2021

This module has two main functions:

  • PS_line_HM() to compute clustering (1- and 2-halo terms). The 2-halo term, includes nonlinear corrections to halo power spectrum arising from nonlinearities of matter fluctuations and halo biases.
  • PS_shot_HM() to compute the stochastic contrubutions beyond Poisson shot noise (see arXiv:1706.08738)

The other functions in these modules are utilities for computing the above two main functions.

In summary, the following functions can be called from other modules:

  1. PS_line_HM() computes the 1loop-HM line power spectrum
  2. PS_shot_HM() computes the full line power spectrum, beyond poisson limit
  3. mhmc() computes th corrections to mass integration of halo-model matter power spectrum
  4. HM_1h2h() performs the mass integraks for computing 1- and 2-halo terms of line-line, line-matter and matter-matter power spectra.
  5. b22_ls() computes the large-scale limit of P_b2b2 loop which behaves like a constant and so contributes to the shot noise.

Function Documentation

◆ b22_ls()

double b22_ls ( struct Cosmology Cx,
double  z 
)

Compute the large-scale limit of P_b2b2 loop.

Parameters
CxInput: Cosmology structure
zInput: redshift
Returns
b22_ls
Here is the call graph for this function:
Here is the caller graph for this function:

◆ b22_ls_integrand()

static int b22_ls_integrand ( const int *  ndim,
const cubareal  x[],
const int *  ncomp,
cubareal  ff[],
void *  p 
)
static

The integrand function passed passed to Cuhre integration routine to compute large-scale limit of b22 (shot-noise contribution)

Parameters
ndimInput: Dimensionality of the domain of integration
xInput: An array of integration variables
ncompInput: Dimensionality of the integrand function
ffInput: Array of values of the integrand of dimension fdim
pInput: integration parmaeters return the error status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HM_1h2h()

void HM_1h2h ( struct Cosmology Cx,
double  k,
double  z,
double  M_min,
long  mode_mf,
long  line_type,
long  mode_hm,
double *  result 
)

Compute the mass integrals needed for 1- and 1-halo line, line-matter and matter power spectrum If nfw=1, the dependance of the power spectrum on the halo profile is neglected.

Otherwise, NFW halo profile is assumed

Parameters
CxInput: Cosmology structure
kInput: wavenumber in unit of 1/Mpc.
zInput: redshift
M_minInput: minimum halo mass for mass integrals
mode_mfInput: theoretical model of halo mass function to use. It can be set to sheth-Tormen (ST), Tinker (TR) or Press-Schecter (PSC)
line_typeInput: name of the line to compute. It can be set to CII, CO10, CO21, CO32, CO43, CO54, CO65
mode_hmInput: a switch to decide whetehr to compute gthe mass integrations. It can be set to:
  • LINE for line power spectrum,
  • LINEMATTER for line-matter cross spectrum
  • MATTER for matter power spectrum
resultOutput: anarray of the integration results. Number of elements varies depending on mode_hm switch:
  • 3 elements if mode_hm = LINE,
  • 1 element if mode_hm = LINEMATTER
  • 2 element if mode_hm = MATTER esults[0]: correction to 1-halo term, result[1]: correcrions to 2-halo term assuming linear halo bias
Returns
void in unit of M_sun/Mpc^3
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HM_1h2h_integ()

static int HM_1h2h_integ ( const int *  ndim,
const cubareal  x[],
const int *  ncomp,
cubareal  ff[],
void *  p 
)
static

The integrand function passed passed to Cuhre integration routine to compute 1- and 2-halo integrals.

Parameters
ndimInput: Dimensionality of the domain of integration
xInput: An array of integration variables
ncompInput: Dimensionality of the integrand function
ffInput: Array of values of the integrand of dimension fdim
pInput: integration parmaeters return the error status

we assume the profile of both matter and line are NFW

integrand of line 1halo term

integrand of 2halo term proportional to b1, the linear local-in-matter halo bias

integrand of 1halo term of line-matter cross-spectrum

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mhmc()

void mhmc ( struct Cosmology Cx,
double  z,
long  mode_mf,
double *  result 
)

Compute the corrections to mass integration of HM matter power spectrum.

Parameters
CxInput: Cosmology structure
zInput: redshift
mode_mfInpute: theoretical model of halo mass function to use. It can be set to Press-Schecter (PSC), sheth-Tormen (ST), Tinker (TR)
resultOutput: a 2d array of the integration results,
  • results[0]: correction to 1-halo term,
  • result[1]: correcrions to 2-halo term assuming linear halo bias
Returns
void
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mhmc_integ()

static int mhmc_integ ( const int *  ndim,
const cubareal  x[],
const int *  ncomp,
cubareal  ff[],
void *  p 
)
static

The integrand function passed passed to Cuhre integration routine of CUBA library to compute the corrections to mass integration.

When computing the matter power spectrum using halo-model, the mass integrations for 1- and 2-loop terms get contributions from halos of all masses. For numerical computation, we need to impose a lower and upper integration limit. While the result of the integration are not sensitive to the upper bound (due to the fact that the mass function drops rapidly at high M_h) the choice of the lower bound affects the results. We can compute the leading order corrections to the integral that are accurate up to (k R_s)^2. (see App. A of arXiv:1511.02231 for more details.)

Parameters
ndimInput: Dimensionality of the domain of integration
xInput: An array of integration variables
ncompInput: Dimensionality of the integrand function
ffInput: Array of values of the integrand of dimension fdim
pInput: integration parmaeters return the error status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PS_line_HM()

double PS_line_HM ( struct Cosmology Cx,
double  k,
double  z,
double  M_min,
long  mode_mf,
long  line_type,
int  line_id 
)

Compute the clustering contribution to the line power spectrum using halo-model.

If nfw=1, the dependance of the power spectrum on the halo profile is neglected. Otherwise, NFW halo profile is assumed

Parameters
CxInput: pointer to Cosmology structure
kInput: wavenumber in unit of 1/Mpc.
zInput: redshift
M_minInput: minimum halo mass for mass integrals
mode_mfInpute: theoretical model of halo mass function to use. It can be set to sheth-Tormen (ST), Tinker (TR) or Press-Schecter (PSC)
line_typeInpute: name of the line to compute. It can be set to CII, CO10, CO21, CO32, CO43, CO54, CO65
line_idInpute: id of the line to be considered.
Returns
P_clust(k)

Boltzmann constant in unit of erg K^-1

in unit of erg/s

CII

to plot the power spectrum in units of micro K^2 Mpc^3

in unit of M_sun/Mpc^3

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PS_shot_HM()

double PS_shot_HM ( struct Cosmology Cx,
double  k,
double  z,
double  M_min,
double *  input,
long  mode_mf,
long  line_type,
int  line_id 
)

Compute the shot noise contributions, including corrections beyond poisson limit (see 1706.08738 for more details) If nfw=1, the dependance of the power spectrum on the halo profile is neglected.

Otherwise, NFW halo profile is assumed

Parameters
CxInput: Cosmology structure
kInput: wavenumber in unit of 1/Mpc.
zInput: redshift
M_minInput: minimum halo mass for mass integrals
inputinpute: an array of input values with 4 values, Tave_line, b1_line, pb22_ls, line_shot, rhom_bar
mode_mfInpute: theoretical model of halo mass function to use. It can be set to sheth-Tormen (ST), Tinker (TR) or Press-Schecter (PSC)
line_typeInpute: name of the line to compute. It can be set to CII, CO10, CO21, CO32, CO43, CO54, CO65
Returns
P_stoch(k)

Boltzmann constant in unit of erg K^-1

in unit of erg/s

CII

Since the following quantities do not depend on k, I am computing them once and pass them as input to this function

to plot the power spectrum in units of micro K^2 Mpc^3

in unit of M_sun/Mpc^3

in unit of M_sun/Mpc^3

in unit of M_sun/Mpc^3

Here is the call graph for this function:
Here is the caller graph for this function: