base
base
¶
Base classes for all osipy components and signal models.
This module provides BaseComponent, the lightweight shared base for
ALL registered osipy components (models, fitters, correctors, detectors),
and BaseSignalModel, the abstract base for parametric forward models.
BaseComponent
¶
Bases: ABC
Shared interface for all registered osipy components.
Every registered class in osipy — signal models, fitters, leakage correctors, arrival detectors, calibration methods, AIF detectors, and AIF models — inherits from this base to guarantee a minimal introspection interface.
BaseSignalModel
¶
Bases: BaseComponent
Abstract base class for all parametric signal models.
All modality-specific model base classes (BasePerfusionModel, IVIMModel, BaseASLModel) inherit from this class to ensure a consistent interface for registry-driven dispatch and fitting.
parameter_units
abstractmethod
property
¶
Return mapping of parameter names to their units.
| RETURNS | DESCRIPTION |
|---|---|
dict[str, str]
|
Parameter units (e.g., {'Ktrans': '1/min', 've': 'mL/100mL'}). |
params_to_array
¶
Convert parameter dataclass or dict to array.
| PARAMETER | DESCRIPTION |
|---|---|
params
|
Parameter dataclass or dict.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
NDArray[floating]
|
Parameter values in standard order. |
array_to_params
¶
Convert array to parameter dictionary.
| PARAMETER | DESCRIPTION |
|---|---|
values
|
Parameter values in standard order.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict[str, float]
|
Parameter dictionary. |
bounds_to_arrays
¶
Convert bounds dict to lower/upper arrays.
| RETURNS | DESCRIPTION |
|---|---|
tuple[NDArray, NDArray]
|
(lower_bounds, upper_bounds) arrays. |