Machine reference¶
A flat, copy-pasteable fact table. For prose see the rest of the site; this page is the lookup.
API¶
import os; os.environ.setdefault("JAX_PLATFORMS", "cpu")
from haloemu import get_registry
reg = get_registry() # or get_registry(root=...)
reg.predict(prop, gravity, z, theta, **kw) # primary call
reg.load(prop, gravity, z) # unpickled trained artifact
reg.list() # all manifest entries (list of dict)
reg.entry(prop, gravity, z) # one manifest entry (or None)
reg.predict(..., return_var=True) # (mean, variance) for trained artifacts
θ vectors¶
LCDM : [Omega_m, h, n_s, S_8]
fRn1 : [Omega_m, h, n_s, S_8, logf_R0]
S_8 = sigma_8 * sqrt(Omega_m / 0.3) # GR fiducial sigma_8=0.8159 -> S_8=0.827914
logf_R0 = log10(|f_R0|)
Design (validity) ranges¶
Known θ¶
from halocat.cosmology import get_cosmology, theta_keys
keys = theta_keys("fRn1")
th_f5 = [get_cosmology("fRn1", 0)[k] for k in keys] # F5n1 fiducial (logf_R0 = -5)
th_f6 = [get_cosmology("fRn1", -1)[k] for k in keys] # F6n1 fiducial (logf_R0 = -6)
# LCDM fiducial: get_cosmology("LCDM", 0); design models: imodel 1..64.
Properties: shapes, units, coordinates (single θ → leading axis 1)¶
prop out shape units coord / axes kind
hmf (1, 23) (Mpc/h)^-3 log10M left edges trained
b_cum (1, 30) LCDM dimensionless log10M thresholds (art.coord) trained
(1, 31) fRn1
pk_mm (1, 147) (Mpc/h)^3 k in h/Mpc trained
xi_mm (1, 113) signed r in Mpc/h, support[2.04,124.8] trained
r_ab (1, 30, 30) dimensionless art.thresholds (both axes) trained
vel_<m> (1, 10, 60) moment units art.pair_keys, art.r [0,150] trained
b_diff dict x_grid (log10M) derived
xi_hh dict bin_edges (log10M), r derived
xi_hh_smallr surface dimensionless threshold pairs, r trained
vel_<m> ∈ {m10, c20, c02, c12, c30, c40, c04, c22}.
dict returns¶
b_diff : x_grid, b_diff, b_err, cov, checks{b_le_bcum,monotonic,boundary_ok},
r_ab_ok / r_ab_max_dev / r_ab_tol (if r_ab available), redshift
xi_hh : xi_hh (Nbin,Nbin,Nr), r, bin_edges, b_bin, validity, redshift
xi_hh kwargs¶
reg.predict("xi_hh", g, z, theta,
edges=np.array([13.0, 13.3, 13.6]), # log10M bin edges (default 0.1 dex)
r=np.geomspace(3, 90, 40), # optional radii (within [2.04,124.8])
route="auto") # auto | exact | bbar
# exact validated r in [2.2,100]; NaN inside small-r exclusion wedge = physics.
# bbar (factorization) valid r in [20,70].
b_cum arbitrary masses¶
Registered keys¶
z = 0.25 : all properties, gravity in {LCDM, fRn1}
z = 0.00 : hmf, pk_mm, xi_mm only (x {LCDM, fRn1})
not at z=0 : b_cum, b_diff, xi_hh, xi_hh_smallr, r_ab, vel_*
snapping tolerance Z_TOL = 0.005 (no exact-float match)
f(R) representation per property¶
hmf multiplicative seed-paired boost (MGBoostEmulator)
pk_mm multiplicative boost (MGBoostEmulator)
xi_mm additive Delta-xi boost (MGBoostEmulator)
vel_* additive delta boost (7/8) (VelMomentBoostEmulator); m10 direct
b_cum direct 5-parameter peak-height GP (PeakHeightEmulator)
X_fR(theta5) = B(theta5) * X_LCDM(theta5[:4]); boost pins base sha256.
Accuracy metric rules¶
fractional RMS : sign-definite quantities (hmf, pk_mm, b_cum, |xi| not near 0)
chi = resid/SEM : zero-crossing quantities (xi near BAO, all velocity moments)
chi < 1 : at/below the across-box simulation noise floor
CLI¶
micromamba run -n cosemu python3 -m haloemu.cli list
micromamba run -n cosemu python3 -m haloemu.cli predict <prop> \
--gravity <g> --redshift <z> --theta <csv> [--out file.npz|.hdf5]
micromamba run -n cosemu python3 -m haloemu.cli train <prop> \
--gravity <g> --redshift <z> [--imodels 1-64] [--iboxes 1-5]
micromamba run -n cosemu python3 -m haloemu.cli validate <prop> --gravity <g> --redshift <z>
Hard rules¶
env : micromamba run -n cosemu python3 (always)
jax : JAX_PLATFORMS=cpu before import (silences harmless CUDA 303)
heavy : slurm account dp004, partition cosma8-serial; never login node
theta : S_8 NOT sigma_8
edit : only files in halobias; never halocat / freyja
commit : only when asked; main branch; no remote
xi_AB : never call halocat assemblers bare (discover_xi_AB_grid + thresholds=)