pado.math.sc_dft_1d¶
- sc_dft_1d(g, M, delta_x, delta_fx)[source]¶
Compute 1D scaled DFT for optical field propagation.
The sum is
delta_x * sum(g[n] * exp(-2j*pi*x[n]*f[k])), withx[n]=(n-M//2)*delta_xandf[k]=(k-M//2)*delta_fx. The last axis is transformed; leading axes and complex precision are preserved.- Parameters:
g (torch.Tensor) – Input complex field […, M]
M (int) – Number of sample points
delta_x (float) – Spatial sampling interval (m)
delta_fx (float) – Frequency sampling interval (1/m)
- Returns:
Transformed complex field […, M]
- Return type:
Examples
>>> M = 1000 >>> pitch = 2e-6 >>> g = torch.exp(-x**2 / (2 * (100*um)**2)).to(torch.complex64) >>> G = sc_dft_1d(g, M, pitch, 1/(M*pitch))