fouriax.recommend_nyquist_grid#

recommend_nyquist_grid(grid, spectrum, nyquist_factor=2.0, min_padding_factor=2.0)#

Build a padded, Nyquist-safe propagation grid.

The returned grid has finer pixel spacing (if needed to satisfy the Nyquist criterion for the shortest wavelength) and is zero-padded to at least min_padding_factor times the original extent, rounded up to the next power of two for FFT efficiency.

Parameters:
  • grid (Grid) – Original spatial sampling grid.

  • spectrum (Spectrum) – Wavelength set used to determine Nyquist limits.

  • nyquist_factor (float) – Sampling density relative to the Nyquist limit. A value of 2.0 means two samples per shortest half-wavelength.

  • min_padding_factor (float) – Minimum spatial-extent multiplier for zero-padding (must be ≥ 1.0).

Returns:

A new Grid suitable for numerically stable propagation.

Return type:

Grid