Experimental: Simulating with realistic coils

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

Loading coil sensitivities generated from electromagnetic simulation software. To plot the coil sensitivities we will use the Phantom object:

ph_file = joinpath(dirname(pathof(KomaMRI)), "../examples/2.phantoms/sphere_fields.mat")
sphere = matread(ph_file)
ฮ”x = 1e-3                   # 5mm
N = size(sphere["b1m"])  # Number of spins
FOV = (N .- 1) .* ฮ”x    # Field of view
xr = -FOV[1]/2:ฮ”x:FOV[1]/2  # x spin coordinates vector
ฯ = abs.(sphere["b1m"][:]) .> 0
x = [x for (x, y, z) in Iterators.product(xr, xr, xr)][ฯ .!= 0]
y = [y for (x, y, z) in Iterators.product(xr, xr, xr)][ฯ .!= 0]
z = [z for (x, y, z) in Iterators.product(xr, xr, xr)][ฯ .!= 0]
coil_sens = 1.0 * sphere["b1m"][:][ฯ .!= 0] ./ maximum(abs.(sphere["b1m"][:][ฯ .!= 0]))
ฯ = 1.0 * ฯ[ฯ .!= 0]
obj = Phantom(; x, y, z, ฯ, coil_sens)
p1 = plot_phantom_map(obj, :coil_sens ; height=400, width=400, darkmode=true)
"../assets/6-phantom1.html"

Now we will interpolate the coils into a brain phantom (this will be done internally):

using Interpolations
coil_sens = sphere["b1m"] ./ maximum(abs.(sphere["b1m"][:]))
obj = brain_phantom2D()
obj.coil_sens .= LinearInterpolation((xr,xr,xr), coil_sens, extrapolation_bc=0).(obj.x, obj.y, obj.z)
p2 = plot_phantom_map(obj, :coil_sens ; height=400, width=400, darkmode=true)
"../assets/6-phantom2.html"

Then, we will load an EPI sequence.

seq_file = joinpath(dirname(pathof(KomaMRI)), "../examples/5.koma_paper/comparison_accuracy/sequences/EPI/epi_100x100_TE100_FOV230.seq")
seq = read_seq(seq_file)
Sequence[ ฯ„ = 1000.0 ms | blocks: 204 | ADC: 100 | GR: 201 | RF: 1 | DEF: 13 ]

And simulate:

"../assets/6-recon.html"

This page was generated using Literate.jl.