Active Media API

Types

FluxOptics.OpticalComponents.GainSheetType
GainSheet(u::ScalarField, ds::NTuple, dz, Isat, f; trainable=false)
GainSheet(u::ScalarField, dz, Isat, f; trainable=false)

Create a saturable gain sheet component.

Models thin gain medium with spatially-varying gain coefficient and saturation. Gain follows: g(u) = g₀ / (1 + I/Isat) where I = |u|² is local intensity.

Arguments

  • u::ScalarField: Field template
  • ds::NTuple: Spatial sampling (defaults to u.ds)
  • dz::Real: Effective gain sheet thickness
  • Isat::Real: Saturation intensity
  • f::Function: Gain coefficient function (x, y) -> g₀
  • trainable::Bool: Optimize gain profile (default: false)

Physics

Transmission: u_out = u_in × exp(g(I) × dz)

where:

  • g(u) = g₀ / (1 + I/Isat): Gain coefficient with saturation
  • I = |u|²: Local intensity
  • High intensity → gain saturation (g → 0)
  • Low intensity → linear gain (g ≈ g₀)

Examples

u = ScalarField(ones(ComplexF64, 256, 256), (2.0, 2.0), 1.064)

# Uniform gain
gain = GainSheet(u, (2.0, 2.0), 0.1, 1e6, (x, y) -> 2.0)

# Spatially-varying gain (e.g., pumped region)
gain_region = GainSheet(u, 0.1, 1e6, (x, y) -> begin
    r = sqrt(x^2 + y^2)
    r < 50.0 ? 2.0 : 0.0
end)

# Trainable gain profile
gain_opt = GainSheet(u, 0.1, 1e6, (x, y) -> 1.0; trainable=true)

See also: Phase, Mask

source

See Also