|
CLASSpp Manual
Cosmology reference and developer manual
|
#include <precision.h>
- general precision parameters | |
| double | smallest_allowed_variation |
| void | ResolveDataPaths () |
| void | parse (const FileContent &fc) |
All precision parameters.
Includes integrations steps, flags telling how the computation is to be performed, etc.
| void precision::ResolveDataPaths | ( | ) |
| void precision::parse | ( | const FileContent & | fc | ) |
Parse precision parameters from a configuration file.
| double precision::a_ini_over_a_today_default = 1.e-14 |
Default initial value of scale factor used in the integration of background quantities. For models like ncdm, the code may decide to start the integration earlier.
| double precision::back_integration_stepsize = 7.e-3 |
Default stepsize in conformal time for the background integration, in units for the conformal Hubble time. dtau = back_integration_stepsize/aH
| double precision::tol_background_integration = 1.e-6 |
Tolerance of the background integration, giving the allowed relative integration error. Passed to the evolver in background_solve_evolver(). The default is 1e-6 (not the historical 1e-2): the removed legacy RK solver had no dense output, so the requested output points capped the step size and the step count acted as the effective precision knob; the evolver instead relies on this tolerance directly, so it must be tight.
| double precision::tol_initial_Omega_r = 1.e-4 |
Tolerance of the deviation of 
| double precision::tol_M_ncdm = 1.e-7 |
Tolerance of relative deviation of the used non-cold dark matter mass compared to that which would give the correct density. The dark matter mass is estimated from the dark matter density using a Newton-Method. In the nonrelativistic limit, this could be estimated using M=density/number density
| double precision::tol_ncdm_synchronous = 3.4e-3 |
Tolerance on the relative precision of the integration over non-cold dark matter phase-space distributions in the synchronous gauge. The convenience input key "tol_ncdm" sets both this and tol_ncdm_newtonian.
| double precision::tol_ncdm_newtonian = 9.05e-5 |
Tolerance on the relative precision of the integration over non-cold dark matter phase-space distributions in the newtonian gauge. Newtonian gauge needs a finer ncdm momentum grid than synchronous for the same P(k) accuracy, hence the tighter default.
| double precision::tol_ncdm_bg = 1.e-5 |
Tolerance on the relative precision of the integration over non-cold dark matter phase-space distributions during the background evolution.
| double precision::tol_ncdm_initial_w = 1.e-3 |
Tolerance on the initial deviation of non-cold dark matter from being fully relativistic. Using w = pressure/density, this quantifies the maximum deviation from 1/3. (for relativistic species)
| double precision::tol_tau_eq = 1.e-6 |
Tolerance on the deviation of the conformal time of equality from the true value in 1/Mpc.
| double precision::Omega0_cdm_min_synchronous = 1.e-10 |
Minimum amount of cdm to allow calculations in synchronous gauge comoving with cdm.
| std::string precision::sBBN_file = "/bbn/sBBN_2017.dat" |
Big Bang Nucleosynthesis file path. The file specifies the predictions for 


| double precision::recfast_z_initial = 1.0e4 |
The initial z for the recfast calculation of the recombination history, e.g. 10^4
| int precision::recfast_Nz0 = 20000 |
Number of recfast integration steps, e.g. if this is 1.10^4 and the previous one is 10^4, the step will be Delta z = 0.5
| double precision::thermo_z_initial_idm_dr = 1.0e9 |
If there is interacting DM, we want the thermodynamics table to start at a much larger z, in order to capture the possible non-trivial behavior of the dark matter interaction rate at early times:
| double precision::tol_thermo_integration = 1.0e-7 |
Tolerance for thermodynamical integration. RECFAST now uses the shared evolver interface with dense output, so this is a true ODE tolerance rather than a legacy per-redshift-bin RK correction tolerance.
| int precision::recfast_Heswitch |
from recfast 1.4, specifies how accurate the Helium recombination should be handled
| double precision::recfast_fudge_He |
from recfast 1.4, fugde factor for Peeble's equation coefficient of Helium
| int precision::recfast_Hswitch |
from recfast 1.5, specifies how accurate the Hydrogen recombination should be handled
| double precision::recfast_fudge_H |
from recfast 1.4, fudge factor for Peeble's equation coeffient of Hydrogen
| double precision::recfast_delta_fudge_H |
from recfast 1.5.2, increasing Hydrogen fudge factor if Hswitch is enabled
| double precision::recfast_AGauss1 = -0.14 |
from recfast 1.5, Gaussian Peeble prefactor fit, amplitude
| double precision::recfast_AGauss2 |
from recfast 1.5.2, Gaussian Peeble prefactor fit, amplitude
| double precision::recfast_zGauss1 = 7.28 |
from recfast 1.5, Gaussian Peeble prefactor fit, center
| double precision::recfast_zGauss2 = 6.73 |
from recfast 1.5.2, Gaussian Peeble prefactor fit, center
| double precision::recfast_wGauss1 = 0.18 |
from recfast 1.5, Gaussian Peeble prefactor fit, width
| double precision::recfast_wGauss2 = 0.33 |
from recfast 1.5, Gaussian Peeble prefactor fit, width
| double precision::recfast_z_He_1 = 8000.0 |
from recfast 1.4, Starting value of Helium recombination 1
| double precision::recfast_delta_z_He_1 |
Smoothing factor for recombination approximation switching, found to be OK on 3.09.10
| double precision::recfast_z_He_2 = 5000.0 |
from recfast 1.4, Ending value of Helium recombination 1
| double precision::recfast_delta_z_He_2 |
Smoothing factor for recombination approximation switching, found to be OK on 3.09.10
| double precision::recfast_z_He_3 = 3500.0 |
from recfast 1.4, Starting value of Helium recombination 2
| double precision::recfast_delta_z_He_3 |
Smoothing factor for recombination approximation switching, found to be OK on 3.09.10
| double precision::recfast_x_He0_trigger |
Switch for Helium full calculation during reco, raised from 0.99 to 0.995 for smoother Helium
| double precision::recfast_x_He0_trigger_delta |
Smoothing factor for recombination approximation switching, found to be OK on 3.09.10
| double precision::recfast_x_H0_trigger |
Switch for Hydrogen full calculation during reco, raised from 0.99 to 0.995 for smoother Hydrogen
| double precision::recfast_x_H0_trigger2 |
Switch for Hydrogen full calculation during reco, for changing Hydrogen flag, raised from 0.98 to same as previous one for smoother Hydrogen
| double precision::recfast_x_H0_trigger_delta |
Smoothing factor for recombination approximation switching, found to be OK on 3.09.10
| double precision::recfast_H_frac |
from recfast 1.4, specifies the time at which the temperature evolution is calculated by the more precise equation
| double precision::reionization_z_start_max = 50.0 |
Maximum starting value in z for reionization
| double precision::reionization_sampling = 5.0e-2 |
Sampling density in z during reionization
| double precision::reionization_optical_depth_tol |
Relative tolerance on finding the user-given optical depth of reionization given a certain redshift of reionization
| double precision::reionization_start_factor |
Searching optical depth corresponding to the redshift is started from an initial offset beyond z_reionization_start, multiplied by reionization_width
| int precision::thermo_rate_smoothing_radius |
Smoothing in redshift of the variation rate of 

| std::string precision::hyrec_Alpha_inf_file |
File containing the alpha parameter of hyrec
| std::string precision::hyrec_R_inf_file |
File containing the R_inf parameter of hyrec
| std::string precision::hyrec_two_photon_tables_file |
File containing the two-photon interaction parameter of hyrec
| double precision::k_min_tau0 |
number defining k_min for the computation of Cl's and P(k)'s (dimensionless): (k_min tau_0), usually chosen much smaller than one
| double precision::k_max_tau0_over_l_max |
number defining k_max for the computation of Cl's (dimensionless): (k_max tau_0)/l_max, usually chosen around two. Since v3.2.2, the separate full-Limber grid keeps CMB lensing accurate at high l, allowing the standard transfer grid to stop at 1.8 instead of 2.4.
| double precision::k_step_sub |
step in k space, in units of one period of acoustic oscillation at decoupling, for scales inside sound horizon at decoupling
| double precision::k_step_super |
step in k space, in units of one period of acoustic oscillation at decoupling, for scales above sound horizon at decoupling
| double precision::k_step_transition |
dimensionless number regulating the transition from 'sub' steps to 'super' steps. Decrease for more precision.
| double precision::k_step_super_reduction |
the step k_step_super is reduced by this amount in the k-->0 limit (below scale of Hubble and/or curvature radius)
| double precision::k_per_decade_for_pk |
if values needed between kmax inferred from k_oscillations and k_kmax_for_pk, this gives the number of k per decade outside the BAO region
| double precision::idmdr_boost_k_per_decade_for_pk |
boost factor for the case of DAO in idm-idr models
| double precision::k_per_decade_for_bao |
if values needed between kmax inferred from k_oscillations and k_kmax_for_pk, this gives the number of k per decade inside the BAO region (for finer sampling)
| double precision::k_bao_center |
in ln(k) space, the central value of the BAO region where sampling is finer is defined as k_rec times this number (recommended: 3, i.e. finest sampling near 3rd BAO peak)
| double precision::k_bao_width |
in ln(k) space, width of the BAO region where sampling is finer: this number gives roughly the number of BAO oscillations well resolved on both sides of the central value (recommended: 4, i.e. finest sampling from before first up to 3+4=7th peak)
| double precision::start_small_k_at_tau_c_over_tau_h |
largest wavelengths start being sampled when universe is sufficiently opaque. This is quantified in terms of the ratio of thermo to hubble time scales, 
| double precision::start_large_k_at_tau_h_over_tau_k |
largest wavelengths start being sampled when mode is sufficiently outside Hubble scale. This is quantified in terms of the ratio of hubble time scale to wavenumber time scale, 
| double precision::tight_coupling_trigger_tau_c_over_tau_h = 0.015 |
when to switch off tight-coupling approximation: first condition: 
| double precision::tight_coupling_trigger_tau_c_over_tau_k = 0.01 |
when to switch off tight-coupling approximation: second condition: 
| double precision::start_sources_at_tau_c_over_tau_h |
sources start being sampled when universe is sufficiently opaque. This is quantified in terms of the ratio of thermo to hubble time scales, 
| int precision::tight_coupling_approximation |
method for tight coupling approximation
| double precision::idm_dr_tight_coupling_trigger_tau_c_over_tau_k |
when to switch off the dark-tight-coupling approximation, first condition (see normal tca for full definition)
| double precision::idm_dr_tight_coupling_trigger_tau_c_over_tau_h |
when to switch off the dark-tight-coupling approximation, second condition (see normal tca for full definition)
| double precision::idm_drmd_tight_coupling_trigger_G_over_aH |
when to switch off the dark-tight-coupling approximation in DRMD, should be larger than at least 100 (currently set to a very high number as the code runs perfectly fine without the approximation.)
| int precision::l_max_g |
number of momenta in Boltzmann hierarchy for photon temperature (scalar), at least 4
| int precision::l_max_pol_g |
number of momenta in Boltzmann hierarchy for photon polarization (scalar), at least 4
| int precision::l_max_dr |
number of momenta in Boltzmann hierarchy for decay radiation, at least 4
| int precision::l_max_dr_col |
number of collision terms in Boltzmann hierarchy for decay radiation, at least 2
| int precision::l_max_ur |
number of momenta in Boltzmann hierarchy for relativistic neutrino/relics (scalar), at least 4
| int precision::l_max_idr |
number of momenta in Boltzmann hierarchy for interacting dark radiation
| int precision::l_max_ncdm |
number of momenta in Boltzmann hierarchy for relativistic neutrino/relics (scalar), at least 4
| int precision::l_max_g_ten |
number of momenta in Boltzmann hierarchy for photon temperature (tensor), at least 4
| int precision::l_max_pol_g_ten |
number of momenta in Boltzmann hierarchy for photon polarization (tensor), at least 4
| double precision::curvature_ini = 1.0 |
initial condition for curvature for adiabatic
| double precision::entropy_ini = 1.0 |
initial condition for entropy perturbation for isocurvature
| double precision::gw_ini = 1.0 |
initial condition for tensor metric perturbation h
| double precision::perturb_integration_stepsize = 0.5 |
default step 



| double precision::perturb_sampling_stepsize = 0.1 |
default step 

| double precision::perturbations_sampling_boost_above_age_fraction = 0.9 |
Age fraction above which source sampling is twice as fine. This improves the low-l CMB lensing line-of-sight integral; 1.0 disables the boost.
| double precision::tol_perturb_integration = 1.0e-5 |
control parameter for the precision of the perturbation integration, IMPORTANT FOR SETTING THE STEPSIZE OF NDF15
| double precision::c_gamma_k_H_square_max = 1.0e3 |
cutoff relevant for controlling stiffness in the PPF scheme. It is neccessary for the Runge-Kutta evolver, but not for ndf15. However, the approximation is excellent for a cutoff value of 1000, so we leave it on for both evolvers. (CAMB uses a cutoff value of 30.)
| double precision::tol_tau_approx = 1.0e-10 |
precision with which the code should determine (by bisection) the times at which sources start being sampled, and at which approximations must be switched on/off (units of Mpc)
| int precision::radiation_streaming_approximation = static_cast<int>(rsa_method::rsa_MD_with_reio) |
method for switching off photon perturbations
| double precision::radiation_streaming_trigger_tau_over_tau_k = 45.0 |
when to switch off photon perturbations, ie when to switch on photon free-streaming approximation (keep density and thtau, set shear and higher momenta to zero): first condition: 
| double precision::radiation_streaming_trigger_tau_c_over_tau = 5.0 |
when to switch off photon perturbations, ie when to switch on photon free-streaming approximation (keep density and theta, set shear and higher momenta to zero): second condition:
| int precision::idr_streaming_approximation |
method for dark radiation free-streaming approximation
| double precision::idr_streaming_trigger_tau_over_tau_k |
when to switch on dark radiation (idr) free-streaming approximation, first condition
| double precision::idr_streaming_trigger_tau_c_over_tau |
when to switch on dark radiation (idr) free-streaming approximation, second condition
| int precision::ur_fluid_approximation |
method for ultra relativistic fluid approximation
| double precision::ur_fluid_trigger_tau_over_tau_k = 30.0 |
when to switch off ur (massless neutrinos / ultra-relativistic relics) fluid approximation
| int precision::ncdm_fluid_approximation |
method for non-cold dark matter fluid approximation
| double precision::ncdm_fluid_trigger_tau_over_tau_k = 31.0 |
when to switch off ncdm (massive neutrinos / non-cold relics) fluid approximation
| double precision::neglect_CMB_sources_below_visibility = 1.0e-3 |
whether CMB source functions can be approximated as zero when visibility function g(tau) is tiny
| evolver_type precision::evolver = evolver_type::ndf15 |
The type of evolver to use: options are ndf15 or rk
| double precision::k_per_decade_primordial |
logarithmic sampling for primordial spectra (number of points per decade in k space)
| double precision::primordial_inflation_ratio_min |
for each k, start following wavenumber when aH = k/primordial_inflation_ratio_min
| double precision::primordial_inflation_ratio_max |
for each k, stop following wavenumber, at the latest, when aH = k/primordial_inflation_ratio_max
| int precision::primordial_inflation_phi_ini_maxit |
maximum number of iteration when searching a suitable initial field value phi_ini (value reached when no long-enough slow-roll period before the pivot scale)
| double precision::primordial_inflation_pt_stepsize |
controls the integration timestep for inflaton perturbations
| double precision::primordial_inflation_bg_stepsize |
controls the integration timestep for inflaton background
| double precision::primordial_inflation_tol_integration |
controls the precision of the ODE integration during inflation
| double precision::primordial_inflation_attractor_precision_pivot |
targeted precision when searching attractor solution near phi_pivot
| double precision::primordial_inflation_attractor_precision_initial |
targeted precision when searching attractor solution near phi_ini
| int precision::primordial_inflation_attractor_maxit |
maximum number of iteration when searching attractor solution
| double precision::primordial_inflation_tol_curvature |
for each k, stop following wavenumber, at the latest, when curvature perturbation R is stable up to to this tolerance
| double precision::primordial_inflation_aH_ini_target |
control the step size in the search for a suitable initial field value
| double precision::primordial_inflation_end_dphi |
first bracketing width, when trying to bracket the value phi_end at which inflation ends naturally
| double precision::primordial_inflation_end_logstep |
logarithmic step for updating the bracketing width, when trying to bracket the value phi_end at which inflation ends naturally
| double precision::primordial_inflation_small_epsilon |
value of slow-roll parameter epsilon used to define a field value phi_end close to the end of inflation (doesn't need to be exactly at the end): epsilon(phi_end)=small_epsilon (should be smaller than one)
| double precision::primordial_inflation_small_epsilon_tol = 0.01 |
tolerance in the search for phi_end
| double precision::primordial_inflation_extra_efolds |
a small number of efolds, irrelevant at the end, used in the search for the pivot scale (backward from the end of inflation)
| int precision::l_linstep |
factor for logarithmic spacing of values of l over which bessel and transfer functions are sampled
| double precision::l_logstep |
maximum spacing of values of l over which Bessel and transfer functions are sampled (so, spacing becomes linear instead of logarithmic at some point)
| double precision::hyper_x_min |
flat case: lower bound on the smallest value of x at which we sample 

| double precision::hyper_sampling_flat |
flat case: number of sampled points x per approximate wavelength 
| double precision::hyper_sampling_curved_low_nu |
open/closed cases: number of sampled points x per approximate wavelength 

| double precision::hyper_sampling_curved_high_nu |
open/closed cases: number of sampled points x per approximate wavelength 

| double precision::hyper_nu_sampling_step |
open/closed cases: value of nu at which sampling changes
| double precision::hyper_phi_min_abs |
small value of Bessel function used in calculation of first point x ( 
| double precision::hyper_x_tol = 1.0e-4 |
tolerance parameter used to determine first value of x
| double precision::hyper_flat_approximation_nu |
value of nu below which the flat approximation is used to compute Bessel function
| double precision::q_linstep = 0.45 |
asymptotic linear sampling step in q UNHANDLED: space, in units of 
| double precision::q_logstep_spline = 170.0 |
initial logarithmic sampling step in q UNHANDLED: space, in units of 
| double precision::q_logstep_open = 6.0 |
in open models, the value of UNHANDLED: q_logstep_spline must be decreased UNHANDLED: according to curvature. Increasing UNHANDLED: this number will make the calculation UNHANDLED: more accurate for large positive UNHANDLED: Omega_k
| double precision::q_logstep_trapzd = 20.0 |
initial logarithmic sampling step in q UNHANDLED: space, in units of 
| double precision::q_numstep_transition = 250.0 |
number of steps for the transition UNHANDLED: from q_logstep_trapzd steps to UNHANDLED: q_logstep_spline steps (transition UNHANDLED: must be smooth for spline)
| double precision::q_logstep_limber |
logarithmic q-step ratio for the separate full-Limber CMB lensing grid
| double precision::k_max_limber_over_l_max_scalars |
full-Limber perturbation source cutoff k_max/l_max_scalars in 1/Mpc
| double precision::transfer_neglect_delta_k_S_t0 |
for temperature source function T0 of scalar mode, range of k values (in 1/Mpc) taken into account in transfer function: for l < (k-delta_k)*tau0, ie for k > (l/tau0 + delta_k), the transfer function is set to zero
| double precision::transfer_neglect_delta_k_S_t1 |
same for temperature source function T1 of scalar mode
| double precision::transfer_neglect_delta_k_S_t2 |
same for temperature source function T2 of scalar mode
| double precision::transfer_neglect_delta_k_S_e |
same for polarization source function E of scalar mode
| double precision::transfer_neglect_delta_k_V_t1 |
same for temperature source function T1 of vector mode
| double precision::transfer_neglect_delta_k_V_t2 |
same for temperature source function T2 of vector mode
| double precision::transfer_neglect_delta_k_V_e |
same for polarization source function E of vector mode
| double precision::transfer_neglect_delta_k_V_b |
same for polarization source function B of vector mode
| double precision::transfer_neglect_delta_k_T_t2 |
same for temperature source function T2 of tensor mode
| double precision::transfer_neglect_delta_k_T_e |
same for polarization source function E of tensor mode
| double precision::transfer_neglect_delta_k_T_b |
same for polarization source function B of tensor mode
| double precision::transfer_neglect_late_source |
value of l below which the CMB source functions can be neglected at late time, excepted when there is a Late ISW contribution
| double precision::l_switch_limber |
when to use the Limber approximation for project gravitational potential cl's
| double precision::l_switch_limber_for_nc_local_over_z |
when to use the Limber approximation for local number count contributions to cl's (relative to central redshift of each bin)
| double precision::l_switch_limber_for_nc_los_over_z |
when to use the Limber approximation for number count contributions to cl's integrated along the line-of-sight (relative to central redshift of each bin)
| double precision::selection_cut_at_sigma |
in sigma units, where to cut gaussian selection functions
| double precision::selection_sampling |
controls sampling of integral over time when selection functions vary quicker than Bessel functions. Increase for better sampling.
| double precision::selection_sampling_bessel |
controls sampling of integral over time when selection functions vary slower than Bessel functions. Increase for better sampling. IMPORTANT for lensed contributions.
| double precision::selection_sampling_bessel_los |
controls sampling of integral over time when selection functions vary slower than Bessel functions. This parameter is specific to number counts contributions to Cl integrated along the line of sight. Increase for better sampling
| double precision::selection_tophat_edge |
controls how smooth are the edge of top-hat window function (<<1 for very sharp, 0.1 for sharp)
| double precision::sigma_k_per_decade |
logarithmic stepsize controlling the precision of integrals for sigma(R,k) and similar quantitites
| double precision::nonlinear_min_k_max = 5.0 |
when UNHANDLED: using an algorithm to compute nonlinear UNHANDLED: corrections, like halofit or hmcode, UNHANDLED: k_max must be at least equal to this UNHANDLED: value. Calculations are done internally UNHANDLED: until this k_max, but the P(k,z) output UNHANDLED: is still controlled by P_k_max_1/Mpc or UNHANDLED: P_k_max_h/Mpc even if they are UNHANDLED: smaller
| double precision::halofit_min_k_nonlinear |
parameters relevant for HALOFIT computation value of k in 1/Mpc below which non-linear corrections will be neglected
| double precision::halofit_min_k_max = 5.0 |
DEPRECATED: should use instead nonlinear_min_k_max
| double precision::halofit_k_per_decade = 80.0 |
halofit needs to evalute integrals UNHANDLED: (linear power spectrum times some UNHANDLED: kernels). They are sampled using UNHANDLED: this logarithmic step size.
| double precision::halofit_sigma_precision = 0.05 |
a smaller value will lead to a UNHANDLED: more precise halofit result at the highest UNHANDLED: redshift at which halofit can make computations, UNHANDLED: at the expense of requiring a larger k_max; but UNHANDLED: this parameter is not relevant for the UNHANDLED: precision on P_nl(k,z) at other redshifts, so UNHANDLED: there is normally no need to change it
| double precision::halofit_tol_sigma = 1.0e-6 |
tolerance required on sigma(R) when UNHANDLED: matching the condition sigma(R_nl)=1, UNHANDLED: whcih defines the wavenumber of UNHANDLED: non-linearity, k_nl=1./R_nl
| double precision::pk_eq_z_max = 5.0 |
Maximum z for the pk_eq method
| double precision::pk_eq_tol = 1.0e-7 |
Tolerance on the pk_eq method for finding the pk
| double precision::hmcode_max_k_extra = 1.e6 |
Parameters relevant for HMcode computation parameter specifying the maximum k value for UNHANDLED: the extrapolation of the linear power spectrum UNHANDLED: (needed for the sigma computation)
| double precision::hmcode_min_k_max = 5. |
DEPRECATED: should use instead nonlinear_min_k_max
| double precision::hmcode_tol_sigma = 1.e-6 |
tolerance required on sigma(R) when matching the UNHANDLED: condition sigma(R_nl)=1, which defines the wavenumber UNHANDLED: of non-linearity, k_nl=1./R_nl
| int precision::n_hmcode_tables = 64 |
parameters controlling stepsize and min/max r & a values for sigma(r) & grow table
| int precision::nsteps_for_p1h_integral = 256 |
parameters controlling stepsize and min/max halomass values for the 1-halo-power integral
| int precision::accurate_lensing |
switch between Gauss-Legendre quadrature integration and simple quadrature on a subdomain of angles
| int precision::num_mu_minus_lmax |
difference between num_mu and l_max, increase for more precision
| int precision::delta_l_max = 500 |
difference between l_max in unlensed and lensed spectra
| double precision::tol_gauss_legendre |
tolerance with which quadrature points are found: must be very small for an accurate integration (if not entered manually, set automatically to match machine precision)
| double precision::smallest_allowed_variation |
machine-dependent, assigned automatically by the code