Skip to content

Commit

Permalink
Commit of the following:
Browse files Browse the repository at this point in the history
- Fix error in tests
- Fix flow-related undetected errors from #531
  • Loading branch information
pvillacorta committed Jan 6, 2025
1 parent 878265b commit c92d9d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion KomaMRIBase/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ end
@testset "Subset" begin
rotate = Rotate(10.0, 20.0, 40.0)
translate = Translate(0.1, 0.2, 0.3)
time = TimeRange(0.0, 0.0)
time = TimeRange(0.0, eps())
spins = AllSpins()
rng = rng = 1:2:5
# NoMotion
Expand Down
8 changes: 4 additions & 4 deletions KomaMRICore/src/simulation/Flow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ function outflow_spin_reset!(
spin_state_matrix::AbstractArray,
t,
action::FlowPath,
time_span,
time_curve,
spin_span;
replace_by=0,
seq_t=0,
add_t0=false,
)
# Initialize time: add t0 and normalize
ts = KomaMRIBase.unit_time(init_time(t, seq_t, add_t0), time_span)
ts = KomaMRIBase.unit_time(init_time(t, seq_t, add_t0), time_curve.t, time_curve.t_unit, time_curve.periodic, time_curve.periods)
# Get spin state range affected by the spin span
idx = KomaMRIBase.get_indexing_range(spin_span)
spin_state_matrix = @view(spin_state_matrix[idx, :])
Expand All @@ -42,14 +42,14 @@ function outflow_spin_reset!(
M::Mag,
t,
action::FlowPath,
time_span,
time_curve,
spin_span;
replace_by=0,
seq_t=0,
add_t0=false,
)
# Initialize time: add t0 and normalize
ts = KomaMRIBase.unit_time(init_time(t, seq_t, add_t0), time_span)
ts = KomaMRIBase.unit_time(init_time(t, seq_t, add_t0), time_curve.t, time_curve.t_unit, time_curve.periodic, time_curve.periods)
# Get spin state range affected by the spin span
idx = KomaMRIBase.get_indexing_range(spin_span)
M = @view(M[idx])
Expand Down

0 comments on commit c92d9d4

Please sign in to comment.