spectrochempy.analysis.constraints.ZeroRegion
- class ZeroRegion(profile, region, components=None)[source]
Zero-region constraint.
States that the selected components must be exactly zero on a given contiguous region of the constrained axis (e.g. a component known to be absent before a given observation index or outside a given spectral window).
- Parameters:
profile (str) –
"C"(concentrations) or"St"(spectra).region (tuple[int, int]) –
(start, stop)of the half-open region over which the selected components must be zero.stopmust be strictly greater thanstart.components (list[int], optional) – Component indices to which the constraint applies.
None(default) means “all components”.
Examples
>>> from spectrochempy import ZeroRegion >>> ZeroRegion("C", region=(0, 5)) ZeroRegion(profile='C', region=(0, 5), components=None) >>> ZeroRegion("St", region=(40, 60), components=[1]) ZeroRegion(profile='St', region=(40, 60), components=[1])
Attributes Summary
Component selection (
Nonemeans "all").Short human-readable name of the constraint family.
Canonical profile identifier (
"C"or"St").Half-open
(start, stop)region.Attributes Documentation
Examples using spectrochempy.analysis.constraints.ZeroRegion