The optical response is based on an analytical result for a two band Quantum Well assuming a quasi-equilibrium Fermi distribution of the electron and holes within the band [3,4]. No ad-hoc fitting with Lorentzian line shapes is needed. As such, this approach gives uniformly accurate results both for low carrier densities like e.g. for saturable absorbers (see below on the left where the Fermi levels are deep below the band-gap), and for high carrier densities like e.g. saturable Amplifiers, (see below on the right where the two Fermi levels are high within the band).
Some functions in the toolbox allow to foresee the shape of the gain curve as a function of the material pare meters. In addition, a comparison between the exact gain and the “numerically stained” one is always given (see above in black and red) in order to keep the --unavoidable-- numerical problems related to aliasing and to the correct choice of the CFL  condition under control.