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

Do not add non-existing gradient block

parent fabbbc3f
No related branches found
No related tags found
No related merge requests found
...@@ -113,7 +113,7 @@ function waveform_sequence(bb::BaseBuildingBlock, first, last) ...@@ -113,7 +113,7 @@ function waveform_sequence(bb::BaseBuildingBlock, first, last)
parts = Tuple{Any, GradientWaveform}[] parts = Tuple{Any, GradientWaveform}[]
for key in keys(bb) for key in keys(bb)
if bb[key] isa GradientWaveform if bb[key] isa GradientWaveform
if started if started && !isnothing(current_grad_key)
push!(parts, (current_grad_key, isnothing(current_start) ? bb[current_grad_key] : split_gradient(bb[current_grad_key], current_start)[2])) push!(parts, (current_grad_key, isnothing(current_start) ? bb[current_grad_key] : split_gradient(bb[current_grad_key], current_start)[2]))
end end
current_grad_key = key current_grad_key = key
......
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