Skip to main content

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)

Source distribution for glass.ext.pkdgrav 0.4
File Size Uploaded
glass_ext_pkdgrav-0.4.tar.gz 1.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for glass.ext.pkdgrav 0.4
File Interpreter ABI Platform
glass_ext_pkdgrav-0.4-py3-none-any.whl Python 3 none any Details

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 log

Release 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 log

Release history Release notifications | RSS feed

This release

0.4 This release

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

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