init_fresnel_conv

dnois.optics.df.init_fresnel_conv(grid_size: int | tuple[int, int], wl: Real | Sequence[Real] | Tensor, distance: Real | Sequence[Real] | Tensor, dx: float | Tensor, dy: float | Tensor = None, **kwargs) dict[str, Tensor]

Pre-compute the intermediate results for fresnel_conv() and return them to avoid repeated computation.

Parameters:
  • grid_size (int or tuple[int, int]) – Size of spatial dimensions \((H, W)\).

  • wl (float, Sequence[float] or Tensor) – Wavelengths \(\lambda\). A scalar or a tensor of shape \((N_\lambda,)\).

  • distance (float, Sequence[float] or Tensor) – distance: Propagation distance \(d\). A scalar or a tensor of shape \((N_d,)\).

  • dx (float or Tensor) – See fresnel_conv().

  • dy (float or Tensor) – See fresnel_conv().

  • kwargs – Additional keyword arguments, allowing all the additional keyword arguments of fresnel_conv() other than simpson and intermediate.

Returns:

Intermediate results that can be passed to fresnel_conv() as intermediate argument.

Return type:

dict[str, Tensor]