Skip to content
Snippets Groups Projects
Unverified Commit 45f32a25 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

Add instantPulse/Gradient to BuildingBlock events

parent 98cc9c9a
No related branches found
No related tags found
1 merge request!3Add InstantPulse and InstantGradient pulseq extension support
......@@ -53,6 +53,8 @@ function BuildingBlock(pulseq::PulseqBlock; version, BlockDurationRaster, Radiof
))
end
append!(events, pulseq.ext)
grads = [pulseq.gx, pulseq.gy, pulseq.gz]
min_duration = max(
maximum(e[1] + variables.duration(e[2]) for e in events; init=0.),
......@@ -68,6 +70,9 @@ function BuildingBlock(pulseq::PulseqBlock; version, BlockDurationRaster, Radiof
end
times = sort(unique(vcat([0., stated_duration], _control_times.(grads, GradientRasterTime)...)))
if length(times) == 1
push!(times, 0.)
end
waveform = [(t, _get_amplitude.(grads, t, GradientRasterTime)) for t in times]
return BuildingBlock(waveform, events)
......
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