AngularSpectrumMethod.jl

Author syoshida1983
Popularity
2 Stars
Updated Last
5 Months Ago
Started In
May 2023

AngularSpectrumMethod

Stable Dev Build Status

This package provides the functions for diffraction calculations based on the angular spectrum method (ASM). In addition to the standard diffraction calculation with ASM, various diffraction calculations with band-limited, scalable, scaled, shifted, and tilted ASM are available. In-place versions of each function are also provided. When using the in-place version functions, append an ! to the end of each function name.

Installation

To install this package, open the Julia REPL and run

julia> ]add AngularSpectrumMethod

or

julia> using Pkg
julia> Pkg.add("AngularSpectrumMethod")

Usage

Import the package first.

julia> using AngularSpectrumMethod

ASM

The function ASM returns the diffracted field by the angular spectrum method (ASM). Evanescent waves are not eliminated but attenuated as $\exp(-2{\pi}wz)$. Without attenuation, the total energy $\iint|u|\mathrm{d}x\mathrm{d}y$ is conserved.

julia> v = ASM(u, λ, Δx, Δy, z; expand=true)

Arguments

  • u: input field.
  • λ: wavelength.
  • Δx: sampling interval in the x-axis.
  • Δy: sampling interval in the y-axis.
  • z: diffraction distance.
  • expand=true: if true (default), perform 4× expansion and zero padding for aliasing suppression.

Note

The x-axis is the horizontal direction, and the y-axis is the vertical.

  
    input field             diffracted field by ASM

Band-limited ASM

The function BandLimitedASM returns a diffracted field by the band-limited ASM (see Ref. 1).

julia> v = BandLimitedASM(u, λ, Δx, Δy, z; expand=true)
  1. Kyoji Matsushima and Tomoyoshi Shimobaba, "Band-Limited Angular Spectrum Method for Numerical Simulation of Free-Space Propagation in Far and Near Fields," Opt. Express 17, 19662-19673 (2009)

  
ASM with a long propagation distance       Band-limited ASM      

Scalable ASM

The function ScalableASM returns automatically scaled diffraction field by the scalable ASM (see Ref. 2). The sampling pitch in the destination plane $\Delta_{d}$ is $\Delta_{d}=\dfrac{\lambda z}{pN\Delta_{s}}$, where $\Delta_{s}$ is the sampling pitch in the source plane, $N$ is the number of pixels in the source or destination plane, and $p=2$ is the padding factor.

julia> v = ScalableASM(u, λ, Δx, Δy, z; expand=true)
  1. Rainer Heintzmann, Lars Loetgering, and Felix Wechsler, "Scalable angular spectrum propagation," Optica 10, 1407-1416 (2023)

  
      input field          diffracted field by Scalable ASM

Scaled ASM

The function ScaledASM returns a scaled diffraction field according to the scale factor $R$ by the scaled ASM (see Ref. 3).

julia> v = ScaledASM(u, λ, Δx, Δy, z, R; expand=true)
  1. Tomoyoshi Shimobaba, Kyoji Matsushima, Takashi Kakue, Nobuyuki Masuda, and Tomoyoshi Ito, "Scaled angular spectrum method," Opt. Lett. 37, 4128-4130 (2012)

  
Scaled ASM with R = 2.0            R = 0.5    

Shifted ASM

The function ShiftedASM returns a shifted diffraction field with the shift distance $x_{0}$ and $y_{0}$ by the shifted ASM (see Ref. 4).

julia> v = ShiftedASM(u, λ, Δx, Δy, z, x₀, y₀; expand=true)
  1. Kyoji Matsushima, "Shifted angular spectrum method for off-axis numerical propagation," Opt. Express 18, 18453-18463 (2010)

  
       ASM            Shifted ASM with x direction shift

Tilted ASM

The function TiltedASM returns a tilted diffraction field for a rotation matrix $T$ by the tilted ASM (see Ref. 5, 6). If weight=true, a diagonal weighting matrix is used as the Jacobian determinant (default false). In this case, the energy conservation improves, but the computational cost is high (see Ref. 7).

julia> v = TiltedASM(u, λ, Δx, Δy, T; expand=true, weight=false)
  1. Kyoji Matsushima, Hagen Schimmel, and Frank Wyrowski, "Fast calculation method for optical diffraction on tilted planes by use of the angular spectrum of plane waves," J. Opt. Soc. Am. A 20, 1755-1762 (2003)
  2. Kyoji Matsushima, "Formulation of the rotational transformation of wave fields and their application to digital holography," Appl. Opt. 47, D110-D116 (2008)
  3. James G. Pipe and Padmanabhan Menon, "Sampling density compensation in MRI: Rationale and an iterative numerical solution," Magn. Reson. Med. 41, 179-186 (1999)

Note

Rotations.jl is helpful in generating rotation matrices.

  
        input field        Tilted ASM with rotation around the x-axis

Used By Packages

No packages found.