pado.math.compute_scasm_transfer_function

compute_scasm_transfer_function(Mx, My, delta_fx, delta_fy, λ, z, *, device=None, dtype=torch.float32)[source]

Compute transfer function for Scaled Angular Spectrum Method propagation.

Positive distance uses outgoing evanescent decay. Negative distance is the stable adjoint: propagating phase is conjugated and evanescent modes still decay with abs(z). Exact grazing bins use a finite zero subgradient for the singular square root, matching the full angular-spectrum propagator.

Parameters:
  • Mx (int) – Number of sampling points in x,y directions

  • My (int) – Number of sampling points in x,y directions

  • delta_fx (float) – Frequency sampling intervals (1/m)

  • delta_fy (float) – Frequency sampling intervals (1/m)

  • λ (float) – Wavelength (m)

  • z (float) – Propagation distance (m)

  • device (torch.device, optional) – Device for direct transfer-function construction

  • dtype (torch.dtype) – Output real or complex precision; phase geometry is evaluated in float64 before casting to this precision.

Returns:

Transfer function H(fx,fy) [My, Mx]

Return type:

torch.Tensor

Examples

>>> H = compute_scasm_transfer_function(1024, 1024, 1/(1024*2e-6), 1/(1024*2e-6), 633e-9, 0.1)
>>> U_prop = torch.fft.fft2(light.get_field()) * H