CCL
Data Structures | Functions
ccl_power.c File Reference
#include "ccl_core.h"
#include "ccl_utils.h"
#include "math.h"
#include "stdio.h"
#include "stdlib.h"
#include "gsl/gsl_integration.h"
#include "gsl/gsl_interp.h"
#include "gsl/gsl_spline.h"
#include "ccl_placeholder.h"
#include "ccl_background.h"
#include "ccl_power.h"
#include "ccl_error.h"
#include "class.h"
#include "ccl_params.h"

Data Structures

struct  eh_struct
 
struct  SigmaR_pars
 

Functions

void ccl_cosmology_compute_power (ccl_cosmology *cosmo, int *status)
 
double ccl_linear_matter_power (ccl_cosmology *cosmo, double k, double a, int *status)
 
double ccl_nonlin_matter_power (ccl_cosmology *cosmo, double k, double a, int *status)
 
double ccl_sigmaR (ccl_cosmology *cosmo, double R, int *status)
 
double ccl_sigma8 (ccl_cosmology *cosmo, int *status)
 

Function Documentation

◆ ccl_cosmology_compute_power()

void ccl_cosmology_compute_power ( ccl_cosmology cosmo,
int *  status 
)

Compute the power spectrum and create a 2d spline P(k,z) to be stored in the cosmology structure.

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

◆ ccl_linear_matter_power()

double ccl_linear_matter_power ( ccl_cosmology cosmo,
double  k,
double  a,
int *  status 
)

Linear matter power spectrum. Returns P_lin(k,a) [Mpc^3] for given cosmology, using the method specified in cosmo->config.transfer_function_method.

Parameters
cosmoCosmology parameters and configurations
kFourier mode, in [1/Mpc] units
ascale factor, normalized to 1 for today
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c
Returns
P_lin(k,a).

◆ ccl_nonlin_matter_power()

double ccl_nonlin_matter_power ( ccl_cosmology cosmo,
double  k,
double  a,
int *  status 
)

Non-linear matter power spectrum. Returns P_NL(k,a) [Mpc^3] for given cosmology, using the method specified in cosmo->config.transfer_function_method and cosmo->config.matter_power_spectrum_method.

Parameters
cosmoCosmology parameters and configurations
kFourier mode, in [1/Mpc] units
ascale factor, normalized to 1 for today
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c
Returns
P_NL(k,a).

◆ ccl_sigma8()

double ccl_sigma8 ( ccl_cosmology cosmo,
int *  status 
)

Computes sigma_8, variance of the matter density field with (top-hat) smoothing scale R = 8 Mpc/h, from linear power spectrum. Returns sigma_8 for specified cosmology.

Parameters
cosmoCosmology parameters and configurations
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c
Returns
sigma_8.

◆ ccl_sigmaR()

double ccl_sigmaR ( ccl_cosmology cosmo,
double  R,
int *  status 
)

Variance of the matter density field with (top-hat) smoothing scale R [Mpc]. Returns sigma(R) for specified cosmology at a = 1.

Parameters
cosmoCosmology parameters and configurations
RSmoothing scale, in [Mpc] units
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c
Returns
sigma(R).