gre¶
GRE simulations.
-
mr_utils.sim.gre.gre.
ernst
(TR, T1)[source]¶ Computes the Ernst angle.
Parameters: - TR (float) – repetition time.
- T1 (array_like) – longitudinal exponential decay time constant.
Returns: alpha – Ernst angle in rad.
Return type: array_like
Notes
Implements equation [14.9] from [1].
References
[1] Notes from Bernstein, M. A., King, K. F., & Zhou, X. J. (2004). Handbook of MRI pulse sequences. Elsevier.
-
mr_utils.sim.gre.gre.
fzss
(T1, TR, alpha=None)[source]¶ Dimensionless measure of steady-state longitudinal magnetization.
Parameters: - T1 (array_like) – longitudinal exponential decay time constant.
- TR (float) – repetition time.
- alpha (array_like, optional) – flip angle (in rad).
Returns: Dimensionless measure of steady-state longitudinal magnetization.
Return type: array_like
Notes
alpha=None will use the Ernst angle.
Implements equation [14.7] from [2].
References
[2] Notes from Bernstein, M. A., King, K. F., & Zhou, X. J. (2004). Handbook of MRI pulse sequences. Elsevier.
-
mr_utils.sim.gre.gre.
gre_sim
(T1, T2, TR=0.012, TE=0.006, alpha=1.0471975511965976, field_map=None, phi=0, dphi=0, M0=1, tol=1e-05, maxiter=None, spoil=True)[source]¶ Simulate GRE pulse sequence.
Parameters: - T1 (array_like) – longitudinal exponential decay time constant.
- T2 (array_like) – Transverse exponential decay time constant.
- TR (float, optional) – repetition time.
- TE (float, optional) – echo time.
- alpha (float, optional) – flip angle.
- field_map (array_like, optional) – offresonance field map (in hertz).
- phi (float, optional) – Reference starting phase.
- dphi (float, optional) – phase cycling of RF pulses.
- M0 (array_like, optional) – proton density.
- tol (float, optional) – Maximum difference between voxel intensity iter to iter until stop.
- maxiter (int, optional) – number of excitations till steady state.
Returns: Complex transverse magnetization (Mx + 1j*My)
Return type: array_like
Notes
maxiter=None will run until difference between all voxel intensities iteration to iteration is within given tolerance, tol (default=1e-5).
-
mr_utils.sim.gre.gre.
gre_sim_loop
(T1, T2, TR=0.012, TE=0.006, alpha=1.0471975511965976, field_map=None, dphi=0, M0=1, maxiter=200)[source]¶ Simulate GRE pulse sequence.
Parameters: - T1 (array_like) – longitudinal exponential decay time constant.
- T2 (array_like) – Transverse exponential decay time constant.
- TR (float, optional) – repetition time.
- TE (float, optional) – echo time.
- alpha (float, optional) – flip angle.
- field_map (array_like, optional) – offresonance field map (in hertz).
- dphi (float, optional) – phase-cycling of RF pulses.
- M0 (array_like, optional) – proton density.
- maxiter (int, optional) – number of excitations till steady state.
Returns: Mxy – Complex transverse magnetization.
Return type: array_like
-
mr_utils.sim.gre.gre.
spoiled_gre
(T1, T2star, TR, TE, alpha=None, M0=1)[source]¶ Spoiled, steady state GRE contrast simulation.
Parameters: - T1 (array_like) – longitudinal exponential decay time constant.
- T2star (array_like) – Effective transverse exponential decay time constant.
- TR (float) – repetition time.
- TE (float) – echo time.
- alpha (array_like, optional) – flip angle.
- M0 (array_like, optional) – proton density.
Returns: S – Simulated magnitude spoiled GRE image.
Return type: array_like
Notes
alpha=None will use the Ernst angle.
Assuming a longitudinal steady-state and perfect spoiling. Note that dependence is on T2* rather than T2 because SE/STE formation is suppressed by spoiling and the signal is generated by gradient refocusing of an FID.
Implements equation [14.8] from [4].
References
[4] Notes from Bernstein, M. A., King, K. F., & Zhou, X. J. (2004). Handbook of MRI pulse sequences. Elsevier.
-
mr_utils.sim.gre.gre.
spoiled_gre_k
(T1, T2star, TR, TE, alpha=None, M0=1, k=1)[source]¶ Spoiled GRE contrast simulation for k excitation pulses.
See spoiled_gre().
Parameters: - T1 (array_like) – longitudinal exponential decay time constant.
- T2star (array_like) – Effective transverse exponential decay time constant.
- TR (float) – repetition time.
- TE (float) – echo time.
- alpha (array_like, optional) – flip angle.
- M0 (array_like, optional) – proton density.
- k (int, optional) – Number of excitation pulses the magnetization experiences.
Returns: Sk – Simulated magnitude GRE image.
Return type: array_like
Raises: AssertionError
– If k is less than 1.Notes
alpha=None will use the Ernst angle.
Implements equations [14.10-11] from [3].
References
[3] Notes from Bernstein, M. A., King, K. F., & Zhou, X. J. (2004). Handbook of MRI pulse sequences. Elsevier.