From 770fb5458edcdaec897f3eb63cf623b632fbd487 Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
Date: Thu, 15 Feb 2024 15:40:18 +0000
Subject: [PATCH] update walker for new sequence/building_block/component
 separation

---
 src/all_building_blocks/all_building_blocks.jl | 2 +-
 src/pathways.jl                                | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/all_building_blocks/all_building_blocks.jl b/src/all_building_blocks/all_building_blocks.jl
index 4ae44dc..a1a17b4 100644
--- a/src/all_building_blocks/all_building_blocks.jl
+++ b/src/all_building_blocks/all_building_blocks.jl
@@ -5,7 +5,7 @@ include("trapezoids.jl")
 include("spoilt_slice_selects.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 .Trapezoids: Trapezoid, SliceSelect, LineReadout
 import .SpoiltSliceSelects: SpoiltSliceSelect
diff --git a/src/pathways.jl b/src/pathways.jl
index 728ce2e..4e75207 100644
--- a/src/pathways.jl
+++ b/src/pathways.jl
@@ -4,7 +4,8 @@ import StaticArrays: SVector, SMatrix
 import ..Components: NoGradient, RFPulseComponent, ReadoutComponent, InstantGradient, GradientWaveform
 import ..AllSequences: BaseSequence, Sequence
 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
 
 
@@ -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:
 - 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::
     return false
 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_time = block_start_time
     for (index_inter, interruption) in events(block)
-- 
GitLab