GLASS extension for loading PKDGRAV simulations
Project description
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
...
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file glass_ext_pkdgrav-0.4.tar.gz.
File metadata
- Download URL: glass_ext_pkdgrav-0.4.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a47d427915a13224480b75dd5449d9b53acbdee08f0921e431c02fd80e5fb05b
|
|
| MD5 |
b858ae756b74e26df92aa154dbf7d613
|
|
| BLAKE2b-256 |
f8fde57609087bd163f6847cf769702bc7649a5cc661b7ce7046fcf88247ce35
|
Provenance
The following attestation bundles were made for glass_ext_pkdgrav-0.4.tar.gz:
Publisher:
release.yml on glass-dev/glass.ext.pkdgrav
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
glass_ext_pkdgrav-0.4.tar.gz -
Subject digest:
a47d427915a13224480b75dd5449d9b53acbdee08f0921e431c02fd80e5fb05b - Sigstore transparency entry: 772625566
- Sigstore integration time:
-
Permalink:
glass-dev/glass.ext.pkdgrav@fee60919cc587c318157f2b67d0300195050729c -
Branch / Tag:
refs/tags/v0.4 - Owner: https://github.com/glass-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fee60919cc587c318157f2b67d0300195050729c -
Trigger Event:
release
-
Statement type:
File details
Details for the file glass_ext_pkdgrav-0.4-py3-none-any.whl.
File metadata
- Download URL: glass_ext_pkdgrav-0.4-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a7aa6af481270b9513c2e3beb71e5cb2eb889d59d6f6038251deb688a624249
|
|
| MD5 |
5e8f8b7cbcd91ce4930bd1d4809cd565
|
|
| BLAKE2b-256 |
0decea85c8acb2ed17e2a69d557d8dce87092c94e26f0b1c8dce1fc861ced846
|
Provenance
The following attestation bundles were made for glass_ext_pkdgrav-0.4-py3-none-any.whl:
Publisher:
release.yml on glass-dev/glass.ext.pkdgrav
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
glass_ext_pkdgrav-0.4-py3-none-any.whl -
Subject digest:
8a7aa6af481270b9513c2e3beb71e5cb2eb889d59d6f6038251deb688a624249 - Sigstore transparency entry: 772625575
- Sigstore integration time:
-
Permalink:
glass-dev/glass.ext.pkdgrav@fee60919cc587c318157f2b67d0300195050729c -
Branch / Tag:
refs/tags/v0.4 - Owner: https://github.com/glass-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fee60919cc587c318157f2b67d0300195050729c -
Trigger Event:
release
-
Statement type: