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.
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
- David Kirkby dkirkby@uci.edu
- Matthew Dowicz mdowicz@uci.edu
Project details
Release history Release notifications | RSS feed
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 fkptjax-0.2.1.tar.gz.
File metadata
- Download URL: fkptjax-0.2.1.tar.gz
- Upload date:
- Size: 110.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
793fc29d3c658bb9d7d2b7d90c5b776e5c76f28511be290c1925d55259fba9a7
|
|
| MD5 |
fd4cfd73a12999e9bed6d2b837ac97cc
|
|
| BLAKE2b-256 |
0ae54a48fcaf899144a4c708397eb68e5820632cf51b8cccb2de9fdf6ba54315
|
Provenance
The following attestation bundles were made for fkptjax-0.2.1.tar.gz:
Publisher:
publish.yml on cosmodesi/fkptjax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fkptjax-0.2.1.tar.gz -
Subject digest:
793fc29d3c658bb9d7d2b7d90c5b776e5c76f28511be290c1925d55259fba9a7 - Sigstore transparency entry: 667394580
- Sigstore integration time:
-
Permalink:
cosmodesi/fkptjax@07dfb7fbe713f8faadf95db6fca1e75139cab43d -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/cosmodesi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@07dfb7fbe713f8faadf95db6fca1e75139cab43d -
Trigger Event:
release
-
Statement type:
File details
Details for the file fkptjax-0.2.1-py3-none-any.whl.
File metadata
- Download URL: fkptjax-0.2.1-py3-none-any.whl
- Upload date:
- Size: 23.4 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 |
8ed4ec7372e9904feb0f0819e59e65de1546fd96295f86f64c7fcbe46f3215e4
|
|
| MD5 |
57c14d67bb6a3d77252bfd9ad5f16f31
|
|
| BLAKE2b-256 |
3f97985446eec4cc202a180600e26f8b6ca0e01a2a27fe32900cf433ee349baa
|
Provenance
The following attestation bundles were made for fkptjax-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on cosmodesi/fkptjax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fkptjax-0.2.1-py3-none-any.whl -
Subject digest:
8ed4ec7372e9904feb0f0819e59e65de1546fd96295f86f64c7fcbe46f3215e4 - Sigstore transparency entry: 667394582
- Sigstore integration time:
-
Permalink:
cosmodesi/fkptjax@07dfb7fbe713f8faadf95db6fca1e75139cab43d -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/cosmodesi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@07dfb7fbe713f8faadf95db6fca1e75139cab43d -
Trigger Event:
release
-
Statement type: