spectrochempy.analysis.constraints.FixedValues
- class FixedValues(profile, values, components=None)[source]
Fixed-values constraint.
States that selected components of a profile must take pre-specified fixed values (e.g. a measured spectrum known to be noise-free, or a known concentration profile on a subset of observations).
- Parameters:
profile (str) –
"C"(concentrations) or"St"(spectra).values (array-like) – The fixed values to impose. The shape must be compatible with the constrained profile subset at enforcement time (validated lazily; the skeleton API does not know the number of components or the data shape).
components (list[int], optional) – Component indices to which the fixed values apply.
None(default) means “all components”.
Examples
>>> from spectrochempy import FixedValues >>> FixedValues("St", values=[[0.1, 0.2], [0.3, 0.4]]) FixedValues(profile='St', values=[[0.1, 0.2], [0.3, 0.4]], components=None)
Attributes Summary
Component selection (
Nonemeans "all").Short human-readable name of the constraint family.
Canonical profile identifier (
"C"or"St").The fixed values to impose.
Attributes Documentation
- values
The fixed values to impose.
- Type:
array-like
Examples using spectrochempy.analysis.constraints.FixedValues