I have written a small simulator where I am trying to simulate the MRI signal generation process. I have a SINC RF Pulse to excite the spins and a readout gradient and k-space sampling during the readout. The k-space is sampled at equidistant points in time and the signal is inverse fourier transformed to give the image.
The synthetic image phantom for which I am trying to generate the signal is completely homogeneous. So, I have spin objects which have identical T1 and T2 relaxation times and density.
So, when I do the reconstruction, I was expecting the same intensity at each of these sample points. Instead what I get is something as follows:
Now, I am not sure if this is because of an error I made or simply because of numerical issues or the fact that the SINC RF pulse is terminated. I also changed the RF pulse to simulate a perfect flip i.e. all spins end up along the Y-axes perfectly, but this effect is still seen.
I wonder if this is due to Gibbs artefacts? I have a feeling this has something to do with how the fourier transform works but I am not sure.
I increased the number of k-space samples and also increased the FOV to 0.5 meters and then I get the following plot:
Finally, I did a reconstruction with 128 sampling points and a FOV of 0.128 meters and I got the following image:
P.S: Do not worry about the y-values as I was plotting these with different spin density values.
Here is some more detail on the simulation. The underlying imaging object constitutes a single k-space line for simplicity. All the spins have the same T1, T2 and spin density with values
0.833, 0.083 and 1 respectively.
The FOV of the underlying object os
0.128 m. The constitutes a k-space matrix of
1 mm apart.
The RF excitation was done for 2 ms and the
centre frequency was set to
0 Hz and a
2000 Hz. The flip angle was 90 degrees.
Immediately after the RF pulse a rewinder gradient was applied to dephase the spins. This was done to ensure the echo happens in the centre of the k-space line. The rewinder gradient had the
peak amplitude of
-0.022 T/m. The duration of this was
0.000816 sec and the area under the gradient was about
Immediately after the rewinder, the readout gradient was applied with a duration of
0.0014 seconds and the area under the gradient was
2.7868e-05. The area of this gradient was twice that of the rewinder gradient to allow for the echo to form in the middle.
During the readout gradient, the k-space was sampled at uniform intervals. The transverse magnetisation over all spins was summed together at each sampling time point to yield one complex k-space value.
This was inverse fourier transformed using the scipy python package as:
So, it shows the absolute value of the signal.
Also, more specifically, there is no spoiling performed as only one k-space line is read and only one RF-excitation is performed.
The simulation is performed by solving the Bloch equations using a fourth order Runge-Kutta method with a step size of 10e-6 sec. I see the same behaviour when I decreased the step size.
So, once I perform the simulation, I detect an echo as follows:
and the reconstructed image is the plot here:
Note that because the object is only simulated in one-dimensional, the
image is just a 1-D plot.
My issue is I was expecting a k-space line which was close to a spike in the middle since the object is completely uniform.
I figured out that I had made a small mistake in the readout part (I was not sampling at the correct time). Fixing this makes the echo less zagged but it is still not perfect. The echo and the reconstruction is below: