plan_fft#
- diffsims.utils.fourier_transform.plan_fft(A, n=None, axis=None, norm=None, **_)[source]#
Plans an fft for repeated use. Parameters are the same as for pyfftw’s fftn which are, where possible, the same as the numpy equivalents. Note that some functionality is only possible when using the pyfftw backend.
- Parameters:
- Anumpy.ndarray,
ofdimensiond Array of same shape to be input for the fft
- niterable or None, len(n) == d,
optional The output shape of fft (default=`None` is same as A.shape)
- axisint, iterable
lengthd,orNone,optional The axis (or axes) to transform (default=`None` is all axes)
- overwritebool,
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`).
- threadsint, None
Number of threads to use (default=`None` is all threads)
- auto_align_inputbool,
optional If True then may re-align input (default=`True`)
- auto_contiguousbool,
optional If True then may re-order input (default=`True`)
- avoid_copybool,
optional If True then may over-write initial input (default=`False`)
- norm{
None, ‘ortho’},optional Indicate whether fft is normalised (default=`None`)
- Anumpy.ndarray,
- Returns:
- plan
function Returns the Fourier transform of B, plan() == fftn(B)
- Bnumpy.ndarray, A.shape
Array which should be modified inplace for fft to be computed. If possible, B is A.
- plan