init_fresnel_ft¶
- dnois.optics.df.init_fresnel_ft(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_ft()
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_ft()
.dy (float or Tensor) – See
fresnel_ft()
.kwargs –
Optional keyword arguments:
Parameter
Type
Description
delta_mode
str
See
fresnel_ft()
.ampl_phase_form
bool
True
if the pupil function passed tofresnel_ft()
is a pair of tensors representing its amplitude and phase, otherwise a single complex tensor. Seefresnel_ft()
.phase_factor
bool
See
fresnel_ft()
.scale_factor
bool
See
fresnel_ft()
.
- Returns:
Intermediate results that can be passed to
fresnel_ft()
asintermediate
argument.- Return type:
dict[str, Tensor]