Skip to content

signal_model

signal_model

DSC perfusion forward model and binding adapter.

Implements C(t) = CBF * AIF(t) * R(t) (convolution) as a BaseSignalModel with pre-computed SVD via BoundDSCModel.

DSCConvolutionModel

Bases: BaseSignalModel

DSC perfusion forward model: C(t) = CBF * AIF(t) * R(t).

Parameters are CBF (mL/100g/min), MTT (s), and Ta (s).

References

.. [1] OSIPI CAPLEX, https://osipi.github.io/OSIPI_CAPLEX/ .. [2] Ostergaard L et al. MRM 1996;36(5):715-725.

name property

name

Return human-readable component name.

parameters property

parameters

Return list of parameter names: CBF, MTT, Ta.

parameter_units property

parameter_units

Return mapping of parameter names to OSIPI-compliant units.

reference property

reference

Return primary literature citation.

get_bounds

get_bounds()

Return default parameter bounds as {name: (lower, upper)}.

BoundDSCModel

BoundDSCModel(
    model, aif, time, matrix_type="circulant", fixed=None
)

Bases: BaseBoundModel

DSC model with AIF and time bound, SVD pre-computed.

Pre-computes the SVD of the AIF convolution matrix once. The fitter uses the pre-computed SVD components to recover R(t) via regularized inversion.

PARAMETER DESCRIPTION
model

The signal model.

TYPE: DSCConvolutionModel

aif

Arterial input function (delta-R2*), shape (n_timepoints,).

TYPE: NDArray

time

Time points in seconds, shape (n_timepoints,).

TYPE: NDArray

matrix_type

'circulant' (default, delay-insensitive) or 'toeplitz' (causal).

TYPE: str DEFAULT: 'circulant'

fixed

Parameters to fix.

TYPE: dict[str, float] | None DEFAULT: None

ensure_device

ensure_device(xp)

Transfer arrays to the target device.

predict_array_batch

predict_array_batch(free_params_batch, xp)

Forward model: reconstruct C(t) from CBF, MTT, Ta.

PARAMETER DESCRIPTION
free_params_batch

Free parameter values, shape (n_free, n_voxels).

TYPE: NDArray

xp

Array module.

TYPE: module

RETURNS DESCRIPTION
NDArray

Predicted concentration, shape (n_timepoints, n_voxels).

get_initial_guess_batch

get_initial_guess_batch(observed_batch, xp)

Compute initial guesses from signal shape.

PARAMETER DESCRIPTION
observed_batch

Observed data, shape (n_timepoints, n_voxels).

TYPE: NDArray

xp

Array module.

TYPE: module

RETURNS DESCRIPTION
NDArray

Initial guesses, shape (n_free, n_voxels).