spectrochempy.analysis.constraints.Monotonic
- class Monotonic(profile, direction, components=None, tolerance=1.1)[source]
Monotonicity constraint.
States that each selected component must be monotonically increasing or decreasing along the constrained axis (typically the observation/time axis for concentrations).
- Parameters:
profile (str) –
"C"(concentrations) or"St"(spectra).direction (str) – Either
"increasing"or"decreasing".components (list[int], optional) – Component indices to which the constraint applies.
None(default) means “all components”.tolerance (float, optional) – Admissibility tolerance. Must be
>= 1.0.1.0makes the constraint strict; values above1.0allow small local violations (mirrors the historicalmonoIncTol/monoDecTolsemantics). Default is1.1.
Examples
>>> from spectrochempy import Monotonic >>> Monotonic("C", "increasing") Monotonic(profile='C', direction='increasing', components=None, tolerance=1.1) >>> Monotonic("C", "decreasing", components=[0], tolerance=1.0) Monotonic(profile='C', direction='decreasing', components=[0], tolerance=1.0)
Attributes Summary
Component selection (
Nonemeans "all").Monotonicity direction (
"increasing"or"decreasing").Short human-readable name of the constraint family.
Canonical profile identifier (
"C"or"St").Admissibility tolerance (
>= 1.0).Attributes Documentation
Examples using spectrochempy.analysis.constraints.Monotonic