fftN

PlasmaCalcs.tools.fft_tools.array_fft.fftN(array, ds, axes=None, *, rad=False, **kw_np_fftn)

calculates fft along N dimensions, as well as the corresponding frequencies.

array: array-like
take the fft of this array (along the indicated axes).
ds: list-like with length == len(axes) (or array.ndim if axes is None)
specifies the spacing between elements of array (in position-space), along each axis.
This is necessary in order to provide the frequency coordinates for the result.
axes: None, or iterable of ints
axes to take fft over. (Negative values are supported & count from end.)
None –> take fft over all axes.
rad: bool
if True, convert frequencies to “radians” by multiplying them by 2 * pi.
E.g., for fft in space, rad=False gives 1/wavelength; rad=True gives wavenumber k.
additional kwargs passed to np.fft.fftn.
returns (shifted fftn(array, axes=axes, **kw_np_fftn), (freq0, freq1, …, freqN)),
where freq0, freq1, …, freqN are the frequencies corresponding to the N axes,
and all freqs & values are shifted with np.fft.fftshift to put the 0-frequency in the center.