Skip to main content

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

glass_ext_pkdgrav-0.4.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

glass_ext_pkdgrav-0.4-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

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

Hashes for glass_ext_pkdgrav-0.4.tar.gz
Algorithm Hash digest
SHA256 a47d427915a13224480b75dd5449d9b53acbdee08f0921e431c02fd80e5fb05b
MD5 b858ae756b74e26df92aa154dbf7d613
BLAKE2b-256 f8fde57609087bd163f6847cf769702bc7649a5cc661b7ce7046fcf88247ce35

See more details on using hashes here.

Provenance

The following attestation bundles were made for glass_ext_pkdgrav-0.4.tar.gz:

Publisher: release.yml on glass-dev/glass.ext.pkdgrav

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file glass_ext_pkdgrav-0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for glass_ext_pkdgrav-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8a7aa6af481270b9513c2e3beb71e5cb2eb889d59d6f6038251deb688a624249
MD5 5e8f8b7cbcd91ce4930bd1d4809cd565
BLAKE2b-256 0decea85c8acb2ed17e2a69d557d8dce87092c94e26f0b1c8dce1fc861ced846

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page