Skip to main content
Sandbox Physics
Fast radio bursts and the cosmic baryon census

Recompute the localized-burst baryon census

Sandbox Physics ·

This guide refits the cosmic baryon density from the five gold-standard ASKAP bursts of Macquart and colleagues with saved scripts. It splits each burst into Milky Way, cosmic and host parts, rebuilds the four-parameter likelihood on a grid, and gets Ωbh70=0.0505\Omega_{\mathrm b}h_{70}=0.0505 with a 68 percent interval from 0.03990.0399 to 0.06230.0623. The published values are 0.051−0.015+0.0140.051^{+0.014}_{-0.015} from the frequentist analysis and 0.0560.056 from the Markov-chain analysis. Two independent checks test the scripts, and six recorded mistakes show how the result breaks.

Read Adding up electrons across an expanding universe and Why every sightline gives a different dispersion first; they derive the two ingredients used here. The paper is Macquart et al., 2020, arXiv version 1, published in Nature 581, 391.

Get the materials and run them

Download the scripts, inputs and saved outputs and extract the archive. It contains six Python files, the three saved JSON files and a short README. The scripts use only the Python standard library. The saved run used Python 3.9.6 and took 113 seconds.

cd frb-baryon-census/scripts
python3 reproduce_benchmarks.py ../my-run

The run writes inputs.json, outputs.json and failure-cases.json into the folder you name. A rerun reproduces the saved files byte for byte. The same files are served as inputs, outputs and failure cases. Run from the scripts folder, because the main script imports its five siblings from there.

Fix the inputs and units

Dispersion measures are in pc cm−3\mathrm{pc\,cm^{-3}}, distances in comoving megaparsecs and masses in solar masses. The fixed inputs are:

Table 5.1 Fixed inputs of the saved run.
QuantityValueSource
H0H_0, Ωb\Omega_{\mathrm b}, ΩΛ\Omega_\Lambda67.7467.74, 0.04860.0486, 0.6910.691Planck 2015, as in Macquart Fig. 2
Helium mass fraction YY0.25Macquart eq. 2
Diffuse fraction fdf_{\mathrm d}0.85, constantteaching choice; Macquart use fd(z)f_{\mathrm d}(z)
Milky Way disc and halo30 and 50Macquart main text
Bursts and redshiftssix from Table 1, five goldMacquart Table 1
Grid in Ωbh70\Omega_{\mathrm b}h_{70}0.01 to 0.11, step 0.0025our choice
Grid in FF0.05 to 0.5, ten valuesour choice
Host median eμe^{\mu} and width σhost\sigma_{\mathrm{host}}20 to 330 and 0.2 to 1.5our choice

Macquart and colleagues scanned eμe^{\mu} from 20 to 200 and σhost\sigma_{\mathrm{host}} from 0.2 to 2.0. Our grid is a little different, so small differences in the interval are expected.

Split each burst into its parts

Subtract the Milky Way's 80 to get DM′\mathrm{DM}', compare with the mean cosmic value at the host redshift, and the remainder is what the host must supply, first as seen from Earth and then in the host's own frame.

Table 5.2 The six bursts split into parts.
BurstzzDM′\mathrm{DM}'Mean cosmicHost, observedHost, rest frame
FRB 1809240.3214281.42282.59−1.17-1.17−1.55-1.55
FRB 1811120.4755509.27425.8483.43123.1
FRB 1901020.291283.6254.7328.8737.27
FRB 1906080.1178258.799.91158.79177.5
FRB 1906110.378241.4334.87−93.47-93.47−128.81-128.81
FRB 1907110.522513.1469.543.666.36

A negative host term is not a mistake. It means the sightline has less cosmic gas than average. FRB 190611 is the one burst whose host Macquart and colleagues call tentative, and it is left out of the gold sample.

from frb_cosmology import dispersion_constant, mean_cosmic_dispersion

print(round(dispersion_constant(0.85), 2), round(mean_cosmic_dispersion(0.5), 2))

This prints 824.34 and 448.82: the constant KK and the mean cosmic dispersion at z=0.5z=0.5.

Build the likelihood

For each burst the probability of its DM′\mathrm{DM}' is the convolution of the cosmic and host distributions, eq. 7 of the paper:

Pi(DMi′∣zi)=∫0DMi′phost(DMhost∣μ,σhost) pcosmic(DMi′−DMhost∣zi) dDMhost.P_i(\mathrm{DM}'_i\mid z_i)=\int_0^{\mathrm{DM}'_i}p_{\mathrm{host}}(\mathrm{DM}_{\mathrm{host}}\mid\mu,\sigma_{\mathrm{host}})\,p_{\mathrm{cosmic}}(\mathrm{DM}'_i-\mathrm{DM}_{\mathrm{host}}\mid z_i)\,\mathrm d\mathrm{DM}_{\mathrm{host}} .

The host term is the log-normal of eq. 3, with median eμe^{\mu} in the host's rest frame, transformed to the observer by the factor 1/(1+z)1/(1+z) as the Methods text after eq. 3 describes. The cosmic term is eq. 4 with Δ=DMcosmic/⟨DMcosmic⟩\Delta=\mathrm{DM}_{\mathrm{cosmic}}/\langle\mathrm{DM}_{\mathrm{cosmic}}\rangle, σDM=Fz−1/2\sigma_{\mathrm{DM}}=Fz^{-1/2}, and ⟨DMcosmic⟩\langle\mathrm{DM}_{\mathrm{cosmic}}\rangle proportional to Ωbh70\Omega_{\mathrm b}h_{70}. The scripts solve for C0C_0 by bisection so that the mean of Δ\Delta is 1 on 0.05≤Δ≤100.05\le\Delta\le10. The total likelihood is the product over bursts, eq. 5. Priors are flat on the grid, and FF, μ\mu and σhost\sigma_{\mathrm{host}} are summed out.

What the recomputation gives

Table 5.3 Baryon density from the gold sample.
AnalysisΩbh70\Omega_{\mathrm b}h_{70}68 percent interval
This grid, flat priors0.05050.0399 to 0.0623
Macquart, frequentist (main text)0.0510.036 to 0.065
Macquart, Markov chain (Ext. Data Table 2)0.0560.046 to 0.066
Planck 20150.04703not applicable

The 95 percent interval of the grid runs from 0.02710.0271 to 0.07340.0734. The recomputation lands on the published frequentist value. The Markov-chain value is higher, which is consistent with its different priors and with fd(z)f_{\mathrm d}(z) in place of our constant.

Two independent checks

The first check never uses the likelihood. It recomputes the mean relation with a separately written Gauss–Legendre rule, compares with Simpson's rule, and tests the two closed-form universes of the earlier chapter. All agree to about one part in 101510^{15}.

The second is a host injection. The scripts draw 40 synthetic bursts with known truth, Ωbh70=0.049\Omega_{\mathrm b}h_{70}=0.049, F=0.2F=0.2, host median 100 and width 0.5, then fit them with the same grid. Over 20 such samples the mean recovered value is 0.049560.04956, a bias of +0.00056+0.00056, and the true value lies inside the 68 percent interval in 18 of 20. The likelihood recovers what was put in.

Six ways to get it wrong

The saved failure-cases.json records six mistakes and their size.

  1. Fitting all six bursts, including FRB 190611, gives 0.03940.0394 with a 68 percent interval from 0.02770.0277 to 0.05020.0502. One burst with an uncertain host pulls the answer down by a fifth.
  2. Setting the Milky Way halo to zero instead of 50 gives 0.05620.0562: the 50 is attributed to cosmic gas.
  3. Counting one free electron per proton mass, as if there were no helium, gives 0.04420.0442, because each baryon then supplies too many electrons.
  4. Reading the observed residual as a rest-frame host value underestimates every host. For FRB 181112 the observed residual is 83.483.4, but the rest-frame value is 123.1123.1.
  5. Reading dispersion as distance puts FRB 190608 at z=0.295z=0.295 instead of 0.1180.118, and FRB 190611 at 0.2760.276 instead of 0.3780.378. A dispersion measure is not a unique distance.
  6. Keeping only synthetic bursts with DM′<600\mathrm{DM}'<600, but fitting as if nothing were dropped, keeps about 23 of 40, biases the result by −0.0036-0.0036 and leaves the truth inside the 68 percent interval in only 9 of 20 samples. A survey that misses high-dispersion bursts underestimates the baryon density.

What this does and does not establish

The recomputation shows that the published number follows from the published data, equations and Milky Way terms, and that the likelihood recovers injected values. It does not test the Milky Way halo value, the host model or the choice of gold sample; each of those moves the answer by about its error bar, as the failure cases show. Five bursts constrain the baryon density to between 20 and 30 percent. The newer and larger sample is discussed in Reading the FRB baryon census papers, and the halo-gas model behind FF is described by Prochaska and Zheng, 2019, Section 7.1.

Sources

  1. Macquart et al., 2020, arXiv version 1
  2. Prochaska and Zheng, 2019, Section 7.1

Keep reading

What this page links to directly

See this series on the content map →

Fast radio bursts and the cosmic baryon census · Reading path

From one delayed pulse to the missing baryons

  1. ArticleHow do fast radio bursts count the ordinary matter between galaxies?
  2. ArticleHow free electrons delay a radio burst
  3. ArticleAdding up electrons across an expanding universe
  4. ArticleWhy every sightline gives a different dispersion
  5. You are hereRecompute the localized-burst baryon census
  6. ArticleReading the FRB baryon census papers
Something broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy