InversionPreparation

InversionPreparation#

class pypulseqpp.sequences.InversionPreparation[source]#

Bases: RfModule

Non-selective adiabatic inversion, followed by an optional crusher.

The module contains no inversion-time delay; the caller adds it. A pulse whose peak exceeds MAX_B1_DERATE of system.max_b1 is lengthened at the same adiabaticity and swept bandwidth, up to ADIABATIC_MAX_STRETCH (2) times duration_s, and past it held there with its adiabaticity lowered, to no less than ADIABATICITY_FLOOR (0.75) of adiabaticity.

Parameters:
  • system (pypulseqpp.Opts) – System limits.

  • duration_s (float, default=0.01) – Inversion pulse duration (s) while the pulse fits the system’s peak B1; a shorter pulse needs a faster sweep, which may violate the adiabatic condition.

  • spoiling_cycles (float, default=4.0) – Cycles of dephasing of the crusher across voxel_size_m. Zero omits the crusher.

  • voxel_size_m (float, default=0.001) – Length the dephasing is counted over (m); the smallest voxel dimension.

  • axis ({'z', 'x', 'y'}, default='z') – Gradient channel of the crusher.

  • pulse_type (str, default='hypsec') – Adiabatic sweep family.

  • bandwidth_hz (float, default=40000.0) – Frequency width of the sweep (Hz); unused by 'hypsec', which sweeps mu * beta (make_adiabatic_pulse()).

  • adiabaticity (float, default=4) – Sweep-rate margin over the adiabatic condition while the pulse fits the system’s peak B1.

  • labels (sequence of str, default=None) – Labels the inversion block sets to 0, to be changed per shot by the caller.

Attributes:
  • rf_prep (RfEvent) – The inversion pulse.

  • pulse_duration (float) – Duration the pulse was designed at (s): duration_s, or longer under the system’s peak B1.

  • adiabaticity (float) – Adiabaticity the pulse was designed at: the requested one, or lower under the system’s peak B1.

  • gz_spoil (GradEvent) – The crusher, when spoiling_cycles is nonzero.

  • prep_labels (LabelSetEvent or list of LabelSetEvent) – One per name in labels, in order. Absent when labels is empty, and a bare event rather than a list when there is one.

Raises:

ValueError – If voxel_size_m is not positive, spoiling_cycles is negative, axis is not a gradient channel, or the pulse cannot fit the system’s peak B1.

Examples

>>> import pypulseqpp.sequences as design
>>> import pypulseqpp as pp
>>> prep = design.InversionPreparation(pp.Opts(), duration_s=8e-3)
>>> len(prep.blocks)
2
>>> len(design.InversionPreparation(pp.Opts(), spoiling_cycles=0).blocks)
1

Under an 11.2 uT limit the 13.2 uT pulse is lengthened, at the same adiabaticity, to peak below 0.9 of it:

>>> prep = design.InversionPreparation(pp.Opts(max_b1=11.2))
>>> round(prep.pulse_duration * 1e3, 2), prep.adiabaticity
(17.26, 4)
../_images/pypulseqpp-sequences-InversionPreparation-1_00.svg

(svg)#

../_images/pypulseqpp-sequences-InversionPreparation-1_01.svg

(svg)#

Methods

init_module

Build the module's block layout; implemented by the subclass.

publish

Publish events from the caller's locals and register keyword aliases.

register

Publish named events, whether or not they were added to a block.

sim_rf

Simulate this module's pulse across off-resonance.

Attributes

blocks

Block tuples in play order, holding the original event objects.

duration

Duration of the module (s).

seq

Sequence holding the module's construction-time block layout.