InversionPreparation

InversionPreparation#

class pypulseqpp.sequences.InversionPreparation[source]#

Bases: RfModule

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

The acquisition loop supplies the inversion-time delay.

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

  • duration_s (float, default=0.01) – Inversion pulse duration (s). Shorter durations increase the required sweep rate and may violate the adiabatic condition.

  • spoiling_cycles (float, default=4.0) – Dephasing of the crusher, in cycles 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, since that is the one that has to be spoiled.

  • axis ({'z', 'x', 'y'}, default='z') – Crusher axis.

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

  • bandwidth_hz (float, default=40000.0) – Frequency width of the sweep (Hz).

  • adiabaticity (int, default=4) – Sweep-rate margin over the adiabatic condition.

  • labels (sequence of str, default=None) – Counters emitted on the inversion block, which starts each shot. The module creates the label events; the acquisition loop assigns their per-shot values.

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

  • 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, or axis is not a gradient channel.

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
../_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 without requiring prior block registration.

sim_rf

Simulate this module's pulse across off-resonance.

Attributes

blocks

Return block tuples in play order, retaining the original event objects.

duration

Duration of the module in seconds.

seq

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