Documentation · Function Wiki · Basic examples · API Guide · GPU Benchmarks · llms.txt
ObsCU (v2.0.0) is the standalone post-processing survey forward-modeling, inference, and baryon-calibration library of the CU (Cosmology Unified) ecosystem — complementing and accelerating PyCCL / Halotools / GLASS / Lenstools workflows for Euclid, CSST, LSST, DESI, and JWST surveys. Strictly decoupled from gravityCU time integration, it consumes outputs from CosmoCU (gravityCU (v3.10 merger trees / 6D subhalos, v3.11 lightcone HEALPix density shells, SPH hydro snapshots), as well as 21cmCU reionization boxes.
| Package / Module | Capabilities & Physics Models | Survey / Cross-Probe Support |
|---|---|---|
obscu.weak_lensing |
Born & multi-plane ray-tracing ( |
Euclid, CSST, LSST, DESI
|
obscu.mock_galaxies & obscu.photometry |
Extended HOD (Assembly Bias) & SHAM, gravityCU merger-tree accretion, high-$z$ |
JWST, Euclid, CSST, LSST, DESI
|
obscu.lya_skewers |
Periodic Wendland C2 SPH skewers, banded velocity-space optical depths (exact_hi & fgpa, Gaussian/Voigt), |
DESI Ly$\alpha$ forest |
obscu.cmb_secondary & obscu.cross_probes |
Correlated 21cmCU × galaxy cross-PS |
CMB-S4 / Simons Obs. × LSS/21cm |
obscu.summary_stats |
Device-native CPU/CuPy weak-lensing peak counts, 1-pt PDF/moments, |
Non-Gaussian SBI summaries |
obscu.calibration, obscu.datasets & obscu.sbi |
GSMF / CosmoCU HMCode_CU_feedback / BCM fitter, curated literature datasets, zero-copy DLPack ingest, LHS SBI runner |
Closed-loop DMO+Hydro calibration |
obscu.forecast, obscu.nonstandard, obscu.io, obscu.validation & obscu.pipeline |
Limber 3×2pt & 6×2pt theory, CosmoCU 5D AD Fisher, Knox/Hartlap/Super-Sample (SSC) covariances, Sellentin–Heavens, WDM/FDM/BPL, sharded NPZ/HDF5 + IEEE-754 WCS FITS & DESC SACC-v1 I/O, 10-gate validation (obscu benchmark), TOML CLI (obscu run), single-pass streaming lightcone multiprobes (run_streaming_lightcone_multiprobes) |
End-to-end verification, standards I/O & forecast |
obscu.imaging_sim |
Sub-pixel Sérsic/starfield RGB deep-field rasterizer (sky_renderer), single-launch spatially varying Zernike PSF + OU jitter + radial vignetting/spikes/CR + CMOS noise (psf_degrader) with DLPack batch generation (1,640–3,182 pairs/sec on RTX 4090), restoration fidelity probes (restoration_metrics) |
Optical imaging validation |
- Developer guide: docs/API_GUIDE.md
- GPU cluster benchmark protocol & measured RTX 4090 results (
$N_{\rm side}=4096$ in0.51 s,$10^7$ halos in0.82 s,85.5×speedup;imaging_sim1,640–3,182 pairs/sec): docs/GPU_BENCHMARK_PROTOCOL.md - Generate validation dashboard:
PYTHONPATH=src python3 -m obscu.cli dashboard --output-dir validation_dashboard - Run scale benchmark (
smoke/mid/production):PYTHONPATH=src python3 scripts/benchmark_gpu_production.py --preset smoke
-
Units: non-
hcomoving$\mathrm{Mpc}$ ,$M_\odot$ ,$\mathrm{km,s^{-1}}$ ,$\mathrm{Mpc}^{-1}$ . -
Compute Backends: CPU-first (
numpy/scipy), with optionalcupyGPU acceleration (backend="cupy"or"auto").
# Install editable package (optional extras: io, healpix, gpu, full)
pip install -e .
# Check optional dependencies and module readiness
PYTHONPATH=src python3 -m obscu.cli check
# Run 10 quantitative analytic + live CosmoCU validation gates
PYTHONPATH=src python3 -m obscu.cli benchmark
# Run full forward-modeling pipeline from a CU-Suite/ObsCU TOML config
PYTHONPATH=src python3 -m obscu.cli run path/to/project.toml --output-dir runs/smoke
# Run unit tests & examples
PYTHONPATH=src python3 -m unittest discover -s tests -v
PYTHONPATH=src python3 examples/euclid_3x2pt_fisher.py
PYTHONPATH=src python3 examples/jwst_wdm_uvlf_and_lya.py
PYTHONPATH=src python3 examples/ng_sbi_wdm_bpl_fom.py| Repository | Role | Canonical Link |
|---|---|---|
CU-Suite |
Top-level orchestrator, interface contract & baryon calibration | https://github.com/HainaHuang729/CU-Suite |
CosmoCU |
C++20 Einstein–Boltzmann, nonlinear HMcode/BCM/EFTofLSS, CMB & Dual<10> AD |
https://github.com/HainaHuang729/CosmoCU |
ICU |
Memory-optimized GPU/CPU/MPI 1LPT/2LPT/3LPT cosmological initial conditions | https://github.com/HainaHuang729/ICU |
gravityCU |
Multi-GPU VRAM-resident CUDA TreePM, SPH hydro, lightcones & GPU FoF | https://github.com/HainaHuang729/gravityCU |
21cmCU |
Native C/CUDA + cuFFT 21cm reionization & Bayesian inference engine | https://github.com/HainaHuang729/21cmCU |
ObsCU |
Decoupled cosmological survey forward modeling, SBI & baryon calibration | https://github.com/HainaHuang729/ObsCU |
If you use ObsCU in your research, please cite CITATION.cff:
@software{huang_2026_obscu,
author = {Huang, Haina},
title = {{ObsCU}: Decoupled Cosmological Survey Forward-Modeling and Baryon-Calibration Library},
version = {2.0.0},
year = {2026},
url = {https://github.com/HainaHuang729/ObsCU}
}