dcmri.ca_injection#
- dcmri.ca_injection(t: ndarray, weight: float, conc: float, dose: float, rate: float, t0: float) ndarray [source]#
Contrast agent flux (mmol/sec) generated by step injection.
- Parameters:
t (numpy.ndarray) – time points in sec where the flux is to be calculated.
weight (float) – weight of the subject in kg.
conc (float) – concentration of the contrast agent in mmol/mL.
dose (float) – injected dose in mL/kg body weight.
rate (float) – rate of contrast agent injection in mL/sec.
t0 (float) – start of the injection in sec.
- Raises:
ValueError – if the injection duration is zero, or smaller than the time step of the time array.
- Returns:
contrast agent flux for each time point in units of mmol/sec.
- Return type:
Example
>>> import numpy as np >>> import dcmri as dc
Create an array of time points covering 20sec in steps of 1.5sec.
>>> t = np.arange(0, 20, 1.5)
Inject a dose of 0.2 mL/kg bodyweight at a rate of 3mL/sec starting at t=5sec. For a subject weighing 70 kg and a contrast agent with concentration 0.5M, this produces the flux:
>>> dc.ca_injection(t, 70, 0.5, 5, 0.2, 3) array([0. , 0. , 0. , 0. , 1.5, 1.5, 1.5, 0. , 0. , 0. , 0. , 0. , 0. ,0. ])