Skip to main content

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 dependencies are pinned to the versions the results of the paper were produced with, so 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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glass.ext.extend 0.1.0
File Size Uploaded Provenance Actions
glass_ext_extend-0.1.0.tar.gz 2.0 MB With provenance Details for glass_ext_extend-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for glass.ext.extend 0.1.0
File Interpreter ABI Platform Actions
glass_ext_extend-0.1.0-py3-none-any.whl Python 3 none any Details for glass_ext_extend-0.1.0-py3-none-any.whl

Total release size: 2.0 MB

Release files / glass_ext_extend-0.1.0.tar.gz

Download URL glass_ext_extend-0.1.0.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
92f63b448e4e40db5116289bd8d5c290e5de80ea6206e0e7714ccfe247dbd450
BLAKE2b-256 checksum
How to use checksums
5c14d4a4fa1106cf0bbb45ee78afcbc19d94fd434508d5959ca7bc882d493837
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 16, 2026.

Transparency log

Release files / glass_ext_extend-0.1.0-py3-none-any.whl

Download URL glass_ext_extend-0.1.0-py3-none-any.whl
Size 76.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
403e5c5550360e49a64cb39fe529b3b2d610d8484bb356236e3335bf402aa206
BLAKE2b-256 checksum
How to use checksums
9834f07ec7d1962e75c104af741c0ec33b226bdb1f2666d177872b781a45090d
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 16, 2026.

Transparency log

Security for glass.ext.extend 0.1.0

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.

Select from 2 files

Attestation for glass_ext_extend-0.1.0.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 16, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page