init_fresnel_as¶
- dnois.optics.df.init_fresnel_as(grid_size: int | tuple[int, int], wl: Real | Sequence[Real] | Tensor, distance: Real | Sequence[Real] | Tensor, dx: float | Tensor, dy: float | Tensor = None) dict[str, Tensor] ¶
Pre-compute the intermediate results for
fresnel_as()
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_as()
.dy (float or Tensor) – See
fresnel_as()
.
- Returns:
Intermediate results that can be passed to
fresnel_as()
asintermediate
argument.- Return type:
dict[str, Tensor]