Scripts reference#
The command-line tools under scripts/, grouped by task. Run everything from the
repository root. Python scripts run with uv run python <script> and every one that
parses arguments prints its full option list with --help, so this page does not repeat
option lists. Shell and Slurm launchers show their invocation form instead.
Most tools here are for developers and cluster users. If you just want to run a forecast, you do not need any of them: see A verified first forecast.
Which script do I want?#
I want to… |
Use |
Section |
|---|---|---|
Compare CAMB and CLASS forecasts for the configured validation cases |
|
|
Compare two Fisher matrices on disk |
|
|
Check a CMB forecast against a Planck chain |
|
|
Compare Fisher and Nautilus posteriors for WL and GCsp |
|
|
Run long Nautilus chains on a Slurm cluster |
|
|
Time the photometric pipeline, or compare backends and fast paths |
|
|
Run a CMB Fisher for Planck, Simons Observatory or CMB-S4 specs |
|
|
Add a Gaussian prior to a saved Fisher matrix |
|
|
Prepare a release |
|
Backend validation#
Run CAMB-versus-CLASS comparisons and build the report dashboard; see
Backend validation for the workflow. Start with run_selected_validations.sh. It
calls most of the others.
Script |
What it does |
|---|---|
|
Runs selected cases ( |
|
Runs both backends, the comparison, plots and report for one case ( |
|
Computes two Fisher forecasts with chosen backends ( |
|
Compares the Fisher matrices in a result directory; positional |
|
Plots the comparison stored in a JSON file (positional |
|
Renders comparison folders as Markdown or HTML reports. |
|
Builds the dashboard HTML from validation configs and results; |
|
Publishes the dashboard to the |
|
Installs the pinned CAMB fork for validation without changing the package’s CAMB pin. |
Planck diagnostics#
Compare CMB Fisher forecasts with Planck chains and published covariances. The Planck
directory must hold the chain’s .likestats, .margestats, .covmat, .paramnames and
.minimum.inputparams products.
Script |
What it does |
|---|---|
|
Builds a CMB Fisher at a Planck best fit, with options for parameterisation, observables, noise and solver settings. |
|
Runs the standard set of best-fit variants used by the covariance/noise diagnostic notebook: |
|
Compares a Fisher forecast (positional |
|
Plots Planck covariance constraints against a Fisher forecast. |
Likelihood tools#
For the Nautilus workflow itself, see Likelihood sampling with Nautilus.
Script |
What it does |
|---|---|
|
Quick WL, GCsp and joint Fisher-versus-Nautilus demo with comparison plots. Use |
|
Runs one case ( |
|
Summarises a finished run ( |
|
Collects copied HPC run artefacts into the statistics and figures of Likelihood validation. |
|
Plots posterior samples from one or more chain metadata files. |
|
Runs the SYREN likelihood checks ( |
|
Evaluates and saves a two-parameter GCsp likelihood grid. |
|
Checks the GCsp likelihood curvature for several finite-difference step fractions. |
|
Two-parameter weak-lensing likelihood grid with parallel workers. |
|
Prints SymPy checks of the GCsp covariance. It has no options and no |
Slurm launchers#
For cluster runs of the WL and GCsp Nautilus cases. They need Slurm and the site
environment (JURECA/PUNCH for the WL/GCsp templates). Start with submit_wl_gcsp_nautilus.sh,
which submits the two WL/GCsp .sbatch templates for you.
Script |
Invocation |
|---|---|
|
|
|
|
|
Template for one case: |
|
Template for the dependent postprocessing job. |
|
Generic launcher for the YAML-driven |
|
Small YAML examples and generic runner: |
Benchmarks and profiling#
Script |
What it does |
|---|---|
|
Times photometric ( |
|
Profiles photometric angular spectra and Fisher calculations across backends, accuracies and derivative settings. |
|
Runs one CMB Fisher forecast from a survey-spec YAML; see below. |
|
Runs the Planck, Simons Observatory and CMB-S4 presets in one go; see below. |
The photometric and CMB scripts live in scripts/archive/, where historical tools are
kept. They still run but are not part of the maintained
validation workflow. See also CMB benchmarks for the CMB specifications they use.
Photometric benchmark#
uv run python scripts/archive/benchmarks/photometric_benchmark.py \
--code symbolic --observables WL
This computes a Fisher forecast with the symbolic backend in about 10 seconds. It
prints one timing and error summary per run and writes the matrix, a timings file and
*_fisher_comparison.json to scripts/benchmark_results/ (gitignored, created
relative to the current directory, so run it from the repository root). Useful options:
--codes camb,class,symbolic(orall) runs several backends and compares them.--observables GCph,WL(the default) selects the probes.--accuracy Nscales the grid sizes; higher is slower and more precise.--efficiencyalso benchmarks the lensing-efficiency integrators, and--skip-fisherskips the Fisher run.--fast-benchmarkruns a full Fisher with the fast code paths on and off and writes a JSON summary;--fast,--fast-eff,--fast-pand--fast-kernelset the fast-path toggles.--compare-ref PREFIX_OR_JSONcompares against an earlier run.
CMB Fisher smoke test#
Run it from the repository root:
uv run python scripts/archive/cmb/run_cmb_fisher_smoke.py \
--code camb \
--spec-yaml cosmicjellyfish/configs/default_survey_specifications/Planck.yaml \
--observables CMB_T,CMB_E --lmax 120 \
--outdir tmp/cmb_planck_smoke --write-enabled-yaml
--spec-yaml can also be Simons-Observatory-PlanckLowEll.yaml or
CMB-Stage4-PlanckLowEll.yaml from the same folder. --observables takes any of
CMB_T, CMB_E, CMB_B. --write-enabled-yaml saves a copy of the solver YAML with
CMB outputs switched on in the output directory and runs with it; keep it unless your
own YAML already enables CMB outputs.
run_cmb_benchmarks.py --which planck,so,s4 runs the three presets with CAMB; add
--lmax 120 for a quick test. --boltzmann-yaml selects another solver YAML and is
forwarded to run_cmb_fisher_smoke.py.
Fisher utilities#
Script |
What it does |
|---|---|
|
Adds a one-parameter Gaussian prior ( |
Release maintenance#
Script |
Invocation |
|---|---|
|
|
|
|
|
|
|
|