PlasmaCalcs.tools.fft_tools.array_fft.ifftN

PlasmaCalcs.tools.fft_tools.array_fft.ifftN(array, df=None, axes=None, *, rad=False, x0=0, ds=None, **kw_np_ifftn)
calculates inverse fft along N dimensions, as well as the corresponding positions.
Caution: ifftN(fftN(arr)) == arr only approximately, due to floating point rounding errors.
Can at least ensure coordinate alignment by providing ds during ifftN(fftN(arr), ds=…)
array: array-like
take the inverse fft of this array (along the indicated axes).
the 0-frequency component should be centered in each axis,
as per the output of np.fft.fftshift(np.fft.fft(position_space_array)).
df: None, number, or list-like with length == len(axes)
specifies the spacing between elements of array (in frequency-space), along each axis.
None –> use ds instead. (Must provide ds or df.)
axes: None, or iterable of ints
axes to take inverse fft over. (Negative values are supported & count from end.)
None –> take inverse fft over all axes.
rad: bool
if True, interpret frequency-spacing (df) like it is “in radians”,
dividing it by 2 * pi before converting to position-space.
x0: None, number, or list-like with length == len(axes)
if provided, alter position-space coordinates by adding a constant offset,
such that the 0’th position for axes[i] equals x0[i].
ds: None, number, or list-like with length == len(axes)
specifies the spacing between elements of result (in position-space), along each axis.
None –> use df instead. (Must provide ds or df.)
additional kwargs passed to np.fft.ifftn.
returns (shifted ifftn(array, axes=axes, **kw_np_ifftn), (pos0, pos1, …, posN)),
where pos0, pos1, …, posN are the positions corresponding to the N axes,
and all positions & values are shifted with np.fft.ifftshift to put the 0-position in the center.