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

Fix waveform_sequence between events

parent 277ebe21
No related branches found
No related tags found
No related merge requests found
module BaseBuildingBlocks
import ...ContainerBlocks: ContainerBlock
import ...Components: BaseComponent, GradientWaveform, EventComponent, NoGradient, ChangingGradient, ConstantGradient, split_gradient
import ...Variables: qval, bmat_gradient
import ...Variables: qval, bmat_gradient, effective_time
"""
Basic BuildingBlock, which can consist of a gradient waveforms with any number of RF pulses/readouts overlaid
......@@ -122,14 +122,14 @@ function waveform_sequence(bb::BaseBuildingBlock, first, last)
if key == first
@assert !started
started = true
current_started = effective_time(bb[key])
current_start = effective_time(bb[key])
end
if key == last
@assert started
if isnothing(current_started)
if isnothing(current_start)
push!(parts, (current_grad_key, split_gradient(bb[current_grad_key], effective_time(bb[key]))[1]))
else
push!(parts, (current_grad_key, split_gradient(bb[current_grad_key], current_started, effective_time(bb[key]))[2]))
push!(parts, (current_grad_key, split_gradient(bb[current_grad_key], current_start, effective_time(bb[key]))[2]))
end
end
end
......
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