spectrochempy.analysis.constraints.Selectivity

class Selectivity(profile, region, component)[source]

Selectivity constraint.

States that each selected component is the only one present on a given region of the constrained axis. This encodes the unimodality-of-presence assumption used in many hard-modeling workflows (e.g. one species dominates a portion of the elution window).

Parameters:
  • profile (str) – "C" (concentrations) or "St" (spectra).

  • region (tuple[int, int]) – (start, stop) of the half-open region on which the constraint applies. stop must be strictly greater than start.

  • component (int) – Index of the single component that must be the sole component on the region.

Examples

>>> from spectrochempy import Selectivity
>>> Selectivity("C", region=(0, 5), component=0)
Selectivity(profile='C', region=(0, 5), component=0)

Attributes Summary

component

Index of the sole component present on the region.

name

Short human-readable name of the constraint family.

profile

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

region

Half-open (start, stop) region.

Attributes Documentation

component

Index of the sole component present on the region.

Type:

int

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.Selectivity