CADETProcess.comparison.Shape

CADETProcess.comparison.Shape#

class CADETProcess.comparison.Shape(reference: ReferenceBase, components: dict[str, list] | None = None, use_total_concentration: bool = False, use_total_concentration_components: bool = True, start: float | None = None, end: float | None = None, transform: Callable | None = None, only_transforms_array: bool = True, resample: bool = True, smooth: bool = False, normalize: bool = False)[source]#

Bases: DifferenceBase

Shape similarity difference metric.

The similarity is calculated using the Pearson correlation between the reference and solution profiles, as well as the time offset between their peak positions, and the peak height of the solution profile. Additionally, if use_derivative is set to True, the similarity is also calculated using the Pearson correlation of the derivative profiles, and the minimum and maximum peak heights of the derivative profile.

Attributes:
n_metricsint

int: Number of metrics.

labelslist of str

list[str]: List of difference metric names.

Raises:
CADETProcessError

If components is not None and has more than one element.

Notes

Currently, this class only works for single-component systems with one peak.

property labels: list#

list[str]: List of difference metric names.

property n_metrics: int#

int: Number of metrics.