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 pulse. For a sequence, only the pulse’s own block is simulated unless a range is given; a module is simulated in full.
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) – Range to simulate over, for a sequence source: two times (s), or the first and last block (1-based, inclusive). At most one.
block_range (sequence, default=None) – Range to simulate over, for a sequence source: two times (s), or the first and last block (1-based, inclusive). At most one.
plane (str, default=None) – One of
x,y,zandf(off-resonance) for a profile, or two for a plane drawn as|Mxy|andMzheatmaps. WhenNone, the axis the pulse is selective along, orfwithout a gradient.kind (str, default=None) – Response a profile draws:
'refocusing'draws refocusing efficiency,'inversion','saturation'and'preparation'drawMz, and any other value|Mxy|. The pulse’susewhenNone.extent (float or pair of float, default=None) – Limits of the first and second axis of
plane: a half-width about zero or a(low, high)pair, in mm for a position and Hz for off-resonance. Derived from the pulse whenNone.span (float or pair of float, default=None) – Limits of the first and second axis of
plane: a half-width about zero or a(low, high)pair, in mm for a position and Hz for off-resonance. Derived from the pulse whenNone.samples (int, default=401) – Points per axis; a plane caps at 91 a side.
dt (float, default=8e-06) – Integration step (s) where 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) – Figure title.
plot_now (bool, default=True) – Show the figure before returning.
- Returns:
The envelope panel (
|B1|in microtesla against time in ms) and the profile, or the two heatmaps for a plane.- Return type:
- Raises:
ValueError – If
sourceor the range given holds no RF event,planeis not one or two ofx,y,z,f, or a single position axis is not the pulse’s selection axis andwholeis False.TypeError – If
sourceis not a Sequence, a sequence module or an RF event.
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.