Pulse sequences
The package mainly revolves around two pulse sequences for diffusion encoding with either
monopolar, or
bipolar diffusion encoding gradients.
For these pulse sequences one can calculate the b-value (API)
where p takes values 1 for a monopolar pulse sequence and 2 for a bipolar pulse sequence, \(\gamma\) is the gyromagnetic ratio, G is the gradient strength, and \(\delta\) and \(\Delta\) are the duration and separation of the gradient pulses.[1]
In a similar way, the c-value (flow sensitivity) can be calculated (API)
Note that the equation above applies for non-flow-compensated diffusion encoding.[2],[3] For a flow-compensated diffusion encoding, c = 0 by design.[4]
The module also provides functions for calculating the gradient strength given a b-value (API)
and generation of cval files similar to the commonly used bval files (API).
References:
API
ivim.seqs.lte
- ivim.seq.lte.calc_b(G: ndarray[Any, dtype[float64]], Delta: float, delta: float, seq: str = 'monopolar') ndarray[Any, dtype[float64]]
Calculate b-value given other relevant pulse sequence parameters.
- Parameters:
G – gradient strength [T/mm] (Note the units preferred to get b-values in commonly used unit)
Delta – gradient separation [s]
delta – gradient duration [s]
seq – (optional) pulse sequence (monopolar or bipolar)
- Output:
b: b-value [s/mm2]
- ivim.seq.lte.calc_c(G: ndarray[Any, dtype[float64]], Delta: float, delta: float, seq: str = 'monopolar', fc: bool = False) ndarray[Any, dtype[float64]]
Calculate c-value (flow encoding) given other relevant pulse sequence parameters.
- Parameters:
G – gradient strength [T/mm] (Note the units preferred to get b-values in commonly used units)
Delta – gradient separation [s]
delta – gradient duration [s]
seq – (optional) pulse sequence (monopolar or bipolar)
fc – (optional) specify is the pulse sequence is flow compensated (only possible for bipolar)
- Output:
c: c-value [s/mm]
- ivim.seq.lte.G_from_b(b: ndarray[Any, dtype[float64]], Delta: float, delta: float, seq: str = 'monopolar') ndarray[Any, dtype[float64]]
Calculate gradient strength given other relevant pulse sequence parameters.
- Parameters:
b – b-value [s/mm2]
Delta – gradient separation [s]
delta – gradient duration [s]
seq – (optional) pulse sequence (monopolar or bipolar)
- Output:
G: gradient strength [T/mm]
- ivim.seq.lte.cval_from_bval(bval_file: str, Delta: float, delta: float, seq: str = 'monopolar', cval_file: str = '', fc: bool = False) ndarray[Any, dtype[float64]]
Write .cval based on .bval file and other relevant pulse sequence parameters.
- Parameters:
bval_file – path to .bval file
Delta – gradient separation
delta – gradient duration
seq – (optional) pulse sequence (monopolar or bipolar)
cval_file – (optional) path to .cval file. Will use the .bval path if not set