Flexible-grid approximations to continuous Fourier transforms
Project description
FlexFT
FlexFT evaluates finite-sum approximations to continuous Fourier transforms on uniform input and output grids whose spacings can be chosen independently. It uses the Bailey--Swarztrauber fractional DFT/Bluestein convolution, implemented with JAX FFTs.
For samples on
x[n] = x0 + (n - floor(N / 2)) * dx
the forward transform returns approximations on
k[m] = k0 + (m - floor(N / 2)) * dk.
Installation
pip install flexft
Quick start
import jax.numpy as jnp
from flexft import flexft, iflexft
N = 256
dx = 0.05
dk = 0.02
x = (jnp.arange(N) - N // 2) * dx
f = jnp.exp(-(x**2))
F = flexft(f, dx=dx, dk=dk)
f_inverse_approximation = iflexft(F, dk=dk, dx=dx)
Omit dk in the forward transform to use the FFT-compatible spacing
1 / (N * dx). Conversely, omit dx in the inverse transform to use
1 / (N * dk).
For repeated transforms with unchanged grids, construct and reuse FlexFT or
IFlexFT; this reuses the precomputed convolution kernel.
See the documentation for the derivation, shifted grids, 2D transforms, and more examples.
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 flexft-0.1.0.tar.gz.
File metadata
- Download URL: flexft-0.1.0.tar.gz
- Upload date:
- Size: 185.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
783e6ae15c3758ae79303d6ac6bac02d93354c5bc861b82a2465eb894fee1cab
|
|
| MD5 |
fad612241c5b0d36c3650ca31b49fc50
|
|
| BLAKE2b-256 |
094a8a44e2f1a44d920a89cd9f10c70b753da3af3810b9ac3ea006b3db9885aa
|
Provenance
The following attestation bundles were made for flexft-0.1.0.tar.gz:
Publisher:
publish.yml on tomsturges/FlexFT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flexft-0.1.0.tar.gz -
Subject digest:
783e6ae15c3758ae79303d6ac6bac02d93354c5bc861b82a2465eb894fee1cab - Sigstore transparency entry: 2116613617
- Sigstore integration time:
-
Permalink:
tomsturges/FlexFT@a4c83f01c53f9ac3233ee2d59e9db56df61ab630 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tomsturges
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a4c83f01c53f9ac3233ee2d59e9db56df61ab630 -
Trigger Event:
release
-
Statement type:
File details
Details for the file flexft-0.1.0-py3-none-any.whl.
File metadata
- Download URL: flexft-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
442dde9eb599b8aa320ccb490e1db5f89890adfc1339b1fd0da98e21f7a18596
|
|
| MD5 |
ab941158b31dcb9ea7a56caa5c2d6963
|
|
| BLAKE2b-256 |
211fc63b57b22265269d327d22f79ca65c04b25a581665ab64cc76aec2ff5a9b
|
Provenance
The following attestation bundles were made for flexft-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on tomsturges/FlexFT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flexft-0.1.0-py3-none-any.whl -
Subject digest:
442dde9eb599b8aa320ccb490e1db5f89890adfc1339b1fd0da98e21f7a18596 - Sigstore transparency entry: 2116613691
- Sigstore integration time:
-
Permalink:
tomsturges/FlexFT@a4c83f01c53f9ac3233ee2d59e9db56df61ab630 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tomsturges
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a4c83f01c53f9ac3233ee2d59e9db56df61ab630 -
Trigger Event:
release
-
Statement type: