Skip to content
Snippets Groups Projects
Verified Commit 770fb545 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

update walker for new sequence/building_block/component separation

parent 5746cf0e
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ include("trapezoids.jl") ...@@ -5,7 +5,7 @@ include("trapezoids.jl")
include("spoilt_slice_selects.jl") include("spoilt_slice_selects.jl")
include("wait_blocks.jl") include("wait_blocks.jl")
import .BaseBuildingBlocks: waveform, waveform_sequence, events, BaseBuildingBlock import .BaseBuildingBlocks: waveform, waveform_sequence, events, BaseBuildingBlock, get_parts
import .BuildingBlocks: BuildingBlock import .BuildingBlocks: BuildingBlock
import .Trapezoids: Trapezoid, SliceSelect, LineReadout import .Trapezoids: Trapezoid, SliceSelect, LineReadout
import .SpoiltSliceSelects: SpoiltSliceSelect import .SpoiltSliceSelects: SpoiltSliceSelect
......
...@@ -4,7 +4,8 @@ import StaticArrays: SVector, SMatrix ...@@ -4,7 +4,8 @@ import StaticArrays: SVector, SMatrix
import ..Components: NoGradient, RFPulseComponent, ReadoutComponent, InstantGradient, GradientWaveform import ..Components: NoGradient, RFPulseComponent, ReadoutComponent, InstantGradient, GradientWaveform
import ..AllSequences: BaseSequence, Sequence import ..AllSequences: BaseSequence, Sequence
import ..AllBuildingBlocks: BaseBuildingBlock, waveform, events, get_parts import ..AllBuildingBlocks: BaseBuildingBlock, waveform, events, get_parts
import ..Variables: qvec, qval, bmat_gradient, VariableType, start_time, effective_time, duration, qval_square, TR import ..Variables: qvec, qval, bmat_gradient, VariableType, effective_time, duration, qval_square, TR
import ..ContainerBlocks: start_time
import ..Alternatives: AlternativeBlocks import ..Alternatives: AlternativeBlocks
...@@ -249,9 +250,9 @@ PathwayWalker() = PathwayWalker( ...@@ -249,9 +250,9 @@ PathwayWalker() = PathwayWalker(
) )
""" """
walk_pathway!(bb::BuildingBlock, walker::PathwayWalker, pulse_effects::Vector, nreadout::Ref{Int}, start_time) walk_pathway!(bb::Sequence/BuildingBlock, walker::PathwayWalker, pulse_effects::Vector, nreadout::Ref{Int}, start_time)
Computes the effect of a specific [`BuildingBlock`](@ref) (starting at `start_time`) on the [`PathwayWalker`](@ref). Computes the effect of a specific [`ContainerBlock`](@ref) (starting at `start_time`) on the [`PathwayWalker`](@ref).
For individual pulses and gradients, the following behaviour is implemented: For individual pulses and gradients, the following behaviour is implemented:
- If a pulse is encountered, call [`update_walker_pulse!`](@ref)`(walker, pulse_effects, pulse_effective_time)` - If a pulse is encountered, call [`update_walker_pulse!`](@ref)`(walker, pulse_effects, pulse_effective_time)`
...@@ -287,7 +288,7 @@ function walk_pathway!(seq::BaseSequence, walker::PathwayWalker, pulse_effects:: ...@@ -287,7 +288,7 @@ function walk_pathway!(seq::BaseSequence, walker::PathwayWalker, pulse_effects::
return false return false
end end
function walk_pathway!(block::BuildingBlock, walker::PathwayWalker, pulse_effects::Vector{Symbol}, nreadout::Ref{Int}, block_start_time::VariableType) function walk_pathway!(block::BaseBuildingBlock, walker::PathwayWalker, pulse_effects::Vector{Symbol}, nreadout::Ref{Int}, block_start_time::VariableType)
current_index = nothing current_index = nothing
current_time = block_start_time current_time = block_start_time
for (index_inter, interruption) in events(block) for (index_inter, interruption) in events(block)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment