plan_ifft#

diffsims.utils.fourier_transform.plan_ifft(A, n=None, axis=None, norm=None, **_)[source]#

Plans an ifft for repeated use. Parameters are the same as for pyfftw’s ifftn which are, where possible, the same as the numpy equivalents. Note that some functionality is only possible when using the pyfftw backend.

Parameters:
  • A (numpy.ndarray, of dimension d) – Array of same shape to be input for the ifft

  • n (iterable or None, len(n) == d, optional) – The output shape of ifft (default=`None` is same as A.shape)

  • axis (int, iterable length d, or None, optional) – The axis (or axes) to transform (default=`None` is all axes)

  • overwrite (bool, optional) – Whether the input array can be overwritten during computation (default=False)

  • planner ({0, 1, 2, 3}, optional) – Amount of effort put into optimising Fourier transform where 0 is low and 3 is high (default=`1`).

  • threads (int, None) – Number of threads to use (default=`None` is all threads)

  • auto_align_input (bool, optional) – If True then may re-align input (default=`True`)

  • auto_contiguous (bool, optional) – If True then may re-order input (default=`True`)

  • avoid_copy (bool, optional) – If True then may over-write initial input (default=`False`)

  • norm ({None, 'ortho'}, optional) – Indicate whether ifft is normalised (default=`None`)

Returns:

  • plan (function) – Returns the inverse Fourier transform of B, plan() == ifftn(B)

  • B (numpy.ndarray, A.shape) – Array which should be modified inplace for ifft to be computed. If possible, B is A.