spectrochempy.analysis.constraints.FixedValues

class FixedValues(profile, values, components=None, blocks=None)[source]

Fixed-values constraint.

States that selected components of a profile must take pre-specified fixed values (e.g. a measured spectrum known to be noise-free, or a known concentration profile on a subset of observations).

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

  • values (array-like) – The fixed values to impose. The shape must be compatible with the constrained profile subset at enforcement time (validated lazily; the skeleton API does not know the number of components or the data shape).

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

Examples

>>> from spectrochempy import FixedValues
>>> FixedValues("St", values=[[0.1, 0.2], [0.3, 0.4]])
FixedValues(profile='St', values=[[0.1, 0.2], [0.3, 0.4]], components=None)

Attributes Summary

blocks

Block indices for augmented data (None means all blocks).

components

Component selection (None means "all").

name

Short human-readable name of the constraint family.

profile

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

values

The fixed values to impose.

Attributes Documentation

blocks

Block indices for augmented data (None means all blocks).

Type:

list[int] or None

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

values

The fixed values to impose.

Type:

array-like

Examples using spectrochempy.analysis.constraints.FixedValues