fouriax.ASMPropagator#

class ASMPropagator(distance_um=None, use_sampling_planner=True, nyquist_factor=2.0, min_padding_factor=2.0, precomputed_grid=None, warn_on_regime_mismatch=True, equality_tolerance=1e-06, refractive_index=1.0, precomputed_transfer_stack=None)#

Bases: OpticalLayer

Angular Spectrum Method (ASM) propagator.

Requires spatial-domain input. Internally transforms the field to k-space, applies the ASM transfer function via KSpacePropagator, and transforms back. Supports both scalar and Jones fields.

When use_sampling_planner is True the field is automatically resampled / padded for numerical stability.

All length quantities are in micrometers.

Parameters:
  • distance_um (float | None) – Propagation distance in micrometers.

  • use_sampling_planner (bool) – Whether to apply automatic Nyquist resampling.

  • nyquist_factor (float) – Oversampling relative to the Nyquist limit.

  • min_padding_factor (float) – Minimum padding multiplier.

  • precomputed_grid (Grid | None) – Optional pre-built propagation grid.

  • warn_on_regime_mismatch (bool) – Emit a warning when the distance falls outside the recommended ASM regime.

  • equality_tolerance (float) – Tolerance for the regime boundary.

  • refractive_index (float) – Refractive index of the propagation medium.

  • precomputed_transfer_stack (Array | None)

__init__(distance_um=None, use_sampling_planner=True, nyquist_factor=2.0, min_padding_factor=2.0, precomputed_grid=None, warn_on_regime_mismatch=True, equality_tolerance=1e-06, refractive_index=1.0, precomputed_transfer_stack=None)#
Parameters:
  • distance_um (float | None)

  • use_sampling_planner (bool)

  • nyquist_factor (float)

  • min_padding_factor (float)

  • precomputed_grid (Grid | None)

  • warn_on_regime_mismatch (bool)

  • equality_tolerance (float)

  • refractive_index (float)

  • precomputed_transfer_stack (Array | None)

Return type:

None

Methods

__init__([distance_um, ...])

forward(field)

Propagate a spatial-domain field with the Angular Spectrum Method.

parameters()

Return trainable parameters exposed by this layer.

transfer_function(field, wavelength_um, ...)

Build the ASM transfer function for one wavelength on field.grid.

validate_for(field)

Check that field is compatible with this layer.

Attributes

distance_um: float | None = None#
use_sampling_planner: bool = True#
nyquist_factor: float = 2.0#
min_padding_factor: float = 2.0#
precomputed_grid: Grid | None = None#
warn_on_regime_mismatch: bool = True#
equality_tolerance: float = 1e-06#
refractive_index: float = 1.0#
precomputed_transfer_stack: Array | None = None#
transfer_function(field, wavelength_um, distance_um)#

Build the ASM transfer function for one wavelength on field.grid.

Parameters:
  • field (Field) – Spatial-domain field whose sampling grid defines the frequency lattice.

  • wavelength_um (float) – Wavelength to propagate in micrometers.

  • distance_um (float) – Propagation distance in micrometers.

Returns:

Complex array with shape (ny, nx) in reciprocal-space sampling order.

Raises:

ValueError – If the distance or refractive index is invalid.

Return type:

Array

parameters()#

Return trainable parameters exposed by this layer.

Return type:

dict[str, Array]

forward(field)#

Propagate a spatial-domain field with the Angular Spectrum Method.

Parameters:

field (Field) – Spatial-domain input field with scalar or Jones data layout.

Returns:

Spatial-domain field sampled on the original input grid. Internal resampling and padding are restored away before the result is returned.

Raises:

ValueError – If the input domain is wrong or propagation parameters are invalid.

Return type:

Field