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

Add InstantGradient to plot

parent 29098a1e
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ module Plot
import MakieCore: generic_plot_attributes!
import ..Containers: BaseBuildingBlock, BaseSequence, waveform, events, start_time, ndim_grad, waveform_sequence
import ..Variables: duration, flip_angle, phase, make_generic, gradient_orientation
import ..Components: RFPulseComponent, ADC, InstantPulse, NoGradient
import ..Components: RFPulseComponent, ADC, InstantPulse, NoGradient, InstantGradient1D, InstantGradient3D
"""
SinglePlotLine(times, amplitudes, event_times, event_amplitudes)
......@@ -151,6 +151,12 @@ function SequenceDiagram(bbb::BaseBuildingBlock)
[0., 0., 1., 1., 0., 0.],
)
end
elseif event isa InstantGradient1D
kwargs[:G] = SinglePlotLine([0., duration(bbb)], [0., 0.], [delay], [event.qval])
elseif event isa InstantGradient3D
for (index, symbol) in enumerate([:Gx, :Gy, :Gz])
kwargs[symbol] = SinglePlotLine([0., duration(bbb)], [0., 0.], [delay], [event.qval[index]])
end
end
end
return SequenceDiagram(duration(bbb); kwargs...)
......
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