fft2
- PlasmaCalcs.tools.fft_tools.array_fft.fft2(array, dx, dy, axes=(-2, -1), *, rad=False, **kw_np_fftn)
calculates fft along 2 dimensions, as well as the corresponding frequencies.
Equivalent to:fftN(array, (dx, dy), axes=axes, rad=rad, **kw_np_fftn).array: array-liketake the fft of this array.dx, dy: numbersspacing between elements of array (in position-space), along each axis.This is necessary in order to provide the frequency coordinates for the result.axes: iterable of ints, default (-2,-1)axes to take fft over. (Negative values are supported & count from end.)rad: boolif 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 fft2(array, axes=axes, **kw_np_fftn), (freqx, freqy)),where freqx, freqy are the frequencies corresponding to the x and y axes,and all freqs & values are shifted with np.fft.fftshift to put the 0-frequency in the center.