pyInclude.laser

Laser spectra and pump-beam configuration used by the Python interface.

class pyInclude.laser.LaserPropertySpec(name, dtype, shape, description, required=True)

Bases: object

Metadata for one low-level laser property.

The names match the historical calcPhiASE input fields. User-facing code usually works through CrossSectionData or LaserProperties.

Parameters:
  • name (str)

  • dtype (object)

  • shape (tuple)

  • description (str)

  • required (bool)

class pyInclude.laser.LaserProperty(laser, spec)

Bases: object

Handle returned by LaserProperties.get(...).

It exposes the property’s physical description, expected dtype/shape, and a validated value setter. The handle writes back to its parent LaserProperties object.

meta()

Return serializable metadata for documentation or validation UIs.

class pyInclude.laser.CrossSectionData(wavelengthsAbsorption, crossSectionAbsorption, wavelengthsEmission, crossSectionEmission, resolution=1)

Bases: object

Absorption 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 common nm table versus m query 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, and sigma_e text files.

toLaserProperties()

Wrap the same spectra in the lower-level LaserProperties store.

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: object

Mutable low-level laser-property store.

Prefer CrossSectionData for new simulations. This class remains useful when code needs the historical l_abs, s_abs, l_ems, s_ems, and l_res handles or aliases used by calcPhiASE.

Parameters:
crossSections: CrossSectionData | None = None

Optional spectral data used to populate the property store.

values: dict

Canonical low-level property values.

classmethod spectral(**kwargs)

Create LaserProperties from 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 self for chaining.

get(name)

Return a LaserProperty handle 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: object

Pump-beam settings used to raise the excited-state fraction beta.

intensity is pump intensity \(I\) in W / cm^2. wavelength is the pump wavelength \(\lambda\). Built-in Gaussian pumping also uses radiusX, radiusY, and exponent from customProperties. A custom solver may 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 radii radiusX and radiusY. backReflection and reflectivity control 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.