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. stop must be strictly greater than start.

  • 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

components

Component selection (None means "all").

name

Short human-readable name of the constraint family.

profile

Canonical profile identifier ("C" or "St").

region

Half-open (start, stop) region.

Attributes Documentation

components

Component selection (None means “all”).

Type:

list[int] or None

name

Short human-readable name of the constraint family.

Type:

str

profile

Canonical profile identifier ("C" or "St").

Type:

str

region

Half-open (start, stop) region.

Type:

tuple[int, int]

Examples using spectrochempy.analysis.constraints.ZeroRegion