Skip to content

Commit

Permalink
Minor change.
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenWhitaker committed Jul 1, 2019
1 parent 0fac695 commit b74ffb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/sequences.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ function spgr!(spin::AbstractSpin, TR, TE, α, grad, Tg; Δθinc = deg2rad(117),
θ = 0
Δθ = Δθinc

# Simulate nTR-1 TR's
for rep = 1:nTR-1
# Simulate nTR TR's
for rep = 1:nTR

excitation!(spin, θ, α)
applydynamics!(spin, D...)
Expand All @@ -154,7 +154,7 @@ function spgr!(spin::AbstractSpin, TR, TE, α, grad, Tg; Δθinc = deg2rad(117),

end

# Simulate the last TR and calculate signal at echo time
# Calculate signal at echo time
excitation!(spin, θ, α)
applydynamics!(spin, Dte...)

Expand Down
4 changes: 2 additions & 2 deletions test/sequences.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function testB5a()
zmax = 2π / (GAMMA * gradz * Tg/1000) # cm
z = (1:100)/100 * zmax
spins = map(z -> Spin(1, 600, 100, 0, [0,0,z]), z)
s = map(spin -> spgr!(spin, 10, 2, π/6, [0,0,gradz], Tg), spins)
s = map(spin -> spgr!(spin, 10, 2, π/6, [0,0,gradz], Tg, nTR = 99), spins)
sig = sum(s) / 100

return sig answer["sig"]
Expand All @@ -95,7 +95,7 @@ function testB5b()
spins = map(z -> Spin(1, 600, 100, 0, [0,0,z]), z)
srf = zeros(ComplexF64, 51)
for i = 1:51
s = map(spin -> spgr!(spin, 10, 2, α[i], [0,0,gradz], Tg), spins)
s = map(spin -> spgr!(spin, 10, 2, α[i], [0,0,gradz], Tg, nTR = 99), spins)
srf[i] = sum(s) / 100
end
spin = Spin(1, 600, 100, 0)
Expand Down

0 comments on commit b74ffb3

Please sign in to comment.