GLASS extension for loading PKDGRAV simulations
This repository contains a GLASS extension for loading PKDGRAV simulations such as the Gower St simulations.
Installation
Install the package with pip into your GLASS environment:
pip install glass.ext.pkdgrav
Quick start
Load a PKDGRAV simulation by pointing the glass.ext.pkdgrav.load() function
to the simulation's .par file:
sim = glass.ext.pkdgrav.load("gowerst/run014/control.par")
The resulting object has attributes such as sim.parameters, sim.cosmology,
and sim.redshifts that describe the simulation.
The matter shells can be read with the simulation-specific functions such as
glass.ext.pkdgrav.read_gowerst(sim).
Cosmology
The simulation cosmology is returned from the stored input file. No new cosmological quantities are computed.
The returned cosmology object follows the Cosmology API standard. It can be passed directly into GLASS functions that require it.
Example
import glass
import glass.ext.pkdgrav
# load simulation
sim = glass.ext.pkdgrav.load("gowerst/run014/control.par")
# get the simulated cosmology
cosmo = sim.cosmology
# get shells for the simulation
shells = glass.tophat_windows(sim.redshifts)
# nside for computation; could be sim.nside
nside = 1024
# more setup
...
# this will load a GowerSt simulation iteratively
# up to redshift 2 and rescaled to nside
matter = glass.ext.pkdgrav.read_gowerst(sim, zmax=2.0, nside=nside)
# this will compute the convergence field iteratively
convergence = glass.MultiPlaneConvergence(cosmo)
# load each delta map and process
for i, delta in enumerate(matter):
# add lensing plane from the window function of this shell
convergence.add_window(delta, shells[i])
# process shell
...
Metadata
Release files for glass.ext.pkdgrav 0.4
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_pkdgrav-0.4.tar.gz | 1.8 MB | With provenance | Details for glass_ext_pkdgrav-0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| glass_ext_pkdgrav-0.4-py3-none-any.whl | Python 3 | none | any | Details for glass_ext_pkdgrav-0.4-py3-none-any.whl |
Total release size: 1.8 MB
Release files / glass_ext_pkdgrav-0.4.tar.gz
| Download URL | glass_ext_pkdgrav-0.4.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a47d427915a13224480b75dd5449d9b53acbdee08f0921e431c02fd80e5fb05b
|
|
BLAKE2b-256 checksum How to use checksums |
f8fde57609087bd163f6847cf769702bc7649a5cc661b7ce7046fcf88247ce35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Dec 19, 2025.
Transparency logRelease files / glass_ext_pkdgrav-0.4-py3-none-any.whl
| Download URL | glass_ext_pkdgrav-0.4-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a7aa6af481270b9513c2e3beb71e5cb2eb889d59d6f6038251deb688a624249
|
|
BLAKE2b-256 checksum How to use checksums |
0decea85c8acb2ed17e2a69d557d8dce87092c94e26f0b1c8dce1fc861ced846
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Dec 19, 2025.
Transparency logSecurity for glass.ext.pkdgrav 0.4
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_pkdgrav-0.4.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 Dec 19, 2025.
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.