plot_rf#
- pypulseqpp.plot.plot_rf()[source]#
Draw an RF pulse’s
|B1|envelope beside the profile it produces.- Parameters:
source (Sequence, sequence module or RF event) – Source of the RF event. From a sequence, only the pulse’s own block is simulated unless a range is given.
pulse (RF event or str, default=None) – Which pulse of
source: an event, or theuseit is tagged with ("refocusing"finds a spin echo’s refocusing pulse). The first pulse by default.time_range (sequence, default=None) – Blocks of a sequence to simulate over, where the profile needs more than the pulse’s own block.
block_range (sequence, default=None) – Blocks of a sequence to simulate over, where the profile needs more than the pulse’s own block.
plane (str, default=None) – One of
x,y,zandf(off-resonance) for a profile, or two for a plane drawn as|Mxy|andMzheatmaps. By default the axis the pulse is selective along, orfwithout a gradient.kind ({"excitation", "refocusing", "inversion", "saturation"}, default=None) – Which response a profile draws; the pulse’s
useby default.extent (float or pair of float, default=None) – Limits of the first and second axis: a half-width about zero or a
(low, high)pair, in mm for a position and Hz for off-resonance.span (float or pair of float, default=None) – Limits of the first and second axis: a half-width about zero or a
(low, high)pair, in mm for a position and Hz for off-resonance.samples (int, default=401) – Points per axis; a plane caps at 91 a side.
dt (float, default=8e-06) – Integration step in seconds, wherever the window is integrated rather than the pulse alone.
whole (bool, default=False) – Integrate everything in the window – every pulse, gradient and the precession between them – rather than the pulse alone. A plane is always integrated this way.
title (str, default=None)
plot_now (bool, default=True) – Show the figure before returning.
- Return type:
- Raises:
ValueError – If
sourceholds no RF event, or the range given holds none.
Notes
A single pulse against one axis is
pypulseqpp.sim_rf(), which ignores the gradient: a position axis is its frequency axis over the selection gradient at the pulse centre. Everything else integratespypulseqpp.sim_bloch()over the window without relaxation.