Free Induction Decay

First of all, let's use the KomaMRI package and define the default scanner.

using KomaMRI
sys = Scanner() # default hardware definition
Scanner
  B0: Float64 1.5
  B1: Float64 1.0e-5
  Gmax: Float64 0.06
  Smax: Int64 500
  ADC_Δt: Float64 2.0e-6
  seq_Δt: Float64 1.0e-5
  GR_Δt: Float64 1.0e-5
  RF_Δt: Float64 1.0e-6
  RF_ring_down_T: Float64 2.0e-5
  RF_dead_time_T: Float64 0.0001
  ADC_dead_time_T: Float64 1.0e-5

The 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)
RF(2.0 uT, 2.9358 ms, 0.0 Hz)

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)
ADC(8192, 0.25, 0.001, 0.0, 0.0)

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)
"../assets/1-seq.html"

Now, we will define a Phantom with a single spin at $x=0$ with $T_1=1000\,\mathrm{ms}$ and $T_2=100\,\mathrm{ms}$.

obj = Phantom{Float64}(x=[0.], T1=[1000e-3], T2=[100e-3])
Phantom{Float64}
  name: String "spins"
  x: Array{Float64}((1,)) [0.0]
  y: Array{Float64}((1,)) [0.0]
  z: Array{Float64}((1,)) [0.0]
  ρ: Array{Float64}((1,)) [1.0]
  T1: Array{Float64}((1,)) [1.0]
  T2: Array{Float64}((1,)) [0.1]
  T2s: Array{Float64}((1,)) [1.0e6]
  Δw: Array{Float64}((1,)) [0.0]
  Dλ1: Array{Float64}((1,)) [0.0]
  Dλ2: Array{Float64}((1,)) [0.0]
  Dθ: Array{Float64}((1,)) [0.0]
  motion: NoMotion{Float64} NoMotion{Float64}()

Finally, to simulate we will need to use the function simulate.

raw = simulate(obj, seq, sys)
RawAcquisitionData[SeqName: NoName | 1 Profile(s) of 8192×1]

To plot the results we will need to use the plot_signal function

p2 = plot_signal(raw; slider=false, height=300)
"../assets/1-signal.html"

Nice!, we can see that $S(t)$ follows an exponential decay $\exp(-t/T_2)$ as expected.

For a little bit of spiciness, let's add off-resonance to our example. We will use $\Delta f=-100\,\mathrm{Hz}$. For this, we will need to add a definition for Δw in our Phantom

obj = Phantom{Float64}(x=[0.], T1=[1000e-3], T2=[100e-3], Δw=[-2π*100])# and simulate again.

raw = simulate(obj, seq, sys)
p3 = plot_signal(raw; slider=false, height=300)
"../assets/1-signal2.html"

The signal now follows an exponential of the form $\exp(-t/T_2)\cdot\exp(-i\Delta\omega t)$. The addition of $\exp(-i\Delta\omega t)$ to the signal will generate a shift in the image space (Fourier shifting property). This effect will be better visualized and explained in later examples.


This page was generated using Literate.jl.