get_recip_points#

diffsims.utils.fourier_transform.get_recip_points(ndim, n=None, dX=inf, rX=0, dY=inf, rY=1e-16)[source]#

Returns a minimal pair of real and Fourier grids which satisfy each given requirement.

Parameters:
ndimint

Dimension of domain

nint, list of length ndim, or None , optional

Sugested number of pixels (per dimension). default=`None` infers this from other parameters. If enough other constraints are given to define a discretisation then this will be shrunk if possible.

dXfloat > 0 or list of float of length ndim, optional

Maximum grid spacing (per dimension). default=`numpy.inf` infers this from other parameters

rXfloat > 0 or list of float of length ndim, optional

Minimum grid range (per dimension). default=`None` infers this from other parameters. In this case, range is maximal span, i.e. diameter.

dYfloat > 0 or list of float of length ndim

Maximum grid spacing (per dimension) in Fourier domain. default=`None` infers this from other parameters

rYfloat > 0 or list of float of length ndim

Minimum grid range (per dimension) in Fourier domain. default=`None` infers this from other parameters. In this case, range is maximal span, i.e. diameter.

Returns:
xlist [numpy.ndarray [float]], of shape [(nx,), (ny,), …]

Real mesh of points, centred at 0 with at least n pixels, resolution higher than dX, and range greater than rX.

ylist [numpy.ndarray [float]], of shape [(nx,), (ny,), …]

Fourier mesh of points, centred at 0 with at least n pixels, resolution higher than dY, and range greater than rY.