spectrochempy.analysis.constraints.Unimodal

class Unimodal(profile, components=None, mod='strict')[source]

Unimodality constraint.

States that each selected component has a single maximum along the constrained axis. Useful for chromatographic / kinetic profiles where one peak is expected per chemical species.

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

  • components (list[int], optional) – Component indices to which the constraint applies. None (default) means “all components”.

  • mod (str, optional) – Unimodal modality: "strict" (single maximum, default) or "smooth" (allow a flat-topped region).

Examples

>>> from spectrochempy import Unimodal
>>> Unimodal("C")
Unimodal(profile='C', components=None, mod='strict')
>>> Unimodal("St", components=[0], mod="smooth")
Unimodal(profile='St', components=[0], mod='smooth')

Attributes Summary

components

Component selection (None means "all").

mod

Unimodal modality ("strict" or "smooth").

name

Short human-readable name of the constraint family.

profile

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

Attributes Documentation

components

Component selection (None means “all”).

Type:

list[int] or None

mod

Unimodal modality ("strict" or "smooth").

Type:

str

name

Short human-readable name of the constraint family.

Type:

str

profile

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

Type:

str

Examples using spectrochempy.analysis.constraints.Unimodal