prtools.fft_shape#

fft_shape(dx, du, z, wavelength, oversample)[source]#

Compute FFT pad shape to satisfy requested sampling condition

Parameters:
  • dx (float or tuple of floats) – Spatial sampling of pupil plane. If a single value is supplied, the pupil is assumed to be uniformly sampled in both row and column.

  • du (float or tuple of floats) – Spatial sampling of image plane. If a single value is supplied, the image is assumed to be uniformly sampled in both row and column.

  • z (float) – Propagation distance

  • wavelength (float) – Propagation wavelength

  • oversample (float) – Number of times to oversample the output plane

Returns:

  • shape (tuple of ints) – Required pad shape

  • wavelength (float) – True wavelength represented by padded shape