MRI T2 decay curve simulation with imperfect excitation pulse (B1)
Project description
T2Stimulate
MRI T2 decay curve simulation with imperfect excitation pulse (B1)
Free software: GNU General Public License v3
Documentation: https://t2stimulate.readthedocs.io.
A T2 multi-echo decay curve in MRI is traditionally modeled as a decaying exponential with one or more exponential components. This assumes the refocusing pulse flip angle is at or near 180 degrees, and, if not, that other gradients are added in as spoilers to remove the signal from stimulated echoes.
The stimulated echoes were modeled many years ago in a paper (ref) and were then implemented in simulation code and were found to be sufficient to use for fitting multi-echo decay curves from non-180 degree refocussing pulse sequences.
Below is an example of three curves of a 32 echo MRI Pulse sequence with TE=10ms and refocusing pulse flip angles of 180 degrees, 160 degrees and 140 degrees. The code was:
import matplotlib.pyplot as plt
import numpy as np
from t2stimulate.simulate import stimulate
# Set a couple of parameters
num_echoes = 32
tau = 5
T1 = 1000
te = 2*tau*np.arange(1, num_echoes+1)
curve_140 = stimulate(alpha=140 / 180 * np.pi, num_echoes=num_echoes, T1=450, T2=80, tau=tau)
curve_160 = stimulate(alpha=160 / 180 * np.pi, num_echoes=num_echoes, T1=450, T2=80, tau=tau)
curve_180 = stimulate(alpha=180 / 180 * np.pi, num_echoes=num_echoes, T1=450, T2=80, tau=tau)
plt.figure(1)
plt.clf()
plt.plot(te, curve_180, 'bo-')
plt.plot(te, curve_160, 'gd-')
plt.plot(te, curve_140, 'rx-')
plt.xlabel('TE (ms)')
plt.ylabel('Signal (arb)')
plt.grid('on')
plt.legend(['B1=180°', 'B1=160°', 'B1=140°'])
plt.axes((0.6, 0.3, 0.25, 0.3))
plt.plot(te, curve_180, 'bo-')
plt.plot(te, curve_160, 'gd-')
plt.plot(te, curve_140, 'rx-')
plt.xlabel('TE (ms)')
plt.ylabel('Signal (arb)')
plt.grid('on')
plt.xlim((200,250))
plt.ylim((0.03, 0.1))
plt.show()
And the resulting plot:
Features
TODO
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2019-06-25)
First release on PyPI.
Basic stimulated echo simulation written with tests.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file t2stimulate-0.1.0.tar.gz
.
File metadata
- Download URL: t2stimulate-0.1.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.0 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cab46fa11669e8cadd9bef1632c5bea2463edb0b36a12214845d23e1550e3582 |
|
MD5 | 46d7fe406c6ce650406fa5dda3b7a9bc |
|
BLAKE2b-256 | 726eef3c5e9c56215da047360d8809dbc589da10755aef15118a413dc100f703 |