Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MRIBuilder.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
MRIBuilder.jl
Commits
97354f77
Verified
Commit
97354f77
authored
11 months ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Add test for DWI optimisation
parent
a05ac42c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/runtests.jl
+1
-0
1 addition, 0 deletions
test/runtests.jl
test/test_sequences.jl
+51
-0
51 additions, 0 deletions
test/test_sequences.jl
with
52 additions
and
0 deletions
test/runtests.jl
+
1
−
0
View file @
97354f77
...
...
@@ -2,6 +2,7 @@ using MRIBuilder
using
Test
@testset
"MRIBuilder.jl"
begin
include
(
"test_sequences.jl"
)
include
(
"test_IO.jl"
)
include
(
"test_plot.jl"
)
end
This diff is collapsed.
Click to expand it.
test/test_sequences.jl
0 → 100644
+
51
−
0
View file @
97354f77
@testset
"test_sequences.jl"
begin
@testset
"DW-SE"
begin
@testset
"Instant pulse & readout"
begin
@testset
"Minimise TE"
begin
seq
=
DiffusionSpinEcho
(
TE
=:
min
,
bval
=
1.
)
@test
length
(
seq
)
==
9
grad_duration
=
TE
(
seq
)
/
2
@test
all
(
isapprox
.
(
duration
.
(
seq
),
[
0.
,
0.
,
grad_duration
,
0.
,
0.
,
0.
,
grad_duration
,
0.
,
0.
],
atol
=
1e-6
))
@test
length
([
iter_instant_pulses
(
seq
)
...
])
==
2
@test
length
([
iter_instant_gradients
(
seq
)
...
])
==
0.
@test
bval
(
seq
)
≈
1.
@test
40.
<
TE
(
seq
)
<
50.
@test
TR
(
seq
)
≈
TE
(
seq
)
end
@testset
"Maximise b-value"
begin
seq
=
DiffusionSpinEcho
(
TE
=
80.
,
bval
=:
max
)
@test
length
(
seq
)
==
9
@test
all
(
isapprox
.
(
duration
.
(
seq
),
[
0.
,
0.
,
40.
,
0.
,
0.
,
0.
,
40.
,
0.
,
0.
],
atol
=
1e-4
,
rtol
=
1e-4
))
@test
length
([
iter_instant_pulses
(
seq
)
...
])
==
2
@test
length
([
iter_instant_gradients
(
seq
)
...
])
==
0.
@test
TE
(
seq
)
≈
80.
@test
TR
(
seq
)
≈
80.
@test
4.8
<
bval
(
seq
)
<
4.9
# can also maximise q-value
seq2
=
DiffusionSpinEcho
(
TE
=
80.
,
qval
=:
max
)
@test
all
(
isapprox
.
(
duration
.
(
seq
),
duration
.
(
seq2
),
atol
=
1e-4
,
rtol
=
1e-4
))
@test
TE
(
seq
)
≈
TE
(
seq2
)
atol
=
1e-4
rtol
=
1e-4
@test
bval
(
seq
)
≈
bval
(
seq2
)
atol
=
1e-4
rtol
=
1e-4
end
@testset
"Set diffusion time Δ"
begin
seq
=
DiffusionSpinEcho
(
TE
=
80.
,
Δ
=
70.
,
qval
=:
max
)
@test
all
(
isapprox
.
(
duration
.
(
seq
),
[
0.
,
0.
,
10.
,
30.
,
0.
,
30.
,
10.
,
0.
,
0.
],
atol
=
1e-4
,
rtol
=
1e-4
))
@test
Δ
(
seq
)
≈
70.
@test
TE
(
seq
)
≈
80.
@test
TR
(
seq
)
≈
80.
@test
0.72
<
bval
(
seq
)
<
0.73
end
@testset
"Set gradient duration"
begin
seq
=
DiffusionSpinEcho
(
TE
=
80.
,
gradient
=
(
duration
=
10.
,
),
bval
=:
max
)
@test
all
(
isapprox
.
(
duration
.
(
seq
),
[
0.
,
0.
,
10.
,
30.
,
0.
,
30.
,
10.
,
0.
,
0.
],
atol
=
1e-4
,
rtol
=
1e-4
))
@test
Δ
(
seq
)
≈
70.
@test
TE
(
seq
)
≈
80.
@test
TR
(
seq
)
≈
80.
@test
0.72
<
bval
(
seq
)
<
0.73
end
end
end
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment