pyInclude.laser
Laser spectra and pump-beam configuration used by the Python interface.
- class pyInclude.laser.LaserPropertySpec(name, dtype, shape, description, required=True)
Bases:
objectMetadata for one low-level laser property.
The names match the historical
calcPhiASEinput fields. User-facing code usually works throughCrossSectionDataorLaserProperties.- Parameters:
name (str)
dtype (object)
shape (tuple)
description (str)
required (bool)
- class pyInclude.laser.LaserProperty(laser, spec)
Bases:
objectHandle returned by
LaserProperties.get(...).It exposes the property’s physical description, expected dtype/shape, and a validated
valuesetter. The handle writes back to its parentLaserPropertiesobject.- meta()
Return serializable metadata for documentation or validation UIs.
- class pyInclude.laser.CrossSectionData(wavelengthsAbsorption, crossSectionAbsorption, wavelengthsEmission, crossSectionEmission, resolution=1)
Bases:
objectAbsorption and emission spectra for ASE and pump calculations.
Wavelength arrays store \(\lambda\); matching cross-section arrays store \(\sigma_a\) and \(\sigma_e\) in
cm^2. The wavelength unit is kept as supplied, with interpolation helpers handling the commonnmtable versusmquery mismatch.- Parameters:
wavelengthsAbsorption (object)
crossSectionAbsorption (object)
wavelengthsEmission (object)
crossSectionEmission (object)
resolution (int)
- wavelengthsAbsorption: object
Wavelength samples for the absorption spectrum.
- crossSectionAbsorption: object
Absorption cross sections \(\sigma_a\) in
cm^2.
- wavelengthsEmission: object
Wavelength samples for the emission spectrum.
- crossSectionEmission: object
Emission cross sections \(\sigma_e\) in
cm^2.
- resolution: int = 1
Spectral interpolation resolution passed to
calcPhiASE.
- classmethod monochromatic(*, wavelength, crossSectionAbsorption, crossSectionEmission)
Build a single-wavelength spectrum for monochromatic workflows.
- classmethod fromDirectory(path, resolution=1000)
Load
lambda_a,sigma_a,lambda_e, andsigma_etext files.
- toLaserProperties()
Wrap the same spectra in the lower-level
LaserPropertiesstore.
- absorptionAt(wavelength)
Interpolate \(\sigma_a\) at
wavelength.
- emissionAt(wavelength)
Interpolate \(\sigma_e\) at
wavelength.
- toDict()
Return the dictionary layout expected by the low-level bindings.
- pyInclude.laser.SpectralDecomposition
alias of
CrossSectionData
- class pyInclude.laser.LaserProperties(crossSections=None, values=<factory>)
Bases:
objectMutable low-level laser-property store.
Prefer
CrossSectionDatafor new simulations. This class remains useful when code needs the historicall_abs,s_abs,l_ems,s_ems, andl_reshandles or aliases used bycalcPhiASE.- Parameters:
crossSections (CrossSectionData | None)
values (dict)
- crossSections: CrossSectionData | None = None
Optional spectral data used to populate the property store.
- values: dict
Canonical low-level property values.
- classmethod spectral(**kwargs)
Create
LaserPropertiesfrom explicit spectral arrays.
- classmethod monochromatic(*, absorption, emission, wavelengthAbsorption=0.0, wavelengthEmission=0.0)
Create a single-sample absorption/emission data set.
- classmethod fromDirectory(path)
Load spectral text files and wrap them as
LaserProperties.
- withProperties(**properties)
Set multiple laser properties and return
selffor chaining.
- get(name)
Return a
LaserPropertyhandle by canonical name or alias.
- set(name, value)
Validate and store one laser property by canonical name or alias.
- listProperties()
Return metadata for all known laser properties.
- toDict()
Return the complete low-level laser dictionary after validation.
- property maxSigmaA
Maximum absorption cross section \(\max(\sigma_a)\).
- property maxSigmaE
Maximum emission cross section \(\max(\sigma_e)\).
- property emissionPeakIndex
Index of the largest emission cross-section sample.
- property absorptionAtEmissionPeak
Absorption cross section sampled at the emission peak index.
- validate(requiredOnly=False)
Check required fields and matching wavelength/cross-section lengths.
- class pyInclude.laser.PumpProperties(*, intensity, pumpSubsteps=100, wavelength=None, customProperties=None, **properties)
Bases:
objectPump-beam settings used to raise the excited-state fraction
beta.intensityis pump intensity \(I\) inW / cm^2.wavelengthis the pump wavelength \(\lambda\). Built-in Gaussian pumping also usesradiusX,radiusY, andexponentfromcustomProperties. A customsolvermay store its own knobs in the same dictionary.- Parameters:
intensity (float)
pumpSubsteps (int)
wavelength (float | None)
customProperties (dict)
- intensity: float
Pump intensity \(I\) in
W / cm^2.
- wavelength: float | None
Pump wavelength \(\lambda\); required for monochromatic data.
- pumpSubsteps: int
Number of time samples used by the built-in pump integrator.
- customProperties: dict
Extensible store for beam shape, reflection, spectra, and solver handles.
- classmethod superGaussian(*, intensity, wavelength, radiusX, pumpDuration=None, duration=None, pumpSubsteps=100, temporaryFluorescence=None, solver=None, crossSections=None, spectralProperties=None, gainMedium=None, crossSectionAbsorption=None, crossSectionEmission=None, absorption=None, emission=None, radiusY=None, exponent=40.0, backReflection=True, reflectivity=1.0, customProperties=None, **extraProperties)
Create settings for the built-in super-Gaussian pump profile.
The transverse profile is
intensity * exp(-r ** exponent)with radiiradiusXandradiusY.backReflectionandreflectivitycontrol the backward pump pass.
- withProperty(name, value)
Set one custom pump property and return
self.
- withProperties(**properties)
Set several custom pump properties and return
self.
- getProperty(name, default=None)
Read a custom pump property without raising
AttributeError.
- activeDuration(timeFrame)
Return the pump duration used for one integration frame.
- intensityAt(points)
Evaluate the super-Gaussian intensity profile at
(x, y)points.
- toDict(timeFrame=None)
Return the low-level pump dictionary consumed by
pumping.py.
- modeDict()
Return low-level flags for extraction and backward reflection.