Free Induction Decay
First of all, let's use the KomaMRI package and define the default scanner.
using KomaMRI, Suppressor
sys = Scanner(); # default hardware definitionThe free induction decay is the simplest observable NMR signal. This signal is the one that follows a single tipping RF pulse. To recreate this experiment, we will need to define a Sequence with 2 blocks.
The first block containing an RF pulse with a flip-angle of 90 deg,
ampRF = 2e-6 # 2 uT RF amplitude
durRF = π / 2 / (2π * γ * ampRF) # required duration for a 90 deg RF pulse
exc = RF(ampRF,durRF);and the second block containing the ADC.
nADC = 8192 # number of acquisition samples
durADC = 250e-3 # duration of the acquisition
delay = 1e-3 # small delay
acq = ADC(nADC, durADC, delay);Finally, we concatenate the sequence blocks to create the final sequence.
seq = Sequence() # empty sequence
seq += exc # adding RF-only block
seq += acq # adding ADC-only block
p1 = plot_seq(seq; slider=false, height=300)Now, we will define a Phantom with a single spin at
obj = Phantom(x=[0.], T1=[1000e-3], T2=[100e-3]);Finally, to simulate we will need to use the function simulate (note how the use of the @suppress macro prevents internal messages from being printed by the function):
raw = @suppress simulate(obj, seq, sys);To plot the results we will need to use the plot_signal function
p2 = plot_signal(raw; slider=false, height=300)Nice!, we can see that
For a little bit of spiciness, let's add off-resonance to our example. We will use Δw in our Phantom
obj = Phantom(x=[0.], T1=[1000e-3], T2=[100e-3], Δw=[-2π*100])# and simulate again.
raw = @suppress simulate(obj, seq, sys)
p3 = plot_signal(raw; slider=false, height=300)The signal now follows an exponential of the form
This page was generated using Literate.jl.