diff --git a/src/all_building_blocks/base_building_blocks.jl b/src/all_building_blocks/base_building_blocks.jl index c7194d2925dd6f6699d3fa681a4d54916d373646..15a6f66a57b9fe9e26ee0df78b8407b93dd3bab2 100644 --- a/src/all_building_blocks/base_building_blocks.jl +++ b/src/all_building_blocks/base_building_blocks.jl @@ -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 diff --git a/src/pathways.jl b/src/pathways.jl index 4e75207ec85fe7f81813965ed9b1ffe5fbc5394c..4d6afd63633a9b204159a5ff3e5d7ba634589de6 100644 --- a/src/pathways.jl +++ b/src/pathways.jl @@ -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