SciPost Submission Page
FFTArray: A Python Library for the Implementation of Discretized Multi-Dimensional Fourier Transforms
by Stefan J. Seckmeyer, Christian Struckmann, Gabriel Müller, Jan-Niclas Kirsten-Siemß, Naceur Gaaloul
This is not the latest submitted version.
Submission summary
| Authors (as registered SciPost users): | Stefan Seckmeyer |
| Submission information | |
|---|---|
| Preprint Link: | https://arxiv.org/abs/2508.03697v2 (pdf) |
| Code repository: | https://github.com/QSTheory/fftarray |
| Code version: | v0.5.1 |
| Code license: | Apache-2.0 license |
| Date submitted: | Sept. 10, 2025, 8:49 a.m. |
| Submitted by: | Stefan Seckmeyer |
| Submitted to: | SciPost Physics Codebases |
| Ontological classification | |
|---|---|
| Academic field: | Physics |
| Specialties: |
|
| Approaches: | Theoretical, Computational |
The author(s) disclose that the following generative AI tools have been used in the preparation of this submission:
During the authoring of this paper LUHKI (https://luhki.uni-hannover.de/login, based on ChatGPT as per its “Über” section) was used from August 2024 to August 2025 to improve grammar and readability of single sentences and paragraphs and to debug and improve the LaTeX layout.
Abstract
Partial differential equations describing the dynamics of physical systems rarely have closed-form solutions. Fourier spectral methods, which use Fast Fourier Transforms (FFTs) to approximate solutions, are a common approach to solving these equations. However, mapping Fourier integrals to discrete FFTs is not straightforward, as the selection of the grid as well as the coordinate-dependent phase and scaling factors require special care. Moreover, most software packages that deal with this step integrate it tightly into their full-stack implementations. Such an integrated design sacrifices generality, making it difficult to adapt to new coordinate systems, boundary conditions, or problem-specific requirements. To address these challenges, we present FFTArray, a Python library that automates the general discretization of Fourier transforms. Its purpose is to reduce the barriers to developing high-performance, maintainable code for pseudo-spectral Fourier methods. Its interface enables the direct translation of textbook equations and complex research problems into code, and its modular design scales naturally to multiple dimensions. This makes the definition of valid coordinate grids straightforward, while coordinate grid specific corrections are applied with minimal impact on computational performance. Built on the Python Array API Standard, FFTArray integrates seamlessly with array backends like NumPy, JAX and PyTorch and supports Graphics Processing Unit acceleration. The code is openly available at https://github.com/QSTheory/fftarray under Apache-2.0 license.
Current status:
Reports on this Submission
Strengths
2- Provides a unique and lightweight solution for smooth integration in current workflows.
3- Very well formatted with clear documentation of codebase and examples.
4- Reduces overhead for modifying current FFT implementations (scipy, numpy) and applying the correct transformations for multidimensional transforms.
Weaknesses
2- Section 2.1 implicitly assumes a bandlimited function (wavepacket) which in general is decomposed into an infinite series of waves which will always be undersampled during discretization leading to aliasing. This is not an exact lossless transformation (a sinc function on the other hand is an exactly reconstructable function when undersampled). Discussion of aliasing is not accurate and should be enhanced with specific discussion on choice of sampling rate(spacing) with respect to the continuous function of interest.
Report
Each detail in the presentation is well thought out providing solid background and workable examples throughout. The comparisons to current methodologies using NumPy fft make switching code to FFTArray straightforward.
Requested changes
1- Update description of aliasing and exact transformations when sampling continuous functions in section 2.1.
Recommendation
Publish (meets expectations and criteria for this Journal)
