CLASSpp Manual
Cosmology reference and developer manual
Loading...
Searching...
No Matches
precision Struct Reference

#include <precision.h>

Public Member Functions

ErkControllerConfig erk_controller_config () const
 

Data Fields

double a_ini_over_a_today_default = 1.e-14
 
double back_integration_stepsize = 7.e-3
 
double tol_background_integration = 1e-7
 
double tol_shooting_deltax = 1e-4
 
double tol_shooting_deltaF = 1e-6
 
double tol_initial_Omega_r = 1.e-4
 
double tol_M_ncdm = 1.e-7
 
double tol_ncdm_synchronous = 0.0034
 
double tol_ncdm_newtonian = 9.05e-5
 
double tol_ncdm_bg = 1.e-5
 
double tol_ncdm_initial_w = 1.e-3
 
int ncdm_driver_normalisation = 1
 
double tol_tau_eq = 1.e-6
 
double Omega0_cdm_min_synchronous = 1.e-10
 
std::string sBBN_file = "/bbn/sBBN_2017.dat"
 
std::string bbn_rates_file = "/bbn/rates_reaclib.dat"
 
double tol_bbn_integration = 1.e-8
 
double bbn_T9_initial = 100.
 
double bbn_T9_final = 0.01
 
std::string bbn_history_file
 
double recfast_z_initial = 20000.
 
int recfast_Nz0 = 20000
 
double thermo_z_initial_idm_dr = 1.0e9
 
double tol_thermo_integration = 1.0e-7
 
int recfast_Heswitch
 
double recfast_fudge_He
 
int recfast_Hswitch
 
double recfast_fudge_H
 
double recfast_delta_fudge_H
 
double recfast_AGauss1 = -0.1395272483
 
double recfast_AGauss2 = 0.0729891952
 
double recfast_zGauss1 = 7.2813061282
 
double recfast_zGauss2 = 6.7667038679
 
double recfast_wGauss1 = 0.1638966410
 
double recfast_wGauss2 = 0.2785834127
 
bool recfast_He_rate_correction
 
bool hyrec_He_rate_correction
 
double recfast_z_He_1 = 8000.0
 
double recfast_delta_z_He_1
 
double recfast_z_He_2 = 5000.0
 
double recfast_delta_z_He_2
 
double recfast_z_He_3 = 3500.0
 
double recfast_delta_z_He_3
 
double recfast_x_He0_trigger
 
double recfast_x_H0_trigger
 
double recfast_x_H0_trigger2
 
double recfast_H_frac
 
double reionization_z_start_max = 50.0
 
double reionization_sampling = 0.01
 
double reionization_optical_depth_tol
 
double reionization_start_factor
 
int thermo_rate_smoothing_radius
 
std::string hyrec_path
 
double k_min_tau0
 
double k_max_tau0_over_l_max
 
double k_max_tau0_above_l_max
 
double k_step_sub
 
double k_step_super
 
double k_step_transition
 
double k_step_super_reduction
 
double k_per_decade_for_pk
 
double idmdr_boost_k_per_decade_for_pk
 
double k_per_decade_for_bao
 
double k_bao_center
 
double k_bao_width
 
double start_small_k_at_tau_c_over_tau_h
 
double start_large_k_at_tau_h_over_tau_k
 
double start_isocurvature_at_omega_tau
 
double tight_coupling_trigger_tau_c_over_tau_h = 0.015
 
double tight_coupling_trigger_tau_c_over_tau_k = 0.04
 
double tight_coupling_trigger_tau_c_over_tau_h_ten = 0.015
 
double start_sources_at_tau_c_over_tau_h
 
int tight_coupling_approximation
 
double idm_dr_tight_coupling_trigger_tau_c_over_tau_k
 
double idm_dr_tight_coupling_trigger_tau_c_over_tau_h
 
double idm_drmd_tight_coupling_trigger_G_over_aH
 
int l_max_g
 
int l_max_pol_g
 
int l_max_dr
 
int l_max_dr_col
 
int l_max_dncdm_col
 
int l_max_ur
 
int l_max_idr
 
int l_max_ncdm
 
int l_max_g_ten
 
int l_max_pol_g_ten
 
double curvature_ini = 1.0
 
double entropy_ini = 1.0
 
double gw_ini = 1.0
 
double perturb_sampling_stepsize = 0.1
 
double perturbations_sampling_boost_above_age_fraction = 1.
 
double tol_perturb_integration = 0.0001
 
double tol_perturb_newtonian_k_over_a0H0 = 5.
 
double c_gamma_k_H_square_max = 1.0e3
 
double tol_tau_approx = 1e-6
 
int radiation_streaming_approximation = static_cast<int>(rsa_method::rsa_MD_with_reio)
 
double radiation_streaming_trigger_tau_over_tau_k = 45.
 
double radiation_streaming_trigger_tau_c_over_tau = 5.0
 
int idr_streaming_approximation
 
double idr_streaming_trigger_tau_over_tau_k
 
double idr_streaming_trigger_tau_c_over_tau
 
int ur_fluid_approximation
 
double ur_fluid_trigger_tau_over_tau_k = 20.
 
int ncdm_fluid_approximation
 
double ncdm_fluid_trigger_tau_over_tau_k = 31.
 
double neglect_CMB_sources_below_visibility = 2e-3
 
evolver_type evolver_background = evolver_type::ndf15
 
bool evolver_histograms = false
 
int rk_controller = 0
 
double k_per_decade_primordial
 
double primordial_inflation_ratio_min
 
double primordial_inflation_ratio_max
 
int primordial_inflation_phi_ini_maxit
 
double primordial_inflation_pt_stepsize
 
double primordial_inflation_bg_stepsize
 
double primordial_inflation_tol_integration
 
double primordial_inflation_attractor_precision_pivot
 
double primordial_inflation_attractor_precision_initial
 
int primordial_inflation_attractor_maxit
 
double primordial_inflation_tol_curvature
 
double primordial_inflation_aH_ini_target
 
double primordial_inflation_end_dphi
 
double primordial_inflation_end_logstep
 
double primordial_inflation_small_epsilon
 
double primordial_inflation_small_epsilon_tol = 0.01
 
double primordial_inflation_extra_efolds
 
int l_linstep
 
double l_logstep
 
double hyper_x_min
 
double hyper_sampling_flat
 
double hyper_sampling_curved_low_nu
 
double hyper_sampling_curved_high_nu
 
double hyper_nu_sampling_step
 
double hyper_phi_min_abs
 
double hyper_x_tol = 1.0e-4
 
double hyper_flat_approximation_nu
 
double q_linstep = 0.45
 
double q_logstep_spline = 400.
 
double q_logstep_open = 6.0
 
double q_logstep_trapzd = 20.0
 
double q_numstep_transition = 250.0
 
double q_logstep_limber
 
double k_max_extrapolated
 
double k_max_limber_over_l_max_scalars
 
double transfer_neglect_delta_k_S_t0
 
double transfer_neglect_delta_k_S_t1
 
double transfer_neglect_delta_k_S_t2
 
double transfer_neglect_delta_k_S_e
 
double transfer_neglect_l_half_S_t0
 
double transfer_neglect_l_half_S_t1 = 20.
 
double transfer_neglect_l_half_S_t2 = 100.
 
double transfer_neglect_l_half_S_e = 400.
 
double transfer_neglect_delta_k_V_t1
 
double transfer_neglect_delta_k_V_t2
 
double transfer_neglect_delta_k_V_e
 
double transfer_neglect_delta_k_V_b
 
double transfer_neglect_delta_k_T_t2
 
double transfer_neglect_delta_k_T_e
 
double transfer_neglect_delta_k_T_b
 
double transfer_neglect_late_source
 
double l_switch_limber
 
double cmb_lensing_sampling_factor
 
double cmb_lensing_sampling_fraction
 
double l_switch_limber_for_nc_local_over_z
 
double l_switch_limber_for_nc_los_over_z
 
double selection_cut_at_sigma
 
double selection_sampling
 
double selection_sampling_bessel
 
double selection_sampling_bessel_los
 
double selection_sampling_bessel_min
 
double selection_tophat_edge
 
double sigma_k_per_decade
 
double nonlinear_min_k_max
 
double halofit_min_k_nonlinear
 
double halofit_min_k_max = 2.0
 
double halofit_kR_max = 5.0
 
double halofit_k_per_decade = 80.0
 
double halofit_sigma_precision = 0.05
 
double halofit_tol_sigma = 1.0e-6
 
double pk_eq_z_max = 5.0
 
double pk_eq_tol = 1.0e-7
 
double hmcode_max_k_extra = 1.e6
 
double hmcode_min_k_max = 2.
 
double hmcode_tol_sigma = 1.e-6
 
int n_hmcode_tables = 64
 
int nsteps_for_p1h_integral = 256
 
int accurate_lensing
 
int num_mu_minus_lmax
 
int delta_l_max
 
double tol_gauss_legendre
 

- general precision parameters

double smallest_allowed_variation
 
void ResolveDataPaths ()
 
void parse (const FileContent &fc)
 

Detailed Description

All precision parameters.

Includes integrations steps, flags telling how the computation is to be performed, etc.

Member Function Documentation

◆ erk_controller_config()

ErkControllerConfig precision::erk_controller_config ( ) const
inline

The controller settings as the evolver wants them. Built here so the three callers do not each repeat the mapping.

◆ ResolveDataPaths()

void precision::ResolveDataPaths ( )

Prepend the runtime class_dir to the relative data-file path defaults (sBBN_file, hyrec_*). Call once after class_dir is set and before parse(), so a user-supplied absolute override in parse() still replaces verbatim.

◆ parse()

void precision::parse ( const FileContent &  fc)

Parse precision parameters from a configuration file.

Field Documentation

◆ a_ini_over_a_today_default

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.

◆ back_integration_stepsize

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

This is NOT the integrator's step: background_solve_evolver drives the ODE to tol_background_integration and has dense output, so this knob only sets how densely the solution is SAMPLED into the stored table (background_module.cpp computes bt_size_ = |ln a_ini| / back_integration_stepsize) and therefore how accurately every later consumer can interpolate it. Its cost is dense-output reconstruction plus the spline over bt_size_ rows, not integration work, which is why loosening it buys much less than the row count suggests.

#397 moved it 7e-3 -> 0.07 as part of the precision campaign; it is back at 7e-3 here, because the 10x coarser table was not paying for itself. Measured, one thread, lensed LCDM + mPk with one massive neutrino, five interleaved pairs: 1.089 s at 7e-3 against 1.086 s at 0.07, i.e. 0.3% and inside the run-to-run spread. The bound is structural rather than lucky – background and thermodynamics together are 0.03 s of that 1.09 s (0.02 s at 0.07), so no setting of this knob can be worth more than ~1% of a CMB run. It goes the right way on accuracy at that price: 1.3e-4 on TT, 1.0e-3 on EE, 2.4e-4 on P(k), with 7e-3 the finer of the two.

What the coarser table did cost is paid by every consumer that interpolates the background in ln a and inherits this spacing without being in a position to notice it. DNCDM's reduced collision table was one: at 0.07 every Galerkin run in the hpc_prod campaign diverged. That species now owns its own spacing (dncdm<i>.dr_table_max_dlna, PR #413), but it was not the only such consumer, merely the one that failed loudly.

◆ tol_background_integration

double precision::tol_background_integration = 1e-7

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.

◆ tol_shooting_deltax

double precision::tol_shooting_deltax = 1e-4

Shooting (InputModule::DoShooting) stops once the summed |Newton step| in the unknowns falls below this. Each unknown is measured in units of its own seed's magnitude, so this is relative. class_public's name and default.

◆ tol_shooting_deltaF

double precision::tol_shooting_deltaF = 1e-6

Shooting stops once the summed |residual| falls below this. Every residual is in the units the data see it in: Omega (fractions of the critical density) for densities and budget closures, and 100*theta_s itself. class_public's name and default.

◆ tol_initial_Omega_r

double precision::tol_initial_Omega_r = 1.e-4

Tolerance of the deviation of $ \Omega_r $ from 1 for which to start integration: The starting point of integration will be chosen, such that the Omega of radiation at that point is close to 1 within tolerance. (Class starts background integration during complete radiation domination)

◆ tol_M_ncdm

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

◆ tol_ncdm_synchronous

double precision::tol_ncdm_synchronous = 0.0034

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. 0.0034 again since 2026-10-09: with 0.03 (2026-08-21 to 2026-10-09), together with l_max_ncdm and ncdm_fluid_trigger_tau_over_tau_k, P(k) with massive neutrinos was 3.8e-3 low at k = 5/Mpc (see docs/superpowers/specs/2026-10-09-ncdm-precision-defaults-design.md).

◆ 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.

◆ tol_ncdm_bg

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.

◆ tol_ncdm_initial_w

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)

◆ ncdm_driver_normalisation

int precision::ncdm_driver_normalisation = 1

1: scale the metric drivers of the ncdm hierarchy (the dlnf0/dlnq terms) so that their momentum sum equals the rho+p of the background grid, which is what the Einstein equations see; 0: leave them to the quadrature. The quadrature misses that sum by 2e-3 on the default synchronous grid and 2e-5 on the Newtonian one, so the species does not conserve energy and momentum. That cost 2.9e-3 in TT at l < 20 for m = 1 eV, and in Newtonian gauge, where the comoving density cancels to (k/aH)^2, 1.2% in P(k) at k = 1e-5 h/Mpc (#497). ncdm_decay_dr is normalised too, on its single grid: the spline derivative of its ln f misses the sum by enough on 16 trapezoid bins that the gauges differed by 5% in TT (1.7e-3 now), and synchronous TT at l < 20 of a Gamma = 1e5, 0.3 eV parent was 1.2e-3 off a 32-bin Laguerre grid (8e-6 now); 1.7% slower on one thread. 0 until 2026-11-05.

◆ tol_tau_eq

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.

◆ Omega0_cdm_min_synchronous

double precision::Omega0_cdm_min_synchronous = 1.e-10

Minimum amount of cdm to allow calculations in synchronous gauge comoving with cdm.

◆ sBBN_file

std::string precision::sBBN_file = "/bbn/sBBN_2017.dat"

Big Bang Nucleosynthesis file path. The file specifies the predictions for $ Y_\mathrm{He} $ for given $ \omega_b $ and $ N_\mathrm{eff} $.

◆ bbn_rates_file

std::string precision::bbn_rates_file = "/bbn/rates_reaclib.dat"

Forward nuclear reaction rates for the solved BBN network, used when YHe = network instead of the interpolation table above. JINA REACLIB seven-parameter form; see tools/bbn_rates.h. Reverse rates are derived by detailed balance and are deliberately not expressible in this file.

◆ tol_bbn_integration

double precision::tol_bbn_integration = 1.e-8

Relative tolerance for the BBN network integration.

◆ bbn_T9_initial

double precision::bbn_T9_initial = 100.

Temperature in 10^9 K at which the BBN network starts.

Must be well above weak freeze-out (T9 ~ 10) so that the initial n/p ratio really is the equilibrium one; the abundances are insensitive to it above that (measured: Y_p moves by 1e-6 between T9 = 100 and T9 = 1000).

◆ bbn_T9_final

double precision::bbn_T9_final = 0.01

Temperature in 10^9 K at which the BBN network stops.

◆ bbn_history_file

std::string precision::bbn_history_file

If non-empty, the solved BBN run writes its abundance history here, one row per sampled temperature. Diagnostic only; empty means no file.

◆ recfast_z_initial

double precision::recfast_z_initial = 20000.

The initial z for the recfast calculation of the recombination history, e.g. 10^4

◆ recfast_Nz0

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

◆ thermo_z_initial_idm_dr

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:

  • The new initial redshift will be thermo_z_initial_idm_dr
  • the highest redhsift will be sampled with thermo_Nz1_idm_dr values, and the step will be Delta z = (thermo_z_initial_idm_dr-recfast_z_initial)/thermo_Nz1_idm_dr For instance, if the previous value is 10^9 and this value is 10^4, then Delta z simeq 10^5
  • But the first interval after recfast_z_initial will be better sampled with thermo_Nz2_idm_dr values, in order to ensure a smoother transition from a small step to a large step. The intermediate stepsize will then be Delta z = (thermo_z_initial_idm_dr-recfast_z_initial)/thermo_Nz1_idm_dr/thermo_Nz1_idm_dr. For instance, if the three values are (10^9, 10^4, 10^2), then the intermediate timestep is Delta z simeq 10^3

◆ tol_thermo_integration

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.

◆ recfast_Heswitch

int precision::recfast_Heswitch
Initial value:
=
6

from recfast 1.4, specifies how accurate the Helium recombination should be handled

◆ recfast_fudge_He

double precision::recfast_fudge_He
Initial value:
=
0.8472367977

fudge factor for Peeble's equation coefficient of Helium: CAMB 2's CosmoRec refit (recfast 1.4: 0.86, see recfast_calibration)

◆ recfast_Hswitch

int precision::recfast_Hswitch
Initial value:
=
1

from recfast 1.5, specifies how accurate the Hydrogen recombination should be handled

◆ recfast_fudge_H

double precision::recfast_fudge_H
Initial value:
=
1.14

from recfast 1.4, fudge factor for Peeble's equation coeffient of Hydrogen

◆ recfast_delta_fudge_H

double precision::recfast_delta_fudge_H
Initial value:
=
-0.015

from recfast 1.5.2, increasing Hydrogen fudge factor if Hswitch is enabled

◆ recfast_AGauss1

double precision::recfast_AGauss1 = -0.1395272483

Gaussian Peeble prefactor fit, amplitude

◆ recfast_AGauss2

double precision::recfast_AGauss2 = 0.0729891952

Gaussian Peeble prefactor fit, amplitude

◆ recfast_zGauss1

double precision::recfast_zGauss1 = 7.2813061282

Gaussian Peeble prefactor fit, center

◆ recfast_zGauss2

double precision::recfast_zGauss2 = 6.7667038679

Gaussian Peeble prefactor fit, center

◆ recfast_wGauss1

double precision::recfast_wGauss1 = 0.1638966410

Gaussian Peeble prefactor fit, width

◆ recfast_wGauss2

double precision::recfast_wGauss2 = 0.2785834127

Gaussian Peeble prefactor fit, width

◆ recfast_He_rate_correction

bool precision::recfast_He_rate_correction
Initial value:
=
true

multiply dx_He/dz by CAMB 2's He I rate correction F_He (arXiv:2607.14854, 'Recombination model and calibration'), which carries CosmoRec's helium radiative transfer; part of recfast_calibration = cosmorec

◆ hyrec_He_rate_correction

bool precision::hyrec_He_rate_correction
Initial value:
=
true

multiply HYREC-2's helium rate by its CosmoRec calibration; set by hyrec_calibration

◆ recfast_z_He_1

double precision::recfast_z_He_1 = 8000.0

from recfast 1.4, Starting value of Helium recombination 1

◆ recfast_delta_z_He_1

double precision::recfast_delta_z_He_1
Initial value:
=
50.0

Smoothing factor for recombination approximation switching, found to be OK on 3.09.10

◆ recfast_z_He_2

double precision::recfast_z_He_2 = 5000.0

from recfast 1.4, Ending value of Helium recombination 1

◆ recfast_delta_z_He_2

double precision::recfast_delta_z_He_2
Initial value:
=
100.0

Smoothing factor for recombination approximation switching, found to be OK on 3.09.10

◆ recfast_z_He_3

double precision::recfast_z_He_3 = 3500.0

from recfast 1.4, Starting value of Helium recombination 2

◆ recfast_delta_z_He_3

double precision::recfast_delta_z_He_3
Initial value:
=
50.0

Smoothing factor for recombination approximation switching, found to be OK on 3.09.10

◆ recfast_x_He0_trigger

double precision::recfast_x_He0_trigger
Initial value:
=
0.999

Saha fraction of HeII at which the helium ODE takes over

◆ recfast_x_H0_trigger

double precision::recfast_x_H0_trigger
Initial value:
=
0.999

Saha fraction of HII at which the hydrogen ODE takes over

◆ recfast_x_H0_trigger2

double precision::recfast_x_H0_trigger2
Initial value:
=
0.999

x_H below which RECFAST uses Peebles' C factor rather than 1; kept equal to recfast_x_H0_trigger

◆ recfast_H_frac

double precision::recfast_H_frac
Initial value:
=
1.0e-3

from recfast 1.4, specifies the time at which the temperature evolution is calculated by the more precise equation

◆ reionization_z_start_max

double precision::reionization_z_start_max = 50.0

Maximum starting value in z for reionization

◆ reionization_sampling

double precision::reionization_sampling = 0.01

Sampling density in z during reionization

◆ reionization_optical_depth_tol

double precision::reionization_optical_depth_tol
Initial value:
=
1.0e-4

Relative tolerance on finding the user-given optical depth of reionization given a certain redshift of reionization

◆ reionization_start_factor

double precision::reionization_start_factor
Initial value:
=
8.0

Searching optical depth corresponding to the redshift is started from an initial offset beyond z_reionization_start, multiplied by reionization_width

◆ thermo_rate_smoothing_radius

int precision::thermo_rate_smoothing_radius
Initial value:
=
10

Smoothing in redshift of the variation rate of $ \exp(-\kappa) $, g, and $ \frac{dg}{d\tau} $ that is used as a timescale afterwards

◆ hyrec_path

std::string precision::hyrec_path
Initial value:
=
"/hyrec/"

Directory holding HYREC-2's data tables. HYREC-2 appends its own file names (Alpha_inf.dat, R_inf.dat, fit_swift.dat, two_photon_tables.dat), so it takes a directory rather than the three individual paths CLASS used before. A missing trailing separator is appended at parse time.

◆ k_min_tau0

double precision::k_min_tau0
Initial value:
=
0.1

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

◆ k_max_tau0_over_l_max

double precision::k_max_tau0_over_l_max
Initial value:
=
1.8

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.

◆ k_max_tau0_above_l_max

double precision::k_max_tau0_above_l_max
Initial value:
=
2500.

the scalar CMB C_l's take k_max tau_0 = max(k_max_tau0_over_l_max l_max, l_max + this), with l_max the multipoles asked for (without the lensing headroom delta_l_max). Below l_max ~ 3000 the transfer functions carry power above k tau_0 = 1.8 l_max: with that alone, unlensed TT is 11% low at l = 200 for l_max_scalars = 200, and the lensed TT at the top of l_max_scalars = 2000 has twice the error. Above l_max ~ 3000 the damping tail removes it. See docs/superpowers/specs/2026-10-27-cmb-k-range-design.md.

◆ k_step_sub

double precision::k_step_sub
Initial value:
=
0.08

step in k space, in units of one period of acoustic oscillation at decoupling, for scales inside sound horizon at decoupling

◆ k_step_super

double precision::k_step_super
Initial value:
=
0.002

step in k space, in units of one period of acoustic oscillation at decoupling, for scales above sound horizon at decoupling

◆ k_step_transition

double precision::k_step_transition
Initial value:
=
0.4

dimensionless number regulating the transition from 'sub' steps to 'super' steps. Decrease for more precision.

◆ k_step_super_reduction

double precision::k_step_super_reduction
Initial value:
=
0.1

the step k_step_super is reduced by this amount in the k-->0 limit (below scale of Hubble and/or curvature radius)

◆ k_per_decade_for_pk

double precision::k_per_decade_for_pk
Initial value:
=
10.0

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

◆ idmdr_boost_k_per_decade_for_pk

double precision::idmdr_boost_k_per_decade_for_pk
Initial value:
=
1.0

boost factor for the case of DAO in idm-idr models

◆ k_per_decade_for_bao

double precision::k_per_decade_for_bao
Initial value:
=
70.0

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)

◆ k_bao_center

double precision::k_bao_center
Initial value:
=
3.0

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)

◆ k_bao_width

double precision::k_bao_width
Initial value:
=
4.0

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)

◆ start_small_k_at_tau_c_over_tau_h

double precision::start_small_k_at_tau_c_over_tau_h
Initial value:
=
0.0015

largest wavelengths start being sampled when universe is sufficiently opaque. This is quantified in terms of the ratio of thermo to hubble time scales, $ \tau_c/\tau_H $. Start when start_largek_at_tau_c_over_tau_h equals this ratio. Decrease this value to start integrating the wavenumbers earlier in time.

◆ start_large_k_at_tau_h_over_tau_k

double precision::start_large_k_at_tau_h_over_tau_k
Initial value:
=
0.07

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, $ \tau_h/\tau_k $ which is roughly equal to (k*tau). Start when this ratio equals start_large_k_at_tau_k_over_tau_h. Decrease this value to start integrating the wavenumbers earlier in time.

◆ start_isocurvature_at_omega_tau

double precision::start_isocurvature_at_omega_tau
Initial value:
=
0.01

non-adiabatic scalar modes (cdi, bi, nid, niv) also start no later than om*tau equals this value, om = a rho_m / sqrt(rho_r): their initial conditions are series in om*tau, whose error falls as (om*tau)^3 (cdi, bi) and (om*tau)^2 (nid). Decrease to start earlier in time.

◆ tight_coupling_trigger_tau_c_over_tau_h

double precision::tight_coupling_trigger_tau_c_over_tau_h = 0.015

when to switch off tight-coupling approximation: first condition: $ \tau_c/\tau_H $ > tight_coupling_trigger_tau_c_over_tau_h. Decrease this value to switch off earlier in time. If this number is larger than start_sources_at_tau_c_over_tau_h, the code returns an error, because the source computation requires tight-coupling to be switched off.

◆ tight_coupling_trigger_tau_c_over_tau_k

double precision::tight_coupling_trigger_tau_c_over_tau_k = 0.04

when to switch off tight-coupling approximation: second condition: $ \tau_c/\tau_k \equiv k \tau_c $ < tight_coupling_trigger_tau_c_over_tau_k. Decrease this value to switch off earlier in time.

◆ tight_coupling_trigger_tau_c_over_tau_h_ten

double precision::tight_coupling_trigger_tau_c_over_tau_h_ten = 0.015

Tensor-mode counterparts of the two tight-coupling triggers above.

Kept separate because the two modes reach their closures differently: the scalar TCA selects one of tight_coupling_approximation's schemes, while the tensor closure is PhotonsSpecies::TensorTightCoupling(), which no input parameter selects.

The k-trigger stays at 0.01. Correcting the closure and carrying it to first order in tau_c (#398) made 0.04 eight times cheaper in accuracy than it was – 14.0% -> 1.74% on BB over l = 100-300 against a converged reference – but 0.01 still delivers 0.18% there, and loosening buys no measurable time: 0.5% on a tensor-only run at l_max_tensors = 1500, inside the noise. Tensors are cheap; there is nothing to trade the accuracy for.

◆ start_sources_at_tau_c_over_tau_h

double precision::start_sources_at_tau_c_over_tau_h
Initial value:
=
0.008

sources start being sampled when universe is sufficiently opaque. This is quantified in terms of the ratio of thermo to hubble time scales, $ \tau_c/\tau_H $. Start when start_sources_at_tau_c_over_tau_h equals this ratio. Decrease this value to start sampling the sources earlier in time.

◆ tight_coupling_approximation

int precision::tight_coupling_approximation
Initial value:
= static_cast<int>(
tca_method::compromise_CLASS)

method for tight coupling approximation

◆ idm_dr_tight_coupling_trigger_tau_c_over_tau_k

double precision::idm_dr_tight_coupling_trigger_tau_c_over_tau_k
Initial value:
=
0.01

when to switch off the dark-tight-coupling approximation, first condition (see normal tca for full definition)

◆ idm_dr_tight_coupling_trigger_tau_c_over_tau_h

double precision::idm_dr_tight_coupling_trigger_tau_c_over_tau_h
Initial value:
=
0.015

when to switch off the dark-tight-coupling approximation, second condition (see normal tca for full definition)

◆ idm_drmd_tight_coupling_trigger_G_over_aH

double precision::idm_drmd_tight_coupling_trigger_G_over_aH
Initial value:
=
100000

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.)

◆ l_max_g

int precision::l_max_g
Initial value:
=
12

number of momenta in Boltzmann hierarchy for photon temperature (scalar), at least 4

◆ l_max_pol_g

int precision::l_max_pol_g
Initial value:
=
10

number of momenta in Boltzmann hierarchy for photon polarization (scalar), at least 4

◆ l_max_dr

int precision::l_max_dr
Initial value:
=
17

number of momenta in Boltzmann hierarchy for decay radiation, at least 4

◆ l_max_dr_col

int precision::l_max_dr_col
Initial value:
=
-1

highest multipole of the decay-radiation collision term, at least 2. It reads the parent's multipole of the same l, so it can reach no further than either hierarchy; -1 (default): as far as both reach, per species (#137). An explicit value beyond either is an error.

◆ l_max_dncdm_col

int precision::l_max_dncdm_col
Initial value:
=
17

max multipole receiving the DNCDM inverse-decay collision term; must be <= l_max_ncdm

◆ l_max_ur

int precision::l_max_ur
Initial value:
=
17

number of momenta in Boltzmann hierarchy for relativistic neutrino/relics (scalar), at least 4

◆ l_max_idr

int precision::l_max_idr
Initial value:
=
17

number of momenta in Boltzmann hierarchy for interacting dark radiation

◆ l_max_ncdm

int precision::l_max_ncdm
Initial value:
=
17

number of momenta in Boltzmann hierarchy for non-cold relics (scalar), at least 4; 17 again since 2026-10-09 (10 from 2026-08-21), see tol_ncdm_synchronous

◆ l_max_g_ten

int precision::l_max_g_ten
Initial value:
=
5

number of momenta in Boltzmann hierarchy for photon temperature (tensor), at least 4

◆ l_max_pol_g_ten

int precision::l_max_pol_g_ten
Initial value:
=
5

number of momenta in Boltzmann hierarchy for photon polarization (tensor), at least 4

◆ curvature_ini

double precision::curvature_ini = 1.0

initial condition for curvature for adiabatic

◆ entropy_ini

double precision::entropy_ini = 1.0

initial condition for entropy perturbation for isocurvature

◆ gw_ini

double precision::gw_ini = 1.0

initial condition for tensor metric perturbation h

◆ perturb_sampling_stepsize

double precision::perturb_sampling_stepsize = 0.1

default step $ d \tau $ for sampling the source function, in units of the timescale involved in the sources: $ (\dot{\kappa}- \ddot{\kappa}/\dot{\kappa})^{-1} $

◆ perturbations_sampling_boost_above_age_fraction

double precision::perturbations_sampling_boost_above_age_fraction = 1.

Age fraction above which source sampling is twice as fine; 1.0 disables the boost. It used to improve the low-l CMB lensing line-of-sight integral, which the transfer module now samples with its own logarithmic late-time step (cmb_lensing_sampling_factor, cmb_lensing_sampling_fraction).

◆ tol_perturb_integration

double precision::tol_perturb_integration = 0.0001

control parameter for the precision of the perturbation integration, IMPORTANT FOR SETTING THE STEPSIZE OF NDF15

◆ tol_perturb_newtonian_k_over_a0H0

double precision::tol_perturb_newtonian_k_over_a0H0 = 5.

Newtonian gauge only: modes with k below this multiple of a_0 H_0 are integrated at tol_perturb_integration * (k / (this * a_0 H_0))^2, but not below 1e-10. On super-horizon scales the Newtonian-gauge delta and 3aH theta/k^2 are of order the potential and cancel to the comoving density, (k/aH)^2 smaller, so an integration error of tol in them is an error of tol (aH/k)^2 in P(k): -18% at k = 1e-5 h/Mpc for m_ncdm = 1 eV, 1.5e-3 for LambdaCDM (#497); now 5e-4 and 1.4e-4. Costs 1-7% of a Newtonian P(k) run on one thread. 0 switches it off (until 2026-11-05).

◆ c_gamma_k_H_square_max

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.)

◆ tol_tau_approx

double precision::tol_tau_approx = 1e-6

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)

◆ radiation_streaming_approximation

int precision::radiation_streaming_approximation = static_cast<int>(rsa_method::rsa_MD_with_reio)

method for switching off photon perturbations

◆ radiation_streaming_trigger_tau_over_tau_k

double precision::radiation_streaming_trigger_tau_over_tau_k = 45.

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: $ k \tau $ > radiation_streaming_trigger_tau_h_over_tau_k

45 since 2026-10-27 (class_public's value), 26 from 2026-08-21. At 26, with neglect_CMB_sources_below_visibility = 0.008, lensed EE was 8.6e-3 off a converged reference over l = 30-2500 (median of 160 LambdaCDM posterior draws), a significance of 2.3 sigma for a cosmic-variance-limited measurement, and TE 4.5e-3 (1.05); 45 and 2e-3 take them to 1.1e-3 (0.73) and 1.6e-3 (0.41) for 2-3% on one thread. Most of the EE error was this trigger's: at 35 EE is 1.7e-3 (0.97). The cheap values had been chosen because they cancel part of another error in the directions Planck constrains, mostly omega_b: on Planck PR4 CamSpec + low-l + ACT DR6 lensing + DESI DR2 the cosmological bias goes from 0.090 to 0.168 sigma (LambdaCDM) and 0.144 to 0.174 (w0wa), while the spread of delta chi^2 falls from 0.71 to 0.50. Most of that other error was the cubic interpolation of the Bessel functions (see hyper_sampling_flat). See docs/superpowers/specs/2026-10-27-precision-sync-design.md.

◆ radiation_streaming_trigger_tau_c_over_tau

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:

◆ idr_streaming_approximation

int precision::idr_streaming_approximation
Initial value:
= static_cast<int>(
rsa_idr_method::rsa_idr_none)

method for dark radiation free-streaming approximation

◆ idr_streaming_trigger_tau_over_tau_k

double precision::idr_streaming_trigger_tau_over_tau_k
Initial value:
=
50.0

when to switch on dark radiation (idr) free-streaming approximation, first condition

◆ idr_streaming_trigger_tau_c_over_tau

double precision::idr_streaming_trigger_tau_c_over_tau
Initial value:
=
10.0

when to switch on dark radiation (idr) free-streaming approximation, second condition

◆ ur_fluid_approximation

int precision::ur_fluid_approximation
Initial value:
= static_cast<int>(
ufa_method::ufa_CLASS)

method for ultra relativistic fluid approximation

◆ ur_fluid_trigger_tau_over_tau_k

double precision::ur_fluid_trigger_tau_over_tau_k = 20.

when to switch off ur (massless neutrinos / ultra-relativistic relics) fluid approximation

◆ ncdm_fluid_approximation

int precision::ncdm_fluid_approximation
Initial value:
= static_cast<int>(
ncdmfa_method::ncdmfa_CLASS)

method for non-cold dark matter fluid approximation

◆ ncdm_fluid_trigger_tau_over_tau_k

double precision::ncdm_fluid_trigger_tau_over_tau_k = 31.

when to switch off ncdm (massive neutrinos / non-cold relics) fluid approximation. 31 again since 2026-10-09: at 15 (from 2026-08-21) the switch came while neutrinos are still relativistic at k > 0.5/Mpc, see tol_ncdm_synchronous.

◆ neglect_CMB_sources_below_visibility

double precision::neglect_CMB_sources_below_visibility = 2e-3

whether CMB source functions can be approximated as zero when visibility function g(tau) is tiny. 2e-3 since 2026-10-27, 0.008 from 2026-08-21: at 0.008 it was half of the lensed EE error (see radiation_streaming_trigger_tau_over_tau_k); with the trigger there at 45, 2e-3 is as accurate as class_public's 1e-3.

◆ evolver_background

evolver_type precision::evolver_background = evolver_type::ndf15

The type of evolver to use: options are ndf15, rk, rkdp45 or etd.

PER-MODULE, because the three callers do not want the same integrator. The decaying-NCDM inverse-decay sector is the case that forced this: its BACKGROUND Jacobian is genuinely dense (every parent momentum bin couples to every daughter bin through the collision integral, so numjac abandons sparsity and ndf15 costs ~84x more than rkdp45 for answers agreeing to 4e-9 of the energy budget), while its PERTURBATION Jacobian stays sparse and stiffness-limited, where an implicit method is the natural choice. With one global setting that model cannot express its own best configuration.

Input is an XOR: either the blanket evolver key, or any subset of evolver_background / evolver_thermodynamics / evolver_perturbations (unset members keep the default). Mixing the two is rejected rather than silently resolved by a precedence rule – see precision::parse.

◆ evolver_histograms

bool precision::evolver_histograms = false

Collect explicit-RK step-acceptance histograms during the perturbations.

Step COUNTERS are always collected – they are a plain increment per step into a per-call struct, so they cost nothing measurable. The histograms are different: each step costs a log10 to find its bin, so they are opt-in. Only the explicit Runge-Kutta evolvers produce them.

◆ rk_controller

int precision::rk_controller = 0

Step-size controller, error norm and interpolant for the explicit embedded pairs (rkdp45, tsit5). They do nothing for the other integrators.

rk_controller 0 = legacy the historical control: an I controller with no cap on how fast h may grow, which also grows h on the step right after a rejection. Throws away ~13% of its steps on LCDM + Mnu. 1 = capped the same with a growth cap and no growth right after a rejection. Measured worth almost nothing on its own (13.7% -> 12.3% rejected). 2 = pi Hairer/Gustafsson PI control. Rejections fall to ~4.4% and, because the step sequence is smoother, it delivers more accuracy per step than the extra steps cost: ~9% cheaper at matched accuracy on both C_l and P(k). Not the default because at a FIXED tolerance it is 3.6% dearer for accuracy nobody is short of – realising its value means loosening tol_perturb_integration with it, and that knob is shared with ndf15, where the same number means something ~45x different. rk_error_norm 0 = max norm of the scaled error (MATLAB ode45; historical) 1 = RMS norm (Hairer's DOPRI5) rk_interpolant 0 = the pair's own continuous extension, which is 4th order over a 5th-order step 1 = quintic Hermite through the last three step ends, using the values and the FSAL derivatives already in hand. One order better for no extra derivative evaluations and no change to the step sequence. THE DEFAULT, because a 4th- order interpolant under a 5th-order step means the sources CLASS stores are systematically one order worse than the solution the error controller is protecting, and a user has no way to see or fix that. Measured on LCDM + Mnu it is 1.3-2.0x more accurate on lensed C_l at identical RHS count and a wall-time difference inside the noise, and P(k) is untouched (at z_pk = 0 it reads a single stored tau, which is a step end either way). rk_output_stepping 0 = serve output points from the interpolant 1 = truncate h so every output point is a step end, which never interpolates. A DIAGNOSTIC, not a setting: it is the only way to separate interpolation error from accumulated error, and it costs 1.31x at matched accuracy.

rk_safety and rk_fac_min/rk_fac_max bound the step-size change factor and are read by every controller including legacy. Note that rk_safety and rk_pi_beta together fix the error ratio the controller settles at, so raising safety is equivalent to loosening the tolerance rather than being free.

These are pushed into a process-wide slot because the shared evolver signature has no room for them. Each module configures it from its OWN ppr immediately before it integrates, so lazily-built Cosmology objects cannot read each other's settings; what remains is that two cosmologies whose modules RUN concurrently in one process must agree on them.

◆ k_per_decade_primordial

double precision::k_per_decade_primordial
Initial value:
=
10.0

logarithmic sampling for primordial spectra (number of points per decade in k space)

◆ primordial_inflation_ratio_min

double precision::primordial_inflation_ratio_min
Initial value:
=
100.0

for each k, start following wavenumber when aH = k/primordial_inflation_ratio_min

◆ primordial_inflation_ratio_max

double precision::primordial_inflation_ratio_max
Initial value:
=
1.0 /
50.0

for each k, stop following wavenumber, at the latest, when aH = k/primordial_inflation_ratio_max

◆ primordial_inflation_phi_ini_maxit

int precision::primordial_inflation_phi_ini_maxit
Initial value:
=
10000

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)

◆ primordial_inflation_pt_stepsize

double precision::primordial_inflation_pt_stepsize
Initial value:
=
0.01

controls the integration timestep for inflaton perturbations

◆ primordial_inflation_bg_stepsize

double precision::primordial_inflation_bg_stepsize
Initial value:
=
0.005

controls the integration timestep for inflaton background

◆ primordial_inflation_tol_integration

double precision::primordial_inflation_tol_integration
Initial value:
=
1.0e-3

controls the precision of the ODE integration during inflation

◆ primordial_inflation_attractor_precision_pivot

double precision::primordial_inflation_attractor_precision_pivot
Initial value:
=
0.001

targeted precision when searching attractor solution near phi_pivot

◆ primordial_inflation_attractor_precision_initial

double precision::primordial_inflation_attractor_precision_initial
Initial value:
=
0.1

targeted precision when searching attractor solution near phi_ini

◆ primordial_inflation_attractor_maxit

int precision::primordial_inflation_attractor_maxit
Initial value:
=
10

maximum number of iteration when searching attractor solution

◆ primordial_inflation_tol_curvature

double precision::primordial_inflation_tol_curvature
Initial value:
=
1.0e-3

for each k, stop following wavenumber, at the latest, when curvature perturbation R is stable up to to this tolerance

◆ primordial_inflation_aH_ini_target

double precision::primordial_inflation_aH_ini_target
Initial value:
=
0.9

control the step size in the search for a suitable initial field value

◆ primordial_inflation_end_dphi

double precision::primordial_inflation_end_dphi
Initial value:
=
1.0e-10

first bracketing width, when trying to bracket the value phi_end at which inflation ends naturally

◆ primordial_inflation_end_logstep

double precision::primordial_inflation_end_logstep
Initial value:
=
10.0

logarithmic step for updating the bracketing width, when trying to bracket the value phi_end at which inflation ends naturally

◆ primordial_inflation_small_epsilon

double precision::primordial_inflation_small_epsilon
Initial value:
=
0.1

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)

◆ primordial_inflation_small_epsilon_tol

double precision::primordial_inflation_small_epsilon_tol = 0.01

tolerance in the search for phi_end

◆ primordial_inflation_extra_efolds

double precision::primordial_inflation_extra_efolds
Initial value:
=
2.0

a small number of efolds, irrelevant at the end, used in the search for the pivot scale (backward from the end of inflation)

◆ l_linstep

int precision::l_linstep
Initial value:
=
50

linear step in l over which bessel and transfer functions are sampled, at high l

◆ l_logstep

double precision::l_logstep
Initial value:
=
1.12

maximum spacing of values of l over which Bessel and transfer functions are sampled (so, spacing becomes linear instead of logarithmic at some point)

◆ hyper_x_min

double precision::hyper_x_min
Initial value:
=
1.0e-5

flat case: lower bound on the smallest value of x at which we sample $ \Phi_l^{\nu}(x)$ or $ j_l(x)$

◆ hyper_sampling_flat

double precision::hyper_sampling_flat
Initial value:
=
12.0

flat case: number of sampled points x per approximate wavelength $ 2\pi $, should remain >7.5

◆ hyper_sampling_curved_low_nu

double precision::hyper_sampling_curved_low_nu
Initial value:
=
8.0

open/closed cases: number of sampled points x per approximate wavelength $ 2\pi/\nu$, when $ \nu $ smaller than hyper_nu_sampling_step. Equal to hyper_sampling_flat until 2026-10-27, when the flat case went to 12 for the error of its cubic interpolation; these wavenumbers are interpolated at order 6. Below 8 the low-l spectra lose accuracy at no saving in time (see docs/superpowers/specs/2026-09-08-limber-effective-multipole-design.md)

◆ hyper_sampling_curved_high_nu

double precision::hyper_sampling_curved_high_nu
Initial value:
=
3.0

open/closed cases: number of sampled points x per approximate wavelength $ 2\pi/\nu$, when $ \nu $ greater than hyper_nu_sampling_step. Deliberately below the >7.5 floor that hyper_sampling_flat documents, and it does cost accuracy: the nu in (hyper_nu_sampling_step, hyper_flat_approximation_nu) band slides down in q as $ K \to 0 $ until it carries the low-l power, so raising this to 8 buys 15x/51x/420x on $ C_l^{\phi\phi} $ at l<=10 for Omega_k = -1e-4/-1e-5/-1e-6, and 23% on $ C_l^{EE} $ at -1e-6. It buys nothing measurable at |Omega_k| >= 0.01 while costing +52% there (closed; +12% open), and a linearly sampled MCMC almost never visits |Omega_k| < 1e-4, so 3.0 is kept: speed at the expense of very nearly flat models. Raise it if you take numerical dC_l/dOmega_k with a step below ~1e-4. See docs/superpowers/specs/2026-09-08-limber-effective-multipole-design.md

◆ hyper_nu_sampling_step

double precision::hyper_nu_sampling_step
Initial value:
=
1000.0

open/closed cases: value of nu at which sampling changes

◆ hyper_phi_min_abs

double precision::hyper_phi_min_abs
Initial value:
=
1e-8

small value of Bessel function used in calculation of first point x ( $ \Phi_l^{\nu}(x) $ equals hyper_phi_min_abs)

◆ hyper_x_tol

double precision::hyper_x_tol = 1.0e-4

tolerance parameter used to determine first value of x

◆ hyper_flat_approximation_nu

double precision::hyper_flat_approximation_nu
Initial value:
=
4000.0

value of nu below which the flat approximation is used to compute Bessel function

◆ q_linstep

double precision::q_linstep = 0.45

asymptotic linear sampling step in q UNHANDLED: space, in units of $ 2\pi/r_a(\tau_rec) $ UNHANDLED: (comoving angular diameter distance to UNHANDLED: recombination), very important for CMB

◆ q_logstep_spline

double precision::q_logstep_spline = 400.

initial logarithmic sampling step in q UNHANDLED: space, in units of $ 2\pi/r_a(\tau_{rec})$ UNHANDLED: (comoving angular diameter distance to UNHANDLED: recombination), very important for CMB and LSS

◆ q_logstep_open

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

◆ q_logstep_trapzd

double precision::q_logstep_trapzd = 20.0

initial logarithmic sampling step in q UNHANDLED: space, in units of $ 2\pi/r_a(\tau_{rec}) $ UNHANDLED: (comoving angular diameter distance to UNHANDLED: recombination), in the case of small UNHANDLED: q's in the closed case, for which one UNHANDLED: must used trapezoidal integration UNHANDLED: instead of spline (the number of q's UNHANDLED: for which this is the case decreases UNHANDLED: with curvature and vanishes in the UNHANDLED: flat limit)

◆ q_numstep_transition

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)

◆ q_logstep_limber

double precision::q_logstep_limber
Initial value:
=
1.1

logarithmic q-step ratio for the separate full-Limber CMB lensing grid. Accepted as a default, but it is coarse: against a converged 1.01 grid this leaves ~3.1e-3 in $ C_l^{\phi\phi} $ in every geometry, flat included, converging as O(h^2) (7.4e-4 at 1.05, 1.5e-4 at 1.02). Tighten it if you need lensing-potential accuracy better than a few 0.1%. See docs/superpowers/specs/2026-09-08-limber-effective-multipole-design.md

◆ k_max_extrapolated

double precision::k_max_extrapolated
Initial value:
=
70.

the linear sources are continued past the last perturbation mode up to this k (1/Mpc) by AsymptoticExtrapolation, and trusted there: halofit and HMcode decide up to which redshift they are computable from it, and the full-Limber CMB lensing source is continued to it, times the non-linear correction there. 0 trusts only the computed modes, as before 2026-10-21. See docs/superpowers/specs/2026-10-21-lensing-source-extrapolation-design.md

◆ k_max_limber_over_l_max_scalars

double precision::k_max_limber_over_l_max_scalars
Initial value:
=
0.0005

full-Limber perturbation source cutoff k_max/l_max_scalars in 1/Mpc

◆ transfer_neglect_delta_k_S_t0

double precision::transfer_neglect_delta_k_S_t0
Initial value:
=
0.19

for the temperature source T0 of the scalar mode, the high-l margin delta_k in 1/Mpc: for l < (k-delta_k(l)) r_a(tau_rec), the transfer function is set to zero

◆ transfer_neglect_delta_k_S_t1

double precision::transfer_neglect_delta_k_S_t1
Initial value:
=
0.05

same for temperature source function T1 of scalar mode

◆ transfer_neglect_delta_k_S_t2

double precision::transfer_neglect_delta_k_S_t2
Initial value:
=
0.15

same for temperature source function T2 of scalar mode

◆ transfer_neglect_delta_k_S_e

double precision::transfer_neglect_delta_k_S_e
Initial value:
=
0.165

same for polarization source function E of scalar mode

◆ transfer_neglect_l_half_S_t0

double precision::transfer_neglect_l_half_S_t0
Initial value:
=
50.

for the temperature source T0 of the scalar mode, the l at which the margin is delta_k/sqrt(2); 0 keeps it at delta_k for every l

◆ transfer_neglect_l_half_S_t1

double precision::transfer_neglect_l_half_S_t1 = 20.

same for T1 of scalar mode

◆ transfer_neglect_l_half_S_t2

double precision::transfer_neglect_l_half_S_t2 = 100.

same for T2 of scalar mode

◆ transfer_neglect_l_half_S_e

double precision::transfer_neglect_l_half_S_e = 400.

same for E of scalar mode

◆ transfer_neglect_delta_k_V_t1

double precision::transfer_neglect_delta_k_V_t1
Initial value:
=
1.0

same for temperature source function T1 of vector mode

◆ transfer_neglect_delta_k_V_t2

double precision::transfer_neglect_delta_k_V_t2
Initial value:
=
1.0

same for temperature source function T2 of vector mode

◆ transfer_neglect_delta_k_V_e

double precision::transfer_neglect_delta_k_V_e
Initial value:
=
1.0

same for polarization source function E of vector mode

◆ transfer_neglect_delta_k_V_b

double precision::transfer_neglect_delta_k_V_b
Initial value:
=
1.0

same for polarization source function B of vector mode

◆ transfer_neglect_delta_k_T_t2

double precision::transfer_neglect_delta_k_T_t2
Initial value:
=
0.2

same for temperature source function T2 of tensor mode

◆ transfer_neglect_delta_k_T_e

double precision::transfer_neglect_delta_k_T_e
Initial value:
=
0.25

same for polarization source function E of tensor mode

◆ transfer_neglect_delta_k_T_b

double precision::transfer_neglect_delta_k_T_b
Initial value:
=
0.1

same for polarization source function B of tensor mode

◆ transfer_neglect_late_source

double precision::transfer_neglect_late_source
Initial value:
=
400.0

value of l below which the CMB source functions can be neglected at late time, excepted when there is a Late ISW contribution

◆ l_switch_limber

double precision::l_switch_limber
Initial value:
=
30.

when to use the Limber approximation for project gravitational potential cl's

◆ cmb_lensing_sampling_factor

double precision::cmb_lensing_sampling_factor
Initial value:
=
1.

logarithmic time step of the CMB lensing line-of-sight integral at late times, Delta tau = (tau0-tau) cmb_lensing_sampling_factor / min(l_switch_limber, l_max_scalars). Decrease for more precision.

◆ cmb_lensing_sampling_fraction

double precision::cmb_lensing_sampling_fraction
Initial value:
=
0.001

the CMB lensing source is sampled until tau = (1-cmb_lensing_sampling_fraction) tau0 (closer to us, it does not contribute). Decrease for more precision.

◆ l_switch_limber_for_nc_local_over_z

double precision::l_switch_limber_for_nc_local_over_z
Initial value:
=
100.0

when to use the Limber approximation for local number count contributions to cl's (relative to central redshift of each bin)

◆ l_switch_limber_for_nc_los_over_z

double precision::l_switch_limber_for_nc_los_over_z
Initial value:
=
30.0

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)

◆ selection_cut_at_sigma

double precision::selection_cut_at_sigma
Initial value:
=
5.0

in sigma units, where to cut gaussian selection functions

◆ selection_sampling

double precision::selection_sampling
Initial value:
=
50.0

controls sampling of integral over time when selection functions vary quicker than Bessel functions. Increase for better sampling.

◆ selection_sampling_bessel

double precision::selection_sampling_bessel
Initial value:
=
20.0

controls sampling of integral over time when selection functions vary slower than Bessel functions. Increase for better sampling. IMPORTANT for lensed contributions.

◆ selection_sampling_bessel_los

double precision::selection_sampling_bessel_los
Initial value:
=
20.0

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

◆ selection_sampling_bessel_min

double precision::selection_sampling_bessel_min
Initial value:
=
1.

for evenly spaced time samplings (number counts, galaxy lensing): minimum number of sampled points per radian of the Bessel functions j_l(q(tau0-tau)) for computing a line-of-sight integral. Above the corresponding q, the sampled Bessel function stops oscillating and the trapezoidal sum aliases; the Limber approximation is used instead. Results are identical between Nyquist (1/pi) and 1.

◆ selection_tophat_edge

double precision::selection_tophat_edge
Initial value:
=
0.1

controls how smooth are the edge of top-hat window function (<<1 for very sharp, 0.1 for sharp)

◆ sigma_k_per_decade

double precision::sigma_k_per_decade
Initial value:
=
80.

logarithmic stepsize controlling the precision of integrals for sigma(R,k) and similar quantitites

◆ nonlinear_min_k_max

double precision::nonlinear_min_k_max
Initial value:
=
2.0

with halofit or HMcode, the perturbation modes are computed at least up to this k (1/Mpc); the P(k,z) output is still limited by P_k_max. Beyond the last mode the linear spectrum is continued (k_max_extrapolated). 5/Mpc until 2026-10-21; at 2/Mpc P_NL stays within 6e-4 of modes solved to 70/Mpc up to z = 3, at 1/Mpc it is 4e-3 off at z = 3. The continuation assumes the sources have their high-k form above a third of this k: true for cold dark matter, baryons, dark energy and massive neutrinos (tested to 0.2 eV each, and 1 eV within 2e-3), but not near a free-streaming cutoff. A species whose cutoff lies there (thermal warm dark matter of 0.1 to 7 keV) has its modes solved up to k_max_extrapolated instead, by itself: with 1 keV as a quarter of the dark matter, P_NL at z = 3 was 5e-2 off at 2/Mpc. See docs/superpowers/specs/2026-10-21-lensing-source-extrapolation-design.md and 2026-10-22-nonlinear-followups-design.md

◆ halofit_min_k_nonlinear

double precision::halofit_min_k_nonlinear
Initial value:
=
1.0e-4

parameters relevant for HALOFIT computation value of k in 1/Mpc below which non-linear corrections will be neglected

◆ halofit_min_k_max

double precision::halofit_min_k_max = 2.0

DEPRECATED: should use instead nonlinear_min_k_max

◆ halofit_kR_max

double precision::halofit_kR_max = 5.0

halofit's sigma integrals use a Gaussian UNHANDLED: window exp(-(kR)^2), and are integrated until UNHANDLED: kR reaches this value, extrapolating the linear UNHANDLED: P(k) above the computed k_max if needed. UNHANDLED: sigma itself converges by kR ~ UNHANDLED: sqrt(-log(halofit_sigma_precision)) ~ 1.7, but the UNHANDLED: third integral carries a weight 4(kR)^2(1-(kR)^2) UNHANDLED: whose (kR)^4 term needs kR ~ 4 (measured; CAMB UNHANDLED: uses 4 for its top-hat). Truncating there biases UNHANDLED: the curvature C and through it P_nl.

◆ halofit_k_per_decade

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.

◆ halofit_sigma_precision

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

◆ halofit_tol_sigma

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

◆ pk_eq_z_max

double precision::pk_eq_z_max = 5.0

Maximum z for the pk_eq method

◆ pk_eq_tol

double precision::pk_eq_tol = 1.0e-7

Tolerance on the pk_eq method for finding the pk

◆ hmcode_max_k_extra

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)

◆ hmcode_min_k_max

double precision::hmcode_min_k_max = 2.

DEPRECATED: should use instead nonlinear_min_k_max

◆ hmcode_tol_sigma

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

◆ n_hmcode_tables

int precision::n_hmcode_tables = 64

parameters controlling stepsize and min/max r & a values for sigma(r) & grow table

◆ nsteps_for_p1h_integral

int precision::nsteps_for_p1h_integral = 256

parameters controlling stepsize and min/max halomass values for the 1-halo-power integral

◆ accurate_lensing

int precision::accurate_lensing
Initial value:
=
0

switch between Gauss-Legendre quadrature integration and simple quadrature on a subdomain of angles

◆ num_mu_minus_lmax

int precision::num_mu_minus_lmax
Initial value:
=
70

difference between num_mu and l_max, increase for more precision

◆ delta_l_max

int precision::delta_l_max
Initial value:
=
1000

difference between l_max in unlensed and lensed spectra: the unlensed C_l's above l_max_scalars that the lensing convolution needs. 500 until 2026-10-27, when the k range stopped following it (k_max_tau0_above_l_max): 1000 makes the lensed TT in the top 250 multipoles 3-4x more accurate at l_max_scalars = 2500-3000, for -3.8% to +3.5% time against the old rule with 500.

◆ tol_gauss_legendre

double precision::tol_gauss_legendre
Initial value:
=
DBL_EPSILON

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)

◆ smallest_allowed_variation

double precision::smallest_allowed_variation
Initial value:
=
DBL_EPSILON

machine-dependent, assigned automatically by the code


The documentation for this struct was generated from the following files: