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
277ebe21
Verified
Commit
277ebe21
authored
1 year ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Consider DelayedEvent
parent
7c77cafd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pathways.jl
+9
-5
9 additions, 5 deletions
src/pathways.jl
with
9 additions
and
5 deletions
src/pathways.jl
+
9
−
5
View file @
277ebe21
module
Pathways
import
LinearAlgebra
:
norm
,
tr
import
StaticArrays
:
SVector
,
SMatrix
import
..
Components
:
NoGradient
,
RFPulseComponent
,
ReadoutComponent
,
InstantGradient
,
GradientWaveform
import
..
Components
:
NoGradient
,
RFPulseComponent
,
ReadoutComponent
,
InstantGradient
,
GradientWaveform
,
DelayedEvent
import
..
AllSequences
:
BaseSequence
,
Sequence
import
..
AllBuildingBlocks
:
BaseBuildingBlock
,
waveform
,
events
,
waveform_sequence
import
..
Variables
:
qvec
,
qval
,
bmat_gradient
,
VariableType
,
effective_time
,
duration
,
TR
...
...
@@ -287,8 +287,12 @@ function walk_pathway!(block::BaseBuildingBlock, walker::PathwayWalker, pulse_ef
current_time
=
block_start_time
for
(
index_inter
,
interruption
)
in
events
(
block
)
if
interruption
isa
DelayedEvent
interruption
=
interruption
.
event
end
# determine if action should be taken
if
interruption
.
object
isa
RFPulse
Block
if
interruption
isa
RFPulse
Component
if
iszero
(
length
(
pulse_effects
))
error
(
"Pathway definition is invalid! Another RF pulse was encountered before the number of readouts expected from `nreadout` where detected."
)
end
...
...
@@ -296,7 +300,7 @@ function walk_pathway!(block::BaseBuildingBlock, walker::PathwayWalker, pulse_ef
popfirst!
(
pulse_effects
)
continue
end
elseif
(
interruption
.
object
isa
InstantReadout
||
interruption
.
object
isa
ADC
)
elseif
interruption
isa
ReadoutComponent
if
length
(
pulse_effects
)
>
0
continue
end
...
...
@@ -307,7 +311,7 @@ function walk_pathway!(block::BaseBuildingBlock, walker::PathwayWalker, pulse_ef
end
# apply gradients up till interrupt
for
part
in
waveform_sequence
(
ao
,
current_index
,
index_inter
)
for
part
in
waveform_sequence
(
block
,
current_index
,
index_inter
)
update_walker_gradient!
(
part
,
walker
,
current_time
)
current_time
=
current_time
+
duration
(
part
)
end
...
...
@@ -324,7 +328,7 @@ function walk_pathway!(block::BaseBuildingBlock, walker::PathwayWalker, pulse_ef
end
# apply remaining gradients
for
part
in
waveform_sequence
(
ao
,
current_index
,
nothing
)
for
part
in
waveform_sequence
(
block
,
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