Skip to main content

Perturbation theory calculations for LCDM and Modified Gravity theories using fk-Kernels implemented in Python with JAX

Project description

fkptjax

Perturbation theory calculations for LCDM and Modified Gravity theories using "fk"-Kernels implemented in Python with JAX.

Based on the C code at https://github.com/alejandroaviles/fkpt, which is based on the paper Rodriguez-Meza, M. A. et al, "fkPT: Constraining scale-dependent modified gravity with the full-shape galaxy power spectrum", JCAP03(2024)049.

Installation

Install from source:

pip install .

For development, install with dev dependencies:

pip install -e ".[dev]"

Requirements

  • Python 3.10+
  • JAX 0.4.0+
  • NumPy 1.24.0+
  • SciPy 1.10.0+

Usage

import fkptjax

# Example usage will be added as the package develops

See the examples/ directory for more detailed usage examples.

Development

Run tests:

pytest

Run benchmarks (default: all calculators, 100 runs):

python tests/test.py

Run benchmarks with options:

# Run only NumPy calculator
python tests/test.py -c numpy

# Run with custom data file and 50 runs
python tests/test.py -d mydata.npz -n 50

# Run both NumPy and JAX CPU calculators
python tests/test.py -c numpy jax-cpu

# Show all options
python tests/test.py --help

Run tests with coverage:

pytest --cov=fkptjax

Type checking:

mypy src/fkptjax

License

MIT License - see LICENSE file for details.

Authors

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

fkptjax-0.1.0.tar.gz (107.9 kB view details)

Uploaded Source

Built Distribution

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

fkptjax-0.1.0-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file fkptjax-0.1.0.tar.gz.

File metadata

  • Download URL: fkptjax-0.1.0.tar.gz
  • Upload date:
  • Size: 107.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fkptjax-0.1.0.tar.gz
Algorithm Hash digest
SHA256 10b9de62854441fe37b36b2ff89c44cb5cca03794be4a65eb84c31bf452d45ab
MD5 3fcbf4dd6e9bac4830c92a9d8162934a
BLAKE2b-256 e637b3dde15c5771851644b9250272944963d5e393e8b78058eac03d3100f3d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for fkptjax-0.1.0.tar.gz:

Publisher: publish.yml on cosmodesi/fkptjax

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

File details

Details for the file fkptjax-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fkptjax-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fkptjax-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab3a80f10a6206bf365ceda83cd3d82ef96dabddcefa4b605c927837c228d140
MD5 b6aef4c8dedaed15bab19100d313cae6
BLAKE2b-256 6496dd6fb6ac432f9e6b89cd6b43fc31de84b34575e2f1fc4661958d2457a6bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for fkptjax-0.1.0-py3-none-any.whl:

Publisher: publish.yml on cosmodesi/fkptjax

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