delta_convert

dnois.optics.df.delta_convert(delta: float | Tensor | Sequence[float | Tensor], n: int | Sequence[int], wl: Real | Sequence[Real] | Tensor, distance: Real | Sequence[Real] | Tensor) float | Tensor | list[float | Tensor]

Convert grid spacing between source plane (\(\delta_\text{s}\)) and target plane (\(\delta_\text{t}\)) in Fourier-transform-based Fresnel diffraction integral, using the following formula:

\[\delta_\text{s}\delta_\text{t}=\lambda d/N\]
Parameters:
  • delta – Grid spacing on source plane or target plane. A scalar or a tensor of shape \((\cdots,N_d,N_\lambda)\), or a sequence of them.

  • n – Number of samples \(N\). An integer or a sequence of integers with same length as delta.

  • wl – Wavelengths \(\lambda\). A scalar or a tensor of shape \((N_\lambda,)\).

  • distance – Propagation distance \(d\). A scalar or a tensor of shape \((N_d,)\).

Returns:

Converted grid spacing. A scalar tensor if delta, wl and distance are all scalars, otherwise a tensor of shape \((\cdots,N_d,N_\lambda)\). If delta and n are sequences, a list with same length will be returned.