spectrochempy.analysis.constraints.Closure
- class Closure(profile, components=None, target=1.0)[source]
Closure (constant sum) constraint.
States that the selected components of a profile must sum to a target value across the constrained axis (typically the concentration rows summing to
1.0).- Parameters:
profile (str) –
"C"(concentrations) or"St"(spectra).components (list[int], optional) – Component indices included in the closure.
None(default) means “all components”.target (float, optional) – Target sum for the selected components. Default is
1.0.
Examples
>>> from spectrochempy import Closure >>> Closure("C") Closure(profile='C', components=None, target=1.0) >>> Closure("C", components=[0, 1], target=100.0) Closure(profile='C', components=[0, 1], target=100.0)
Attributes Summary
Components in the closure (
None= all).Short human-readable name of the constraint family.
Canonical profile identifier (
"C"or"St").Target sum for the selected components.
Attributes Documentation
Examples using spectrochempy.analysis.constraints.Closure