SpectralDecomposition
SpectralDecomposition stores absorption and emission spectra,
\(\sigma_a(\lambda)\) and \(\sigma_e(\lambda)\). It is an alias for
CrossSectionData.
from HASEonGPU import SpectralDecomposition
spectra = SpectralDecomposition(
wavelengthsAbsorption=[900.0, 910.0],
crossSectionAbsorption=[1.1e-21, 1.2e-21],
wavelengthsEmission=[1020.0, 1030.0],
crossSectionEmission=[2.0e-20, 2.48e-20],
resolution=2,
)
The wavelength arrays \(\lambda\) and matching cross-section arrays must
have the same length. resolution is the spectral interpolation resolution
passed to the ASE calculation.
Constructors
SpectralDecomposition(...)Builds spectral data from explicit arrays.
SpectralDecomposition.monochromatic(...)Creates a single-wavelength \(\lambda\) data set:
spectra = SpectralDecomposition.monochromatic(
wavelength=940e-9,
crossSectionAbsorption=1.2e-21,
crossSectionEmission=2.0e-20,
)
SpectralDecomposition.fromDirectory(path, resolution=1000)Loads four text files from a directory:
lambda_a.txtsigma_a.txtlambda_e.txtsigma_e.txt
Interpolation Utilities
sigma_abs = spectra.absorptionAt(940e-9)
sigma_ems = spectra.emissionAt(1030.0)
The interpolation helpers accept wavelengths \(\lambda\) in the same unit
as the stored data. They also handle the common case where stored spectra are
in nm and a pump wavelength is supplied in m.
Conversion Utilities
toDict() returns the low-level laser property dictionary:
data = spectra.toDict()
data["l_abs"]
data["s_abs"]
data["l_ems"]
data["s_ems"]
data["l_res"]
toLaserProperties() wraps the same data in LaserProperties:
laser = spectra.toLaserProperties()
laser.maxSigmaA
laser.maxSigmaE
LaserProperties remains available for lower-level workflows, but new
simulation code usually passes SpectralDecomposition directly to
PumpProperties, PhiASE, or Simulation.