Skip to main content

JAX-accelerated FFTLog implementation for Large Scale Structure cosmology

Project description

FFTLog

A Python implementation of FFTLog for fast logarithmic FFT transforms, developed for PyBird.

Installation

From PyPI (recommended)

pip install fftlog-lss

From source

git clone https://github.com/pierrexyz/fftlog.git
cd fftlog
pip install --editable .

Dependencies

  • Python >= 3.8
  • numpy >= 1.20.0
  • scipy >= 1.7.0

Usage

FFTLog provides fast logarithmic FFT transforms for scientific computing applications. Here's a basic example:

import numpy as np
from fftlog import FFTLog

# Initialize FFTLog
fftlog = FFTLog(
    Nmax=1024,      # Number of points
    xmin=1e-3,      # Minimum x value
    xmax=1e3,       # Maximum x value
    bias=0.0,       # Bias parameter
    complex=False   # Use real FFT
)

# Example function
x = np.logspace(-3, 3, 1000)
f = np.exp(-x**2)  # Gaussian function

# Transform
result = fftlog.rec(x, f)

Features

  • Fast logarithmic FFT transforms
  • Support for both real and complex transforms
  • Spherical Bessel transforms
  • Anti-aliasing windows
  • Optimized for Large Scale Structure cosmology

Documentation

For more detailed examples and documentation, see the notebooks in the notebooks/ directory.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

fftlog_lss-0.1.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

fftlog_lss-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fftlog_lss-0.1.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.1

File hashes

Hashes for fftlog_lss-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2ea5c830080b6e6a1550f8adbecf5925cea70f34e2682eef369d887ce23207a4
MD5 2293409ccda25b275e87bab441d12618
BLAKE2b-256 2637561a1a7af94e63ae12f5df2dfb1164b3741769cd46badb0b3e4d8852c8a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fftlog_lss-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.1

File hashes

Hashes for fftlog_lss-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62ecd8392a5d198c0d93e751fd6bfc1808c3b7cadf7cf19a0543e7cbee004bdc
MD5 e78d785f72dc0fc02494a9f859a8f72d
BLAKE2b-256 ead8af9095eb00c73de597bfc96d3f70d7fc65c6803579142bededa255d69881

See more details on using hashes here.

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