fft1

PlasmaCalcs.tools.fft_tools.array_fft.fft1(array, dx, axis=-1, *, rad=False, **kw_np_fftn)

calculates fft along 1 dimension, as well as the corresponding frequencies.

Equivalent to:
vals, freqs = fftN(array, (dx,), axes=(axis,), rad=rad, **kw_np_fftn);
return vals, freqs[0]
array: array-like
take the fft of this array.
dx: number
spacing between elements of array (in position-space), along the axis.
This is necessary in order to provide the frequency coordinates for the result.
axis: int, default -1
axis to take fft over. (Negative values are supported & count from end.)
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 fft1(array, axis=axis, **kw_np_fftn), freqx),
where freqx is the frequencies corresponding to the x axis,
and all freqs & values are shifted with np.fft.fftshift to put the 0-frequency in the center.