Skip to content

odak.wave.band_extended_angular_spectrum

A definition to calculate bandextended angular spectrum based beam propagation. For more Zhang, Wenhui, Hao Zhang, and Guofan Jin. "Band-extended angular spectrum method for accurate diffraction calculation in a wide propagation range." Optics Letters 45.6 (2020): 1543-1546.

Parameters:

Name Type Description Default
field np.complex

Complex field (MxN).

required
k odak.wave.wavenumber

Wave number of a wave, see odak.wave.wavenumber for more.

required
distance float

Propagation distance.

required
dx float

Size of one single pixel in the field grid (in meters).

required
wavelength float

Wavelength of the electric field.

required

Returns:

Type Description
np.complex

Final complex field (MxN).

Source code in odak/wave/classical.py
def band_extended_angular_spectrum(field, k, distance, dx, wavelength):
    """
    A definition to calculate bandextended angular spectrum based beam propagation. For more Zhang, Wenhui, Hao Zhang, and Guofan Jin. "Band-extended angular spectrum method for accurate diffraction calculation in a wide propagation range." Optics Letters 45.6 (2020): 1543-1546.

    Parameters
    ----------
    field            : np.complex
                       Complex field (MxN).
    k                : odak.wave.wavenumber
                       Wave number of a wave, see odak.wave.wavenumber for more.
    distance         : float
                       Propagation distance.
    dx               : float
                       Size of one single pixel in the field grid (in meters).
    wavelength       : float
                       Wavelength of the electric field.

    Returns
    -------
    result           : np.complex
                       Final complex field (MxN).
    """
    iflag = -1
    eps = 10**(-12)
    nv, nu = field.shape
    l = nu*dx
    x = np.linspace(-l/2, l/2, nu)
    y = np.linspace(-l/2, l/2, nv)
    X, Y = np.meshgrid(x, y)
    Z = X**2+Y**2
    fx = np.linspace(-1./2./dx, 1./2./dx, nu)
    fy = np.linspace(-1./2./dx, 1./2./dx, nv)
    FX, FY = np.meshgrid(fx, fy)
    K = nu/2/np.amax(fx)
    fcn = 1./2*(nu/wavelength/np.abs(distance))**0.5
    ss = np.abs(fcn)/np.amax(np.abs(fx))
    zc = nu*dx**2/wavelength
    if np.abs(distance) < zc:
        fxn = fx
        fyn = fy
    else:
        fxn = fx*ss
        fyn = fy*ss
    FXN, FYN = np.meshgrid(fxn, fyn)
    Hn = np.exp(1j*k*distance*(1-(FXN*wavelength)**2-(FYN*wavelength)**2)**0.5)
    X = X/np.amax(X)*np.pi
    Y = Y/np.amax(Y)*np.pi
    t_asmNUFT = nufft2(field, X*ss, Y*ss, sign=iflag, eps=eps)
    result = nuifft2(Hn*t_asmNUFT, X*ss, Y*ss, sign=-iflag, eps=eps)
    return result

See also