Beam groups

For convenience, the BeamletOptics.AbstractBeamGroup offers a container-like interface for groups of Beams as commonly used in other software packages. The following concrete implementations are currently provided:

julia> BeamletOptics.list_subtypes(BeamletOptics.AbstractBeamGroup);└── BeamletOptics.AbstractBeamGroup
    ├── AstigmaticBeamGroup{T, R} where {T<:Real, R<:BeamletOptics.AbstractRay{T}}
    ├── CollimatedSource{T, R} where {T<:Real, R<:BeamletOptics.AbstractRay{T}}
    └── PointSource{T, R} where {T<:Real, R<:BeamletOptics.AbstractRay{T}}

At least 3 types have been found.

Refer to the following sections for convenience constructors to generate the sources listed above.

Collimated beam source

The collimated beam source is ideal to model light coming from a focal plane at infinity. This is useful for simulating plane wavefronts. You can define a collimated monochromatic Beam source as follows:

BeamletOptics.CollimatedSourceMethod
CollimatedSource(pos, dir, diameter, λ; num_rings, num_rays)

Spawns a bundle of collimated Beams at the specified position and direction. The source is modelled as a ring of concentric beam rings around the center beam. The amount of beam rings between the center ray and outer diameter can be specified via num_rings.

Info

Note that for correct sampling, the number of rays should be atleast 20x the number of rings.

Arguments

The following inputs and arguments can be used to configure the CollimatedSource:

Inputs

  • pos: center beam starting position
  • dir: center beam starting direction
  • diameter: outer beam bundle diameter in [m]
  • λ = 1e-6: wavelength in [m], default val. is 1000 nm

Keyword Arguments

  • num_rings: number of concentric beam rings, default is 10
  • num_rays: total number of rays in the source, default is 100x num_rings
Warning

The orthogonal basis vectors for the beam generation are generated randomly.

source

Collimated group of beams

A special constructor called UniformDiscSource is available, which offers an equal-area sampling (Fibonnaci-pattern) sampling and is thus favorable in situations where the weighting of the individual beams becomes important, e.g. for calculating a point spread function using the intensity function.

BeamletOptics.UniformDiscSourceFunction
UniformDiscSource(pos, dir, diameter, λ; num_rays=1_000)

Generates a ray fan with equal area per ray across a circular pupil using the deterministic sunflower (Fibonacci) pattern.

Note

This is merely a CollimatedSource constructor which uses Fibonacci sampling instead of a linear grid.

Arguments

The following inputs and arguments can be used to configure the underlying CollimatedSource:

Inputs

  • pos: center beam starting position
  • dir: center beam starting direction
  • diameter: outer beam bundle diameter in [m]
  • λ = 1e-6: wavelength in [m]

Keyword Arguments

  • num_rays=1000: total number of rays in the source
source

Collimated uniform group of beams

Point beam source

The PointSource type is used to model emission from a spatially localized source that radiates Beams in a range of directions. This is commonly used to simulate conical emission patterns, such as light emerging from a fiber tip or a light source for a lens objective with a known focal distance. You can specify the origin and a propagation direction, which are then used to construct the monochromatic PointSource.

BeamletOptics.PointSourceMethod
PointSource(pos, dir, θ, λ; num_rings, num_rays)

Spawns a point source of Beams at the specified position and direction. The point source is modelled as a collection of concentric beam fans centered around the center beam. The amount of beam rings between the center ray and half-spread-angle θ can be specified via num_rings.

Info

Note that for correct sampling, the number of rays should be atleast 20x the number of rings.

Arguments

The following inputs and arguments can be used to configure the PointSource:

Inputs

  • pos: center beam starting position
  • dir: center beam starting direction
  • θ: half spread angle in rad
  • λ = 1e-6: wavelength in [m], default val. is 1000 nm

Keyword Arguments

  • num_rings: number of concentric beam rings, default is 10
  • num_rays: total number of rays in the source, default is 100x num_rings
Warning

The orthogonal basis vectors for the beam generation are generated randomly.

source

Below you can find an exemplary illustration of a PointSource.

Point source of beams

Astigmatic Beam Groups

For complex sources, the package provides the AstigmaticBeamGroup container. Several constructors are available for different scenarios: