Learning path and examples#
The public examples/ directory is the executable half of the
documentation. It is tracked by Git and is intended to remain readable,
compact, and useful outside the development test suite.
Open the rendered notebook gallery to read the complete code and saved outputs without leaving the documentation site.
Recommended order#
quick_start.ipynb downloads the example catalogue, saves the base
SFCField, runs the same YAML-driven 2PCF as this guide, and plots it.particle_io.ipynb downloads the original FoF catalogue, then explains NPZ conversion, explicit raw BIN layouts, and native simulation readers.
sfc_projection.ipynb explains weights, normalisation, resolution, redshift-space coordinates, and reusable
SFCFieldproducts.window.ipynb introduces field arithmetic, built-in kernels, custom windows, and projected-kernel composition.
physical_fields.ipynb applies those two core objects to velocity derivatives, momentum density, potential, and acceleration.
counting.ipynb samples smoothed fields and constructs one-point PDFs.
corr2pcf.ipynb covers isotropic and anisotropic 2PCFs.
corr3pcf.ipynb covers standard 3PCFs and multipoles.
The first four notebooks form the common foundation. After window.ipynb, the path branches naturally: use physical_fields.ipynb for physical operators, counting.ipynb for one-point distributions, or corr2pcf.ipynb followed by corr3pcf.ipynb for correlation statistics.
Three representations of one workflow#
Most examples appear in three forms. The Quick Start intentionally keeps all three synchronized around the same inputs, sampling, outputs, and plot:
examples/notebooks/Explanatory, interactive tutorials with plotting code.
examples/configs/Minimal YAML descriptions of task inputs and outputs.
examples/scripts/Command-line drivers suitable for workstations or Slurm jobs.
For example, the same isotropic 2PCF can be launched as:
cd examples
python scripts/run_2pcf.py configs/param_2pcf.yaml
or from Python:
from pyhermes.param.parambase import read_param
from pyhermes.theory.corr2pcf import Corr_2PCF
params = read_param(config_path="./configs/param_2pcf.yaml")
result = Corr_2PCF(params).run()
The YAML path values are relative to examples/, so command-line examples
run from that directory. Each notebook changes to the same working directory
near the top.
Generated directories#
examples/data/ and examples/output/ contain local data and products.
Git tracks their .gitkeep placeholders, but not catalogues or task
products themselves. Heavy correlation products are generated by the scripts
referenced in the corresponding notebooks.