Scripts¶
The repository ships with a set of CLI drivers and bash wrappers under
scripts/. They cover the whole pipeline from reformatting the raw
.DAT files through measurements to plots.
The authoritative index is scripts/bookkeeping.md. The summary below
mirrors it; consult that file for the full per-script flag list.
Python drivers¶
| Script | Purpose |
|---|---|
reformat_catalogues.py |
CatshortV.*.DAT → halo.hdf5 (read-only on the source). |
measure_hmf.py |
Batch HMF measurement loop (load-or-measure). |
load_hmf.py |
Single-record or --grid summary inspector for hmf.hdf5. |
plot_hmf.py |
One-panel HMF plot, one line per imodel, mean over iboxes. |
measure_xi_hh.py |
Batch xi_hh measurement loop. Reads config_xi_hh.yaml by default. |
load_xi_hh.py |
Single-record or --grid inspector for xi_hh.hdf5. |
plot_xi_hh.py |
r²ξ plot in one panel, one line per mass-bin pair. |
example_load_halo.py |
Worked example: load a halo.hdf5, summarise columns, demo a mass cut. |
Bash drivers¶
Run from the repository root. They use set -euo pipefail and forward
extra flags via EXTRA_ARGS / MEASURE_EXTRA_ARGS.
| Script | Wraps | Sub-grid |
|---|---|---|
reformat_catalogues_LCDM_z0.25.sh |
reformat_catalogues.py |
LCDM, z=0.25, m=1..64, b=1..5 |
reformat_catalogues_fRn1_z0.25.sh |
reformat_catalogues.py |
fRn1 variant of the above |
load_hmf_LCDM_z0.25.sh |
load_hmf.py |
per-realisation loop |
load_hmf_fRn1_z0.25.sh |
load_hmf.py |
fRn1 variant |
measure_xi_hh_LCDM_z0.25.sh |
measure_xi_hh.py |
LCDM, m=1..9, b=1..5 |
measure_xi_hh_fRn1_z0.25.sh |
measure_xi_hh.py |
fRn1 variant |
load_xi_hh_LCDM_z0.25.sh |
load_xi_hh.py |
per-realisation loop |
Conventions¶
- All Python drivers run under
micromamba run -n cosemu python3 …. - Measurement drivers default to load-or-measure via the
HMFLoader/XiHHLoaderclasses — missing files are produced on demand, existing files are left alone unless--overwriteis passed. - 2PCF measurements read binning from
scripts/config_xi_hh.yamlunless--no-configis given. - The raw
CatshortV.*.DATfiles are read-only: ifhalo.hdf5is missing, the source is reformatted into a fresh HDF5 mirror; the.DATis never modified.
Notebooks¶
A worked walkthrough lives at notebooks/example_load.ipynb —
loads halo + HMF + xi_hh + velocity moments + sub-grid stacking on a
single realisation. Open it locally with Jupyter against the cosemu
kernel.