Active Media API
Types
FluxOptics.OpticalComponents.GainSheet — TypeGainSheet(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 templateds::NTuple: Spatial sampling (defaults tou.ds)dz::Real: Effective gain sheet thicknessIsat::Real: Saturation intensityf::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 saturationI = |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
- Modulators for passive modulation
- Core for trainability system