iCosmos › Validation

Validation

Every number iCosmos shows is checked automatically against an independent calculation or a published result. This page collects the measured accuracy: the largest difference found in each test, not a target.

Each release runs the full test suite before it is published: more than 200 automated tests of the engine and about 300 checks of the live site in a browser. The tables below are written by those tests in this build. An entry gives the largest difference measured, where it occurred, and the tolerance the test enforces.

There are four kinds of reference. Independent numerical calculations: SciPy and mpmath integrations written separately from the engine, cross-checked with Astropy, for distances, ages, volumes and growth. Exact results: textbook universes with closed-form answers, such as Einstein–de Sitter, Milne, de Sitter and radiation-only models, and the exact growing mode of matter plus radiation. The CAMB Boltzmann code, for everything that depends on the early universe: the sound horizons, decoupling, the Silk damping scale, the growth of structure with radiation, the matter power spectrum and the CMB spectrum. And published analyses: iCosmos reproduces the cosmological fits of the DESI DR2 BAO, Pantheon+, DES-SN5YR and Union3 supernova releases from the collaborations’ own data files.

Where a quantity is calculated with an approximation, the approximation and its error are stated: the Eisenstein & Hu transfer function for P(k) (about 1.5 % on average, up to about 6 %), and the CMB emulator (table below). Where a quantity does not exist for a model, for example an age in a universe without a Big Bang, iCosmos says why instead of showing a number.

The CMB emulator

The CMB lab’s spectrum comes from a neural network trained on CAMB runs. It is tested on spectra it never saw during training: for each test model the largest relative difference from CAMB over 30 ≤ ℓ ≤ 2000 is found, and the table gives the median and the 99th percentile of those maxima, over the whole parameter range of the lab and over the region within five standard deviations of the Planck 2018 values. The low multipoles (ℓ < 30), where cosmic variance is large, and the damping tail (ℓ > 2000) are reported separately. The errors are relative to CAMB at its default accuracy, which is itself accurate to a few tenths of a percent in curved models.

CAMB at its default accuracy is not perfect either. In about 4 % of the lab’s models, curved ones (open or closed) with τ above about 0.065 and one in seven for τ > 0.09, it returns a numerical spike near ℓ = 27 (open) or ℓ = 37–40 (closed), up to a factor of two, which its interpolation spreads over about ten multipoles. The spike disappears when CAMB is run at higher accuracy (AccuracyBoost = 2), so it is not physical. Reference spectra with a spike are left out of training and testing; the table says how many. In those models the emulator gives the smooth curve, which is not tested there against default CAMB.

This was checked directly: 20 curved models with τ ≥ 0.09 from the lab’s range were run at both accuracies. Three showed a spike at default accuracy and none at AccuracyBoost = 2. Against the accurate spectra the emulator’s largest error over 30 ≤ ℓ ≤ 2000 was 0.62 % (median 0.15 %), while the default-accuracy spectra differed from the accurate ones by up to 3.3 %. In these models the emulator is closer to the accurate answer than its own training reference.

How it works: the acoustic peaks sit at multipoles set by the angle θ*, so the network does not predict the spectrum directly. The multipole axis of every training spectrum is first stretched by a fitted estimate of θ*, which puts the peaks of all models in the same place; the network learns that aligned curve (through 64 principal components), and the result is stretched back. The fitted θ* is used only for this alignment; the θ* and ℓA shown on the site come from the engine.

The lab covers Ωbh2 0.016–0.032, Ωch2 0.06–0.20, H0 55–85 km s⁻¹ Mpc⁻¹, Ωk −0.12 to +0.12, ns 0.90–1.03, ln(1010As) 2.5–3.5 and τ 0.02–0.12, with ΩΛ ≥ 0. Outside these ranges it shows a message instead of a curve. The ranges are deliberately narrower than the calculator’s: over a wider range the same network was markedly less accurate.

The whole-sky maps of the CMB lab are made in the browser by the site’s own spherical-harmonic code. Maps with detail to ℓ = 128, 768 and 1024, for the CMB spectrum and for a flat test spectrum that stresses the finest patterns, agree point by point with the independent ducc0 library to better than one part in a million of the map’s rms, which is the precision of the 32-bit numbers the map is stored in. The power measured back from each map matches what was put in, within the scatter expected for a single sky.

The guided tasks of the CMB lab include a line of open and closed universes that keep the angle θ* and the physical densities fixed (the geometric degeneracy). Five points on that line, from Ωk = −0.03 to +0.02, were run directly with CAMB at raised accuracy: CAMB’s own θ* is constant along the line to 8 parts in 100 000, the spectra differ from the flat model by at most 0.31 % rms over 100 ≤ ℓ ≤ 2000, and the emulator agrees with CAMB at every point to 0.13 % or better.

The lesson on the standard ruler shows the sound shell around one initial dense spot. Its 33 frames are computed with CAMB for the Planck 2018 parameters (transfer functions of dark matter, baryons, photons and massless neutrinos, turned into radial profiles as in Eisenstein, Seo & White 2007). CAMB’s sound horizon for these parameters is rd = 147.21 Mpc, Planck’s published value. Before the gas is released the top of the gas shell trails the distance sound has travelled by 5 to 8 %; afterwards it settles between 149.9 and 152.1 Mpc, 1.8 to 3.3 % outside rd, because the shell is wide, the profile is weighted by radius squared and the pattern shifts outwards after the release; the lesson states this. The ages shown on the time control are CAMB’s and agree with the calculator’s own to better than 1 %. For another model only the radius of the picture is rescaled to that model’s rd.

Measured on 1001 CAMB spectra not used in training (30 ≤ ℓ ≤ 2000): the median of each spectrum's largest error is 0.06 % within five standard deviations of the Planck values (99th percentile 0.14 %) and 0.13 % over the rest of the lab's range (99th percentile 0.89 %).

The tables of measured accuracy are generated by the test suite in each build and shown when the page loads; the equations are on the Reference page.

Open the iCosmos cosmology calculator

iCosmos 4.11.1 · updated