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
db4f20e5
Unverified
Commit
db4f20e5
authored
9 months ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Replace repetition_time with duration
parent
2e8cf28d
No related branches found
No related tags found
1 merge request
!2
Define variables through new @defvar macro
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_IO.jl
+5
-6
5 additions, 6 deletions
test/test_IO.jl
with
5 additions
and
6 deletions
test/test_IO.jl
+
5
−
6
View file @
db4f20e5
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
@test
variables
.
readout_times
(
seq
)[
1
]
≈
0.22
+
5
+
0.02
+
0.5
*
0.3125
@test
variables
.
readout_times
(
seq
)[
1
]
≈
0.22
+
5
+
0.02
+
0.5
*
0.3125
@test
variables
.
readout_times
(
seq
)[
end
]
≈
0.22
+
5
+
0.02
+
1023.5
*
0.3125
@test
variables
.
readout_times
(
seq
)[
end
]
≈
0.22
+
5
+
0.02
+
1023.5
*
0.3125
@test
variables
.
TR
(
seq
)
≈
0.22
+
5
+
0.02
+
1024
*
0.3125
@test
variables
.
duration
(
seq
)
≈
0.22
+
5
+
0.02
+
1024
*
0.3125
end
end
@testset
"read all v1.4.0 files in 01_from_FID_to_PRESS"
begin
@testset
"read all v1.4.0 files in 01_from_FID_to_PRESS"
begin
path
=
joinpath
(
directory
,
"01_from_FID_to_PRESS_v140"
)
path
=
joinpath
(
directory
,
"01_from_FID_to_PRESS_v140"
)
...
@@ -48,8 +48,8 @@
...
@@ -48,8 +48,8 @@
@test
variables
.
flip_angle
(
pulse
)
≈
90
@test
variables
.
flip_angle
(
pulse
)
≈
90
@test
start_time
(
seq
,
1
,
index
)
≈
0.1
# determined by RF dead time
@test
start_time
(
seq
,
1
,
index
)
≈
0.1
# determined by RF dead time
@test
end_time
(
seq
,
1
,
index
)
≈
0.6
# RF dead time + RF duration
@test
end_time
(
seq
,
1
,
index
)
≈
0.6
# RF dead time + RF duration
@test
phase
(
seq
,
0.3
)
==
0
@test
variables
.
phase
(
seq
,
0.3
)
==
0
@test
amplitude
(
seq
,
0.3
)
≈
0.5
@test
variables
.
amplitude
(
seq
,
0.3
)
≈
0.5
start_adc
=
(
start_adc
=
(
0.6
+
# end of RF pulse
0.6
+
# end of RF pulse
...
@@ -94,13 +94,12 @@
...
@@ -94,13 +94,12 @@
end
end
full_filename
=
joinpath
(
path
,
fn
)
full_filename
=
joinpath
(
path
,
fn
)
seq_orig
=
read_sequence
(
full_filename
)
seq_orig
=
read_sequence
(
full_filename
)
io
=
IOBuffer
()
io
=
IOBuffer
()
write_sequence
(
io
,
seq_orig
,
format
=:
serialize
)
write_sequence
(
io
,
seq_orig
,
format
=:
serialize
)
seek
(
io
,
0
)
seek
(
io
,
0
)
seq_json
=
read_sequence
(
io
,
format
=:
serialize
)
seq_json
=
read_sequence
(
io
,
format
=:
serialize
)
@test
variables
.
TR
(
seq_orig
)
==
variables
.
TR
(
seq_json
)
@test
variables
.
duration
(
seq_orig
)
==
variables
.
duration
(
seq_json
)
@test
length
(
seq_orig
)
==
length
(
seq_json
)
@test
length
(
seq_orig
)
==
length
(
seq_json
)
@test
all
(
duration
.
(
seq_orig
)
.==
duration
.
(
seq_json
))
@test
all
(
duration
.
(
seq_orig
)
.==
duration
.
(
seq_json
))
@test
iszero
(
length
(
iter_instant_gradients
(
seq_json
)))
@test
iszero
(
length
(
iter_instant_gradients
(
seq_json
)))
...
@@ -119,7 +118,7 @@
...
@@ -119,7 +118,7 @@
write_sequence
(
io
,
seq_orig
;
format
=:
serialize
)
write_sequence
(
io
,
seq_orig
;
format
=:
serialize
)
seek
(
io
,
0
)
seek
(
io
,
0
)
seq_json
=
read_sequence
(
io
;
format
=:
serialize
)
seq_json
=
read_sequence
(
io
;
format
=:
serialize
)
@test
variables
.
TR
(
seq_orig
)
==
variables
.
TR
(
seq_json
)
@test
variables
.
duration
(
seq_orig
)
==
variables
.
duration
(
seq_json
)
@test
length
(
seq_orig
)
==
length
(
seq_json
)
@test
length
(
seq_orig
)
==
length
(
seq_json
)
@test
all
(
duration
.
(
seq_orig
)
.==
duration
.
(
seq_json
))
@test
all
(
duration
.
(
seq_orig
)
.==
duration
.
(
seq_json
))
@test
length
(
iter_instant_gradients
(
seq_json
))
==
length
(
iter_instant_gradients
(
seq_json
))
@test
length
(
iter_instant_gradients
(
seq_json
))
==
length
(
iter_instant_gradients
(
seq_json
))
...
...
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