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
3ddd0789
Verified
Commit
3ddd0789
authored
1 year ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Replace get_parts with waveform_sequence
parent
770fb545
No related branches found
Branches containing commit
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
+2
-2
2 additions, 2 deletions
src/all_building_blocks/base_building_blocks.jl
src/pathways.jl
+3
-3
3 additions, 3 deletions
src/pathways.jl
with
5 additions
and
5 deletions
src/all_building_blocks/base_building_blocks.jl
+
2
−
2
View file @
3ddd0789
...
...
@@ -150,7 +150,7 @@ function qvec(bb::BaseBuildingBlock, index1::Union{Nothing, Integer}, index2::Un
if
(
index1
isa
Number
)
&&
(
index1
==
index2
)
return
zeros
(
3
)
end
sum
(
qvec
.
(
get_parts
(
bb
,
index1
,
index2
));
init
=
zero
(
SVector
{
3
,
Float64
}))
sum
(
qvec
.
(
waveform_sequence
(
bb
,
index1
,
index2
));
init
=
zero
(
SVector
{
3
,
Float64
}))
end
qvec
(
bb
::
BaseBuildingBlock
)
=
qvec
(
bb
,
nothing
,
nothing
)
...
...
@@ -162,7 +162,7 @@ function bmat_gradient(bb::BaseBuildingBlock, qstart, index1::Union{Nothing, Int
result
=
Matrix
{
VariableType
}(
zeros
(
3
,
3
))
qcurrent
=
Vector
{
VariableType
}(
qstart
)
for
part
in
get_parts
(
bb
,
index1
,
index2
)
for
part
in
waveform_sequence
(
bb
,
index1
,
index2
)
result
=
result
.+
bmat_gradient
(
part
,
qcurrent
)
qcurrent
=
qcurrent
.+
qvec
(
part
,
qcurrent
)
end
...
...
This diff is collapsed.
Click to expand it.
src/pathways.jl
+
3
−
3
View file @
3ddd0789
...
...
@@ -3,7 +3,7 @@ import LinearAlgebra: norm, tr
import
StaticArrays
:
SVector
,
SMatrix
import
..
Components
:
NoGradient
,
RFPulseComponent
,
ReadoutComponent
,
InstantGradient
,
GradientWaveform
import
..
AllSequences
:
BaseSequence
,
Sequence
import
..
AllBuildingBlocks
:
BaseBuildingBlock
,
waveform
,
events
,
get_parts
import
..
AllBuildingBlocks
:
BaseBuildingBlock
,
waveform
,
events
,
waveform_sequence
import
..
Variables
:
qvec
,
qval
,
bmat_gradient
,
VariableType
,
effective_time
,
duration
,
qval_square
,
TR
import
..
ContainerBlocks
:
start_time
import
..
Alternatives
:
AlternativeBlocks
...
...
@@ -313,7 +313,7 @@ function walk_pathway!(block::BaseBuildingBlock, walker::PathwayWalker, pulse_ef
end
# apply gradients up till interrupt
for
part
in
get_parts
(
ao
,
current_index
,
index_inter
)
for
part
in
waveform_sequence
(
ao
,
current_index
,
index_inter
)
update_walker_gradient!
(
part
,
walker
,
current_time
)
current_time
=
current_time
+
duration
(
part
)
end
...
...
@@ -330,7 +330,7 @@ function walk_pathway!(block::BaseBuildingBlock, walker::PathwayWalker, pulse_ef
end
# apply remaining gradients
for
part
in
get_parts
(
ao
,
current_index
,
nothing
)
for
part
in
waveform_sequence
(
ao
,
current_index
,
nothing
)
update_walker_gradient!
(
part
,
walker
,
current_time
)
current_time
=
current_time
+
duration
(
part
)
end
...
...
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