High-performance vectorized FFTLog implementation for fast Hankel transforms in pure Python with optional numexpr acceleration
Project description
fftloggin
Vectorized FFTLog in pure python
Installation
# Install with uv
uv pip install fftloggin
# Or with pip
pip install fftloggin
Development
Setup
# Clone the repository
git clone https://github.com/yourusername/fftloggin.git
cd fftloggin
# Install dependencies
uv sync --all-extras --dev
Running Tests
# Run standard tests (fast)
uv run pytest
# Run all tests excluding benchmarks
uv run pytest -m "not benchmark"
# Run with verbose output
uv run pytest -v
Benchmark Tests
Benchmark tests compare the Python implementation against the original Fortran FFTLog code. These tests are optional and require a Fortran compiler.
Prerequisites
- Have
gfortraninstalled on your PATH
Running Benchmarks
# Generate benchmark reference files
python tests/generate_benchmarks.py
# Run benchmark tests
uv run pytest --run-benchmarks
# Or run only benchmark tests
uv run pytest tests/test_benchmark.py --run-benchmarks -v
# Generate and run benchmarks in one command
uv run pytest --generate-benchmarks --run-benchmarks
Regenerating Benchmarks
If you need to regenerate the benchmark files:
# Remove old benchmarks
rm -rf tests/benchmarks/*.txt
# Generate fresh benchmarks
python tests/generate_benchmarks.py
Linting
# Check code style
uv run ruff check .
# Format code
uv run ruff format .
References
- Hamilton, A. J. S. "Uncorrelated modes of the non-linear power spectrum." Monthly Notices of the Royal Astronomical Society 312.2 (2000): 257-284. [astro-ph/9905191]
- Assassi, Valentin, Marko Simonović, and Matias Zaldarriaga. "Efficient Evaluation of Cosmological Angular Statistics." arXiv preprint arXiv:1705.05022 (2017). [1705.05022]
- Schöneberg, Nils, et al. "Beyond the traditional Line-of-Sight approach of cosmological angular statistics." Journal of Cosmology and Astroparticle Physics 2018.10 (2018): 047. [1807.09540]
- Fang, Xiao, et al. "Beyond Limber: Efficient computation of angular power spectra for galaxy clustering and weak lensing." Journal of Cosmology and Astroparticle Physics 2020.05 (2020): 010. [1911.11947]
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 fftloggin-0.2.0.tar.gz.
File metadata
- Download URL: fftloggin-0.2.0.tar.gz
- Upload date:
- Size: 274.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68569732bbfc33ba5019366b980fd0b24dfc5c708a35dd8a677bc032a2f8a172
|
|
| MD5 |
21bf10acb54ea490503e482189e33f44
|
|
| BLAKE2b-256 |
4703ea172053e422d7f89eec27f63d4628f14ae12a3beca44f4357393122a2b3
|
File details
Details for the file fftloggin-0.2.0-py3-none-any.whl.
File metadata
- Download URL: fftloggin-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
247f2cfb69083db1d8aa9f2ff2b7d9828efe25d80bc2a6b7bfcc22b96acbe080
|
|
| MD5 |
5e4f33d0d7cf35df1069be578fb34ba7
|
|
| BLAKE2b-256 |
dea4c0edd76326d56e5facc44a54f02140794210c9a2d6cc61a711de3a721850
|