DESC package to create weak lensing and large-scale structure simulations from N-body simulations for the Higher-Order Statistics Topical Team.
- Interfaces with HACC and SLICS N-body simulations.
- Construction of particle and halo lightcones with replicated boxes and random isometries (translations, rotations and flips), typically identical for groups of shells of width given by the box size, on the full sky or any footprint (optionally padded and apodized for harmonic transforms).
- Three ways of building the shells from particles: from the snapshot of each shell, replicated over the shell (
SnapshotShellBuilder), by slicing the lightcone outputs of the simulation (LightconeShellBuilder), or by interpolating the particle trajectories between consecutive snapshots to where they cross the lightcone (SnapshotInterpShellBuilder). - Lensing in the Born approximation (
BornLensingBuilder), including tomography from user-defined redshift distributions, with shear and tidal fields from spherical harmonics. - Baryonification of the shells with BaryonForge (
BaryonifiedShellBuilder), with the matching correction of the matter power spectrum. - Generation of tomographic galaxy catalogs using uniform sampling (
CatalogUniform) or clustered sampling via (linearly biased) sampling of the density field with Multinomial (CatalogClusteredMultinomial, fixed total number of galaxies) or Poisson (CatalogClusteredPoisson, fixed density) samplings, with an optional Gaussian smoothing of the density chosen per shell. - Intrinsic alignments, reduced shear and observed shapes in the catalogs.
- Catalog statistics (Cls with NaMaster, 2pt functions with TreeCorr, including those of the intrinsic alignments) and theory predictions with CCL.
- Efficient parallel computation using the Parsl framework to distribute tasks over computing resources (
pollux.pipeline), with a record of the code and environment of each run. - Use of DESC tools: CCL, healsparse and NaMaster.
reader.pyimplementsReaderobjects to read particle data from N-body simulation snapshots, and provides basic lightcone information (particle density, shell binning, etc.)footprint.pyimplements theFootprintof the maps (mask, padded mask and weights of the harmonic transforms), made once and shared by the builders.map_builder.pyimplementsMapBuilderabstract objects with their basic functionalities: I/O, spherical harmonic transforms, visualization.shells.pyimplementsShellBuilderobjects (subclass ofMapBuilder) to generate particle and halo lightcone shells.lensing.pyimplementsLensingBuilderobjects (subclass ofMapBuilder) to generate lensing maps from lightcone shells.baryons.pyimplementsBaryonifiedShellBuilder(subclass ofShellBuilder) to baryonify shells.catalog.pyimplementsCatalogGeneratorobjects to generate tomographic galaxy catalogs from the lightcone shells and lensing maps.statistics/measures and predicts the statistics of the maps (maps.py,MapStatistics) and catalogs (catalogs.py,CatalogStatistics): mixins inherited byMapBuilderandCatalogGenerator, with their plots against theory (plotting.py).ia.pyimplements the catalog augmentor of intrinsic alignments (CatalogAugmentorIA); the observed shapes (CatalogAugmentorShear) are incatalog.py.cosmo.pycontains fixed cosmologies, and theTracerandTheoryobjects for predictions.io/handles the products on disk, without the dependencies of the builders (numpy, healpy, healsparse, pyccl, sacc, astropy and PyYAML, but not NaMaster, TreeCorr, BaryonForge or Parsl): their files (files.py:PolluxIO, giving every path to the builders and catalogs, and writing and reading the files by format), theirconfig.yaml(config.py), the code version of runs (code_version.py), their index (index.py,python -m pollux.io.index ROOT) andPolluxLoaderto read them (loader.py).utils/contains helper functions by theme: numerics, sky (coordinates, maps of points, masks), NaMaster binnings and FITS tables.pipeline/contains the Parsl tasks and execution configuration, see the documentation.
pollux needs Python 3.10 or later and CCL, healpy, healsparse, NaMaster, TreeCorr, sacc, numba, fitsio, h5py, skyproj and pynverse, plus Parsl to run the pipeline, BaryonForge for baryonification, and the pygio Python bindings of GenericIO to read HACC files.
The simplest is to install them from conda-forge (the environment of the HACC-HOS-Y1 production is pinned in its shared space), then pollux from a clone of this repository:
pip install -e .
pip itself installs only what reading the products needs (pollux.PolluxLoader: numpy, healpy, healsparse, CCL, sacc, h5py, fitsio, ...); pip install -e ".[all]" adds the PyPI packages of the rest (NaMaster, TreeCorr, numba, ducc0, Parsl, ...), but not BaryonForge and GenericIO.
A run is a Python script chaining the Parsl tasks of pollux.pipeline.tasks with a YAML configuration, on Slurm jobs set by pollux.pipeline.config. The documentation describes each step and its options, how to use them from Python or in a run, and the outputs; the notebooks of notebooks/ show examples.
Each run records its code and environment in code_version/ in its output directory, and catalogs store the git commit in their FITS headers.
See CONTRIBUTING.md for the conventions of the code (formatting, docstrings, naming, organisation, plots and pipeline tasks), and ROADMAP.md for planned developments.
pollux is distributed under the BSD 3-Clause License, see LICENSE.
If you use pollux, please cite Mena-Fernández et al. (2026) for now:
@misc{MenaFernandez2026,
title={Optimization of Weak Lensing Lightcone Simulations for Higher-Order Statistics in the LSST era},
author={J. Mena-Fernández and C. Doux and J. Harnois-Déraps and K. Heitmann and C. Combet and P. Larsen and N. Frontiere and A. Bera and S. Samario-Nava and L. Castiblanco and C. Uhlemann and the LSST Dark Energy Science Collaboration},
year={2026},
eprint={2605.00821},
archivePrefix={arXiv},
primaryClass={astro-ph.CO},
url={https://arxiv.org/abs/2605.00821},
}and the software by its DOI, 10.5281/zenodo.24586235 (all versions; version 0.2: 10.5281/zenodo.24586236):
@software{pollux,
title={pollux},
author={Doux, Cyrille and Mena-Fernández, Juan},
year={2026},
publisher={Zenodo},
doi={10.5281/zenodo.24586235},
url={https://doi.org/10.5281/zenodo.24586235},
}- Mena-Fernández et al. (2026): optimization of weak lensing lightcone simulations for higher-order statistics in LSST, using lightcones created from HACC simulations with pollux.
- Bera et al. (2026): impact of baryonic feedback on two- and three-point correlation functions of galaxies and shear, from these same lightcones baryonified.
