Skip to content

Commit 11bd510

Browse files
authored
Update KomaMRICore/src/simulation/Bloch/BlochVoxelDictSimulation.jl
1 parent d14ab71 commit 11bd510

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

KomaMRICore/src/simulation/Bloch/BlochVoxelDictSimulation.jl

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,3 @@ function run_spin_precession!(p::Phantom{T}, seq::DiscreteSequence{T}, sig::Abst
4848

4949
return nothing
5050
end
51-
52-
53-
function run_spin_excitation!(p::Phantom{T}, seq::DiscreteSequence{T}, sig::AbstractArray{Complex{T}},
54-
M::Mag{T}, sim_method::BlochVoxelDict) where {T<:Real}
55-
#Simulation
56-
for s seq #This iterates over seq, "s = seq[i,:]"
57-
#Motion
58-
xt = p.x .+ p.ux(p.x, p.y, p.z, s.t)
59-
yt = p.y .+ p.uy(p.x, p.y, p.z, s.t)
60-
zt = p.z .+ p.uz(p.x, p.y, p.z, s.t)
61-
#Effective field
62-
ΔBz = p.Δw ./ T(2π * γ) .- s.Δf ./ T(γ) # ΔB_0 = (B_0 - ω_rf/γ), Need to add a component here to model scanner's dB0(xt,yt,zt)
63-
Bz = (s.Gx .* xt .+ s.Gy .* yt .+ s.Gz .* zt) .+ ΔBz
64-
B = sqrt.(abs.(s.B1) .^ 2 .+ abs.(Bz) .^ 2)
65-
B[B .== 0] .= eps(T)
66-
#Spinor Rotation
67-
φ = T(-2π * γ) * (B .* s.Δt) # TODO: Use trapezoidal integration here (?), this is just Forward Euler
68-
mul!( Q(φ, s.B1 ./ B, Bz ./ B), M )
69-
#Relaxation
70-
M.xy .= M.xy .* exp.(-s.Δt ./ p.T2)
71-
M.z .= M.z .* exp.(-s.Δt ./ p.T1) .+ p.ρ .* (1 .- exp.(-s.Δt ./ p.T1))
72-
end
73-
return nothing
74-
end

0 commit comments

Comments
 (0)