tfft.PointsRange
tfft.PointsRange¶
- class PointsRange(value)¶
Bases:
enum.IntEnum
Represents the supported range for the nonuniform points.
Specifies the supported range for the nonuniform points. More restrictive options may result in faster execution.
Note
The discrete Fourier transform (DFT) is periodic with respect to the points \(k\), i.e., \(f(x, k + 2\pi) = f(x, k)\). Therefore, the DFT is defined for \(k \in (-\infty, +\infty)\) and can always be computed by shifting \(k\) by a multiple of \(2\pi\) to the interval \([-\pi, +\pi]\). However, if you can promise that the input points lie within a narrower range, the algorithm might be able to perform some optimizations.
The following options are available:
STRICT: the algorithm is only guaranteed to support values in the range \([-\pi, +\pi]\). This option offers the most opportunities for performance optimization.
EXTENDED: the algorithm is guaranteed to support values in the range \([-3 \pi, +3 \pi]\). This option offers a compromise between flexibility and performance. Even if your points are in \([-\pi, +\pi]\), this option might offer robustness against rounding error. This is the default option.
INFINITE: the algorithm is guaranteed to support values in the range \((-\infty, +\infty)\). This option offers the most flexibility, but cannot optimize performance.
Attention
For options
STRICT
andEXTENDED
, passing points outside the supported range is undefined behaviour.