Sequence.plot#
- Sequence.plot()[source]#
Open the sequence in the SeqEyes viewer.
SeqEyes is an optional dependency, installed with
pip install 'pypulseqpp[plot]'. It reads the sequence from a file, which holds only the selected range.- Parameters:
label (str, default='') – Upstream’s ADC label display. Ignored.
show_blocks (bool, default=False) – Upstream’s block-boundary grid. Ignored.
save (bool, default=False) – Upstream’s figure saving. Ignored.
time_range (Sequence[float], default=(0, np.inf)) – The seconds to draw, measured from the start of the scan.
time_disp ({'s', 'ms', 'us'}, default='s') – Upstream’s time unit. Ignored.
grad_disp ({'kHz/m', 'mT/m'}, default='kHz/m') – Upstream’s gradient unit. Ignored.
plot_now (bool, default=True) – Wait for the window to be closed before returning. When False, the window is left open and the returned viewer is live.
clear (bool, default=True) – Upstream’s figure clearing. Ignored.
overlay (object, default=None) – Upstream’s plot to overlay. Ignored.
stacked (bool, default=False) – Upstream’s single stacked figure. Ignored.
show_guides (bool, default=False) – Upstream’s cursor guides. Ignored.
block_range (Sequence[int], default=None) – The first and last block to draw, 1-based and inclusive.
tr_range (Sequence[int], default=None) – The first and last repetition to draw, 1-based and inclusive. A repetition is the period of the block definition stream from the first block; a sequence that does not repeat is one.
- Returns:
The window: Viewer.wait blocks until it is closed and Viewer.close closes it.
- Return type:
Viewer
- Raises:
ModuleNotFoundError – If SeqEyes is not installed.
ValueError – If more than one range is given or a range is outside the sequence.
- Warns:
UserWarning – When an ignored parameter is given a value other than its default.
Notes
The ignored parameters are upstream’s, accepted so a script written for it runs: SeqEyes draws units, labels and block edges its own way, from its own settings.
Examples
>>> import pypulseqpp as pp >>> seq = pp.Sequence(pp.Opts()) >>> seq.add_block(pp.make_trapezoid("x", area=1000, duration=2e-3)) 1 >>> viewer = seq.plot(block_range=(1, 1), plot_now=False) >>> viewer.close()