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]#
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:
Methods
__call__(solution)Compute the difference between the reference solution and the input solution.
Wrap method automatically check reference and solution dimensions.
evaluate(solution)Compute the difference between the reference solution and the input solution.
Wrap method to automatically resample, normalize, and smooth solution.
slice_and_transform(solution)Slice the solution and applies the transform callable (if defined).
Wrap method to automatically slice solution.
Wrap method s.t.
- 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.