diff --git a/src/all_building_blocks/all_building_blocks.jl b/src/all_building_blocks/all_building_blocks.jl index 4ae44dcc43319e2ea235a6b4e4444847280fd646..a1a17b4fd2c10ead5c8429b3f964722b4436ea89 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 728ce2e4809cf9e21db680fbb7b57d924baaff9c..4e75207ec85fe7f81813965ed9b1ffe5fbc5394c 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)