dcmri module
- dcmri.concentrationSPGRESS(S, S0, T10, FA, TR, r1)[source]
Calculates the tracer concentration from a spoiled gradient-echo signal.
- Parameters
S (Signal S(C) at concentration C) –
S0 (Precontrast signal S(C=0)) –
FA (Flip angle in degrees) –
TR (Repetition time TR in msec (=time between two pulses)) –
T10 (Precontrast T10 in msec) –
r1 (Relaxivity in Hz/mM) –
- Return type
Concentration in mM
- dcmri.expconv(T, time, a)[source]
Convolve a 1D-array with a normalised exponential.
expconv() uses an efficient and accurate numerical formula to calculate the convolution, as detailed in the appendix of Flouri et al., Magn Reson Med, 76 (2016), pp. 998-1006.
Note (1): by definition, expconv preserves the area under a(time) Note (2): if T=0, expconv returns a copy of a
- Parameters
a (numpy array) – the 1D array to be convolved.
time (numpy array) – the time points where the values of ca are defined these do not have to to be equally spaced.
T (float) – the characteristic time of the the exponential function. time and T must be in the same units.
- Return type
a numpy array of the same shape as ca.
Example
coming soon..
- dcmri.injection(t, weight, conc, dose1, rate, start1, dose2=None, start2=None)[source]
dose injected per unit time (mM/sec)
- dcmri.injection_gv(t, weight, conc, dose, rate, start1, start2=None, dispersion=0.5)[source]
dose injected per unit time (mM/sec)
- dcmri.linear(x, x1, x2, y1, y2)[source]
returns a linear function of x that goes through the two points (xi, yi)
- dcmri.propagate_2cxm(t, ca, KP, KE, KB)[source]
Calculate the propagators for the individual compartments in the 2CXM
For details and notations see appendix of Sourbron et al. Magn Reson Med 62:672–681 (2009)
- Parameters
- Returns
cp (numpy array) – concentration in the plasma compartment (mmol/mL)
ce (numpy array) – concentration in the extracellular compartment (mmol/mL)
Examples
coming soon..
- dcmri.propagate_compartment(t, c, MTT)[source]
Returns the average concentration at the outlet given the concentration at the inlet
- dcmri.propagate_dd(t, c, MTT, TTD)[source]
Propagate concentration through a serial arrangement of a plug flow and a compartment.
- Parameters
TTD (Transit Time Dispersion of the system) – This is the mean transit time of the compartment
MTT (Mean Transit Time of the system) – This is the sum of delay and MTT of the compartment
- Return type
Concentration at the outlet
- dcmri.propagate_simple_body(t, c_vena_cava, MTTlh, Eint, MTTe, MTTo, TTDo, Eext)[source]
Propagation through a 2-site model of the body.
- dcmri.quadratic(x, x1, x2, x3, y1, y2, y3)[source]
returns a quadratic function of x that goes through the three points (xi, yi)
- dcmri.residue_chain(t, ci, MTT, dispersion)[source]
Returns the (average) concentration inside the system given the concentration at the inlet
- dcmri.residue_compartment(t, c, MTT)[source]
Returns the concentration inside the system given the concentration at the inlet
- dcmri.residue_high_flow_2cfm(t, ci, Ktrans, Te, FiTi)[source]
Central compartment i with high flow (Ti=0) and filtration compartment e
- dcmri.residue_high_flow_2cfm_varK(t, ci, Ktrans1, Ktrans2, Ktrans3, Te, FiTi)[source]
Central compartment i with high flow (Ti=0) and filtration compartment e
- dcmri.residue_high_flow_2cfm_varT(t, ci, Ktrans, Te1, Te2, Te3, FiTi)[source]
Central compartment i with high flow (Ti=0) and filtration compartment e
- dcmri.residue_high_flow_2cfm_varlinT(t, ci, Ktrans, Te1, Te2, FiTi)[source]
Central compartment i with high flow (Ti=0) and filtration compartment e
- dcmri.residue_high_flow_ccf(t, ci, Ktrans, Te, De, FiTi)[source]
Residue for a compartment i with high flow (Ti=0) and a chain e
- dcmri.sample(t, S, ts, dts)[source]
Sample the signal assuming sample times are at the start of the acquisition
- dcmri.signalBiExp(TR, R1, S0, A, a, b)[source]
Descriptive bi-exponentional model for SPGRESS sequence.
S = S0 (1 - A e^(-ax) - (1-A) e^(-bx)) with x = TR*R1 0 < A < 1 0 < S 0 < a 0 < b