FFTIndexing.jl

Indexing objects for working with Fourier transforms.
Author brainandforce
Popularity
0 Stars
Updated Last
9 Months Ago
Started In
February 2024

FFTIndexing.jl

CI status Codecov Aqua.jl

A package providing types that assist with indexing objects in a manner that allows for convenient interpretation of the results of Fourier transforms.

Usage

The FFTIndex object serves a purpose analogous to Julia's CartesianIndex, but uses the frequency bins generated by a Fourier transform instead of the provided array indices. This means there are two key differences: FFTIndex always provides zero-based indexing for an array, and it guarantees an inbounds array access due to the periodic boundary conditions assumed by the Fourier transform. For AbstractArray instances, the exclusive use of FFTIndex for indexing will remove the bounds check - no @inbounds annotation needed.

The FFTAxis object serves a purpose analogous to Base.OneTo, and represents the frequency bins generated by a Fourier transform. The FFTAxis objects associated with an indexable object A can be generated with fftaxes(A).

The FFTIndices object serves a purpose analogous to CartesianIndices, and can be constructed from a Tuple of integers representing sizes or ranges representing axes, or from the indexable object directly.

See also

FFTViews.jl, which provides the FFTView array wrapper.