GLASS extension for continuing lightcone simulations to higher redshift
This repository contains a GLASS extension that extends an N-body lightcone simulation to higher redshift. New matter shells are drawn beyond the last simulated shell, conditional on the shells before them, so that structure stays correlated across the boundary. With the shells extended to the last scattering surface, the extension makes a full-sky CMB lensing convergence map.
The method is described in Conditional random field sampling for high-redshift extensions of lightcone simulations with application to CMB lensing (Fusari, Jeffrey & Joachimi, in prep).
Installation
Install the package with pip into a new environment:
pip install glass.ext.extend
The exact versions the results of the paper were produced with are in
requirements.txt. With those, a map can be reproduced bit for bit from its
seed.
Supported simulations
The extension reads a simulation through a loader. It does not detect the kind
of simulation from the directory, so name the loader with --suite:
--suite |
Simulation |
|---|---|
gowerstreet |
Gower Street simulations (PKDGRAV3) |
cosmogrid |
CosmoGridV1 |
agora |
Agora |
If your simulation is not in the list, you can write a loader for it. A loader
tells the extension where the matter shells are, what their redshift edges are
and what the cosmology of the simulation is. The modules in
glass/ext/extend/loaders/ are the examples to start from. Please contribute
your loader back with a pull request.
Quick start
Point the glass-extend command to a simulation directory, on your computer or
on your cluster, and name its loader. For a Gower Street simulation:
glass-extend --suite gowerstreet --sim /path/to/GowerStreetSims/sim00230
This reads the matter shells of the simulation up to redshift 2, generates the shells from there to redshift 1100, and writes the CMB lensing convergence map as a HEALPix FITS file:
production_runs/gowerstreet_grid_2048_dchi400_sh100_sim00230/kappa_map_0000.fits
It then compares the power spectrum of the map with theory and writes the figures next to the map. Outputs go under the directory the command is run from.
Changing the settings
The defaults are the settings of the paper. The main ones can be changed on the command line:
glass-extend --suite gowerstreet --sim /path/to/GowerStreetSims/sim00230 \
--nside 1024 --num-shells 50 --delta-chi 300 --shift 1.0
--nside: resolution of the shells and of the map (default 2048);--num-shells: number of generated shells between the simulation and redshift 1100 (default 100);--delta-chi: how far back the shells that condition each new shell reach, in Mpc/h (default 400);--shift: shift of the lognormal distribution of the generated shells (default 1, the GLASS default). At a fixed variance a smaller shift gives a more skewed matter distribution. The shift must be larger than minus the lowest density contrast in the simulation shells, and the command stops with a message if it is not.
glass-extend --help lists all options.
Changing the boundary redshift
By default the simulation is used up to redshift 2 and extended from there. To
use the simulation up to another redshift, run the production step on its own
and give the boundary with --z-max-base:
glass-extend-produce --suite gowerstreet \
--sim-dir /path/to/GowerStreetSims/sim00230 --z-max-base 3
The number of generated shells stays the same, so each of them is thinner for a
higher boundary. glass-extend-produce writes the map only. To compare an
existing map with theory, run glass-extend-validate --input on its output
directory.
Tests
pip install pytest
pytest
Tests that need simulation data are skipped when the data is absent.
Metadata
Release files for glass.ext.extend 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| glass_ext_extend-0.1.1.tar.gz | 2.0 MB | With provenance | Details for glass_ext_extend-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| glass_ext_extend-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for glass_ext_extend-0.1.1-py3-none-any.whl |
Total release size: 2.0 MB
Release files / glass_ext_extend-0.1.1.tar.gz
| Download URL | glass_ext_extend-0.1.1.tar.gz |
|---|---|
| Size | 2.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c57f50cd8e9cee976997dfe54d637c44c8ed21322d6e232ceaf6612b012caf25
|
|
BLAKE2b-256 checksum How to use checksums |
2ad07dcaf060d1bb84263529b5bf732d5d27ca9d1360c4de6837c0421a2a1502
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / glass_ext_extend-0.1.1-py3-none-any.whl
| Download URL | glass_ext_extend-0.1.1-py3-none-any.whl |
|---|---|
| Size | 76.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af5999fff98f3af37f9e8ac1e7ac7f34c4e49f3e65e8927b879ed99aba2d1cf9
|
|
BLAKE2b-256 checksum How to use checksums |
09d10f89ee76ab75ae79adba1fe3c2da7f2e73a5ced17383bee1c604fcbe6778
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for glass.ext.extend 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for glass_ext_extend-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.