Skip to main content

fkptjax

PyPI version Python License: MIT Tests

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.

See KFUNCTIONS.md for details on what quantities this code calculates. See the included notebook for examples of how to perform the calculations. See BENCHMARKS.md for timing benchmarks on different platforms.

Installation

Install from pip:

pip install fkptjax

Requirements

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

Development

For development, install with dev dependencies:

git clone https://github.com/cosmodesi/fkptjax.git
cd fkptjax
pip install -e ".[dev]"

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

Metadata

Release files for fkptjax 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fkptjax 0.2.1
File Size Uploaded Provenance
fkptjax-0.2.1.tar.gz 110.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fkptjax 0.2.1
File Interpreter ABI Platform
fkptjax-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 133.3 kB

Release files / fkptjax-0.2.1.tar.gz

Download URL fkptjax-0.2.1.tar.gz
Size 110.0 kB
Tags Source
SHA-256 checksum
How to use checksums
793fc29d3c658bb9d7d2b7d90c5b776e5c76f28511be290c1925d55259fba9a7
BLAKE2b-256 checksum
How to use checksums
0ae54a48fcaf899144a4c708397eb68e5820632cf51b8cccb2de9fdf6ba54315
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 Nov 4, 2025.

Transparency log

Release files / fkptjax-0.2.1-py3-none-any.whl

Download URL fkptjax-0.2.1-py3-none-any.whl
Size 23.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ed4ec7372e9904feb0f0819e59e65de1546fd96295f86f64c7fcbe46f3215e4
BLAKE2b-256 checksum
How to use checksums
3f97985446eec4cc202a180600e26f8b6ca0e01a2a27fe32900cf433ee349baa
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 Nov 4, 2025.

Transparency log

Security for fkptjax 0.2.1

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fkptjax-0.2.1.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 Nov 4, 2025.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files Full provenance

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