interface MaxFFTOptions

Options for constructing a MaxFFT instance.

Index

Properties

normalize boolean

When true, MaxFFT.inverse scales its output by 1/size, so that inverse(forward(x)) reproduces x directly. When false (the default), transforms are unscaled like the underlying FFT library: inverse(forward(x)) equals size * x.

precision "float32" | "float64"

Numeric precision. "float32" instances operate on Float32Array and "float64" instances on Float64Array (plain Arrays work with either). Defaults to "float32".

spectrum "packed" | "unpacked"

Spectrum layout for real transforms. "packed" (the default) is the native half-spectrum described in MaxFFT.forward: size elements, with the DC and Nyquist components sharing the first pair. "unpacked" instead produces/consumes the numpy/CCS convention: a 2 * (floor(size / 2) + 1)-element spectrum of floor(size / 2) + 1 complex bins, laid out [DC, 0, re1, im1, ..., re_{size/2-1}, im_{size/2-1}, Nyquist, 0] -- see MaxFFT.forward for details. Only applies to real transforms; combining spectrum: "unpacked" with type: "complex" throws a TypeError. Defaults to "packed".

"packed" requires an even size: the DC/Nyquist sharing trick needs a distinct Nyquist bin to pair with DC, which doesn't exist when size is odd (see MaxFFT's arbitrary-size remarks). An odd, non-native-fast size combined with "packed" throws a TypeError; use "unpacked" for odd sizes instead.

type "real" | "complex"

Transform type. A "real" transform takes real-valued input and produces a half-spectrum (see MaxFFT.forward for the packing convention); a "complex" transform takes and produces interleaved complex values (re, im, re, im, ...). Defaults to "real".