Skip to content

delay

delay

Arterial delay utilities for DCE-MRI.

Provides time-shifting of arterial input functions to model bolus arrival delays.

shift_aif

shift_aif(aif, time, delay, xp=None)

Shift AIF by a time delay using linear interpolation.

Implements aif_shifted[i] = aif(t[i] - delay), with zero for t - delay < 0. GPU/CPU agnostic via xp array module.

PARAMETER DESCRIPTION
aif

Arterial input function values, shape (n_time,).

TYPE: NDArray[floating]

time

Time points in seconds, shape (n_time,).

TYPE: NDArray[floating]

delay

Delay in seconds. Scalar returns shape (n_time,). Array of shape (n_voxels,) returns (n_time, n_voxels).

TYPE: float or NDArray[floating]

xp

Array module. Auto-detected if None.

TYPE: module DEFAULT: None

RETURNS DESCRIPTION
NDArray[floating]

Shifted AIF values.