Skip to content

Output files

Miguel Zumalacarregui edited this page Aug 20, 2026 · 3 revisions

Output files

hi_class writes the same output files as CLASS, with extra columns describing the scalar field. This page documents the hi_class-specific columns: what appears in background.dat at each output_background_smg level, and which perturbation outputs gain scalar-field entries.

Which files a run writes

As in stock CLASS, all files share the prefix given by root (e.g. root = output/test_): the spectra you request via output go to <root>cl.dat, <root>pk.dat, <root>tk.dat and friends, write_background = yes produces <root>background.dat, write_parameters = yes produces <root>parameters.ini and <root>unused_parameters, and each entry of k_output_values produces a <root>perturbations_k*.dat file. The standard files and columns are documented in the CLASS wiki and in explanatory.ini; here we only describe what hi_class adds.

Scalar-field columns in background.dat

The smg columns are appended after the standard CLASS columns (redshift, distances, densities, growth factor, …). How many of them you get is controlled by the input parameter output_background_smg (section 2e of hi_class.ini). It works like a verbosity level — each level includes everything below it:

output_background_smg What is added
0 ρ_smg, p_smg
1 (code default) M*², the four α functions, α_H, c_s², kinetic term D (+ current and shift for covariant theories)
2 φ, φ′, φ″ and the background equation coefficients E_i, P_i, R_i (covariant theories), effective gravitational constant and slip
3 internal quantities used to build the perturbation equations (λ_i, A_i, B_i, C_i, …)

The shipped hi_class.ini sets output_background_smg = 10, i.e. everything. Columns marked covariant only below are printed only for models that evolve the scalar field equation (gravity_model set to a covariant theory, internally field_evolution_smg); for parametrized-α models they are simply absent, and the remaining columns keep their order.

Conventions: as everywhere in CLASS output, a (.) prefix means the density/pressure is multiplied by 8πG/3 and given in Mpc⁻², and primes are derivatives with respect to conformal time τ.

Level 0 — always written

Column Meaning
(.)rho_smg energy density of the scalar field
(.)p_smg pressure of the scalar field

Level ≥ 1 — α functions and stability quantities

Column Meaning
M*^2_smg effective Planck mass squared M*² (in units of the bare Planck mass)
D_M*^2_smg δM² = M² − 1, the departure from the standard Planck mass
kineticity_smg α_K, the kineticity: standard kinetic energy of the scalar
braiding_smg α_B, the braiding: kinetic mixing between scalar and metric
tensor_excess_smg α_T, the tensor speed excess: c_T² = 1 + α_T
M2_running_smg α_M, the running of the Planck mass: α_M = d ln M*²/d ln a
beyond_horndeski_smg α_H, the kinetic matter mixing; nonzero only for beyond-Horndeski models (glpv_galileon, propto_omega_bh)
c_s^2 sound speed squared of scalar perturbations, c_s² = cs2num/D
kin (D) kinetic term of scalar perturbations, D = α_K + (3/2)α_B²; D > 0 avoids ghosts
Current (covariant only) the shift current J of the scalar field equation
Shift (covariant only) the shift-symmetry breaking term S sourcing the field equation

c_s^2, kin (D), M*^2_smg and tensor_excess_smg are the quantities checked by the stability tests — see Stability, ICs and precision.

Level ≥ 2 — field evolution and Friedmann diagnostics

Column Meaning
phi_smg, phi', phi'' (covariant only) scalar field value and its first and second conformal-time derivatives
E0, E1, E2, E3 (covariant only) coefficients of the (generally cubic) Friedmann constraint, E0 + E1·H + E3·H³ = E2·H². Useful for diagnosing shooting/tuning problems: the code solves this equation for the initial H and monitors how well it is preserved
P0, P1, P2 (covariant only) coefficients of the first dynamical background equation, P0·φ″ + P1·H′ + P2 = 0
R0, R1, R2 (covariant only) coefficients of the second dynamical background equation, R0·φ″ + R1·H′ + R2 = 0; the code solves the P/R system for H′ and φ″
G_eff_smg quasi-static effective gravitational constant for matter (in units of G; Horndeski expression)
slip_eff_smg quasi-static gravitational slip Φ/Ψ (Horndeski expression)

Full definitions of the E_i, P_i, R_i functions (and of everything at level 3) are given in the background paper, Bellini, Sawicki & Zumalacárregui (2020), arXiv:1909.01828.

Level ≥ 3 — perturbation-equation building blocks

These are internal quantities that hi_class combines into the perturbation equations; they are exposed for debugging and for expert analyses. In order:

Column(s) Meaning
kineticity_prime_smg, braiding_prime_smg conformal-time derivatives α_K′, α_B′
kineticity_over_phiphi_smg, braiding_over_phi_smg, beyond_horndeski_over_phi_smg, kin_over_phiphi (D) (covariant only) α functions rescaled by powers of φ′, better behaved when φ′ crosses zero
A0A16 coefficients of the metric/scalar perturbation equations in the α-basis
B0B12 (covariant only) same, in the rescaled (over-φ) basis
C0C16 (covariant only) same, in the rescaled basis after using the background equations
lambda_1lambda_11, lambda_2_p, lambda_8_p, lambda_9_p, lambda_11_p λ_i stability/perturbation diagnostics and (some) conformal-time derivatives, used e.g. in the quasi-static expressions and initial conditions
cs2num, cs2num_p numerator of c_s² (c_s² = cs2num/D) and its derivative

Rather than re-deriving them here, see arXiv:1909.01828 for the complete definitions.

Scalar field in the perturbation output

Two perturbation files gain smg columns; everything else (cl*.dat, pk*.dat, and the structure of the transfer-function files) is stock CLASS output, documented in the CLASS wiki.

Transfer functions (output = dTk, file <root>tk.dat): two columns are appended after the metric transfer functions,

  • x_smg — the scalar field perturbation in the code's internal variable V_X = δφ/φ̇ (or δφ itself if use_pert_var_deltaphi_smg = yes), synchronous gauge;
  • x_prime_smg — its conformal-time derivative.

Mode-by-mode output (k_output_values, files <root>perturbations_k*_s.dat): the scalar columns

  • V_x_smg (sync), V_x_prime_smg (sync), V_x_prime_prime_smg (sync) — the field perturbation and its derivatives (named delta_phi_smg, delta_phi_prime_smg, delta_phi_prime_prime_smg instead when use_pert_var_deltaphi_smg = yes);
  • mass2_qs, mass2_qs_p, rad2_qs, friction_qs, slope_qs — the triggers evaluated by the quasi-static approximation scheme (effective mass, its derivative, radiation trigger, friction and oscillation-decay slope). These are what the automatic quasi-static method uses to decide when a mode can be treated quasi-statically — see Stability, ICs and precision.

There are no smg-specific columns in the C_ℓ or P(k) files: the scalar field affects them through the modified perturbation equations, not through extra entries.

Clone this wiki locally