# fftloggin
Vectorized FFTLog in pure python
## Installation
```bash
# Install with uv
uv pip install fftloggin
# Or with pip
pip install fftloggin
```
## Development
### Setup
```bash
# Clone the repository
git clone https://github.com/yourusername/fftloggin.git
cd fftloggin
# Install dependencies
uv sync --all-extras --dev
```
### Running Tests
```bash
# 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 `gfortran` installed on your PATH
#### Running Benchmarks
```bash
# 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:
```bash
# Remove old benchmarks
rm -rf tests/benchmarks/*.txt
# Generate fresh benchmarks
python tests/generate_benchmarks.py
```
### Linting
```bash
# 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]](https://arxiv.org/abs/astro-ph/9905191)
- Assassi, Valentin, Marko Simonović, and Matias Zaldarriaga. "Efficient Evaluation of Cosmological Angular Statistics." arXiv preprint arXiv:1705.05022 (2017). [[1705.05022]](https://arxiv.org/abs/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]](https://arxiv.org/abs/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]](https://arxiv.org/abs/1911.11947)
Raw data
{
"_id": null,
"home_page": null,
"name": "fftloggin",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "astronomy, cosmology, fftlog, hankel-transform, numerical-analysis, numexpr, scientific-computing, vectorized",
"author": null,
"author_email": "binado <bernardopveronese@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/d3/4d/2c3f619157a0fb679ac9fc4f7e4cbbbfd6150472cb39d4ac84baa20096ac/fftloggin-0.2.1.tar.gz",
"platform": null,
"description": "# fftloggin\n\nVectorized FFTLog in pure python\n\n## Installation\n\n```bash\n# Install with uv\nuv pip install fftloggin\n\n# Or with pip\npip install fftloggin\n```\n\n## Development\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/yourusername/fftloggin.git\ncd fftloggin\n\n# Install dependencies\nuv sync --all-extras --dev\n```\n\n### Running Tests\n\n```bash\n# Run standard tests (fast)\nuv run pytest\n\n# Run all tests excluding benchmarks\nuv run pytest -m \"not benchmark\"\n\n# Run with verbose output\nuv run pytest -v\n```\n\n### Benchmark Tests\n\nBenchmark tests compare the Python implementation against the original Fortran FFTLog code. These tests are optional and require a Fortran compiler.\n\n#### Prerequisites\n\n- Have `gfortran` installed on your PATH\n\n#### Running Benchmarks\n\n```bash\n# Generate benchmark reference files\npython tests/generate_benchmarks.py\n\n# Run benchmark tests\nuv run pytest --run-benchmarks\n\n# Or run only benchmark tests\nuv run pytest tests/test_benchmark.py --run-benchmarks -v\n\n# Generate and run benchmarks in one command\nuv run pytest --generate-benchmarks --run-benchmarks\n```\n\n#### Regenerating Benchmarks\n\nIf you need to regenerate the benchmark files:\n\n```bash\n# Remove old benchmarks\nrm -rf tests/benchmarks/*.txt\n\n# Generate fresh benchmarks\npython tests/generate_benchmarks.py\n```\n\n### Linting\n\n```bash\n# Check code style\nuv run ruff check .\n\n# Format code\nuv run ruff format .\n```\n\n## References\n\n- 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]](https://arxiv.org/abs/astro-ph/9905191)\n- Assassi, Valentin, Marko Simonovi\u0107, and Matias Zaldarriaga. \"Efficient Evaluation of Cosmological Angular Statistics.\" arXiv preprint arXiv:1705.05022 (2017). [[1705.05022]](https://arxiv.org/abs/1705.05022)\n- Sch\u00f6neberg, 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]](https://arxiv.org/abs/1807.09540)\n- 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]](https://arxiv.org/abs/1911.11947)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "High-performance vectorized FFTLog implementation for fast Hankel transforms in pure Python with optional numexpr acceleration",
"version": "0.2.1",
"project_urls": {
"Documentation": "https://github.com/binado/fftloggin#readme",
"Homepage": "https://github.com/binado/fftloggin",
"Issues": "https://github.com/binado/fftloggin/issues",
"Repository": "https://github.com/binado/fftloggin.git"
},
"split_keywords": [
"astronomy",
" cosmology",
" fftlog",
" hankel-transform",
" numerical-analysis",
" numexpr",
" scientific-computing",
" vectorized"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2b69f6d0d13c4fe9837220bfeef15cb9349adf3b5e6153c5c02bea1f7364d486",
"md5": "2c0e53b0dc6bb0299aa6406731cce2c5",
"sha256": "a92960d513e9f7e91b10f2e4335e0da2926ed12cdfe7c2261d9452414278bf12"
},
"downloads": -1,
"filename": "fftloggin-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2c0e53b0dc6bb0299aa6406731cce2c5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 16751,
"upload_time": "2025-11-02T05:43:02",
"upload_time_iso_8601": "2025-11-02T05:43:02.338694Z",
"url": "https://files.pythonhosted.org/packages/2b/69/f6d0d13c4fe9837220bfeef15cb9349adf3b5e6153c5c02bea1f7364d486/fftloggin-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d34d2c3f619157a0fb679ac9fc4f7e4cbbbfd6150472cb39d4ac84baa20096ac",
"md5": "9852979ec7a8fb069df21389a72aa473",
"sha256": "3fb771ac7951ea88b5ba3e167bcdbbc9df1b032021e944b3f25ef98119f4c881"
},
"downloads": -1,
"filename": "fftloggin-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "9852979ec7a8fb069df21389a72aa473",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 274610,
"upload_time": "2025-11-02T05:43:04",
"upload_time_iso_8601": "2025-11-02T05:43:04.607158Z",
"url": "https://files.pythonhosted.org/packages/d3/4d/2c3f619157a0fb679ac9fc4f7e4cbbbfd6150472cb39d4ac84baa20096ac/fftloggin-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-11-02 05:43:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "binado",
"github_project": "fftloggin#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "fftloggin"
}