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
1593e0b1
Verified
Commit
1593e0b1
authored
1 year ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Detect if edges are valid
parent
94735364
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/all_building_blocks/base_building_blocks.jl
+9
-2
9 additions, 2 deletions
src/all_building_blocks/base_building_blocks.jl
src/all_building_blocks/spoilt_slice_selects.jl
+4
-4
4 additions, 4 deletions
src/all_building_blocks/spoilt_slice_selects.jl
with
13 additions
and
6 deletions
src/all_building_blocks/base_building_blocks.jl
+
9
−
2
View file @
1593e0b1
...
...
@@ -119,20 +119,27 @@ function waveform_sequence(bb::BaseBuildingBlock, first, last)
current_grad_key
=
key
current_start
=
nothing
end
if
key
==
first
if
key
==
first
||
key
==
Val
(
first
)
@assert
!
started
started
=
true
current_start
=
effective_time
(
bb
[
key
])
end
if
key
==
last
if
key
==
last
||
key
==
Val
(
last
)
@assert
started
if
isnothing
(
current_start
)
push!
(
parts
,
(
current_grad_key
,
split_gradient
(
bb
[
current_grad_key
],
effective_time
(
bb
[
key
]))[
1
]))
else
push!
(
parts
,
(
current_grad_key
,
split_gradient
(
bb
[
current_grad_key
],
current_start
,
effective_time
(
bb
[
key
]))[
2
]))
end
return
parts
end
end
if
!
started
error
(
"Starting index of
$
first not recognised."
)
end
if
!
isnothing
(
last
)
error
(
"Final index of
$
last not recognised."
)
end
return
parts
end
...
...
This diff is collapsed.
Click to expand it.
src/all_building_blocks/spoilt_slice_selects.jl
+
4
−
4
View file @
1593e0b1
...
...
@@ -38,7 +38,7 @@ end
function
SpoiltSliceSelect
(
pulse
::
RFPulseComponent
;
orientation
=
[
0
,
0
,
1
],
group
=
nothing
,
spoiler_scale
=
nothing
,
slice_thickness
=
nothing
,
kwargs
...
)
model
=
global_model
()
res
=
nothing
if
isinf
(
slice_thickness
)
if
slice_thickness
isa
Number
&&
isinf
(
slice_thickness
)
rise_time_var
=
get_free_variable
(
nothing
)
flat_time_var
=
get_free_variable
(
nothing
)
res
=
SpoiltSliceSelect
(
...
...
@@ -70,9 +70,9 @@ function SpoiltSliceSelect(pulse::RFPulseComponent; orientation=[0, 0, 1], group
for
time_var
in
(
res
.
rise_time1
,
res
.
flat_time1
,
res
.
diff_time
,
res
.
flat_time2
,
res
.
fall_time2
)
@constraint
model
time_var
>=
0
end
@constraint
model
res
.
diff_time
<=
res
.
rise_time1
@constraint
model
res
.
diff_time
<=
res
.
fall_time2
@constraint
model
qval
(
res
,
nothing
,
1
)
==
qval
(
res
,
1
,
nothing
)
#
@constraint model res.diff_time <= res.rise_time1
#
@constraint model res.diff_time <= res.fall_time2
#
@constraint model qval(res, nothing, 1) == qval(res, 1, nothing)
end
if
!
isnothing
(
spoiler_scale
)
...
...
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