DiffusionPreparation#
- class pypulseqpp.sequences.DiffusionPreparation[source]#
Bases:
RfModuleNon-selective diffusion preparation with hard tip-down and storage pulses.
A pair of identical diffusion lobes surrounds one refocusing pulse. The pair is designed on one axis at
b_value; scale it for lower b-values (scale_for()) and rotate it per direction. The closing spoiler is separate from the pair. The lobes turn with the prescription, so a direction is in its logical frame, asread_diffusion_table()returns it.- Parameters:
system (pypulseqpp.Opts) – System limits.
b_value (float) – Design b-value (s/mm^2), the largest the module plays; lower values are reached by scaling the lobes.
gradient_duration_s (float, default=0.02) – Duration of each diffusion lobe (s).
gradient_separation_s (float, default=0.03) – Onset-to-onset separation of the two lobes (s); the gap between them holds the refocusing pulse.
pulse_duration_s (float, default=0.0005) – Duration of each 90 degree pulse (s).
refocusing_duration_s (float, default=0.001) – Duration of the 180 degree pulse (s).
axis ({'z', 'x', 'y'}, default='z') – Gradient channel the pair is designed on.
spoiling_cycles (float, default=4.0) – Cycles of dephasing of the closing spoiler across
voxel_size_m. Zero omits the spoiler.voxel_size_m (float, default=0.001) – Length the dephasing is counted over (m).
labels (sequence of str, default=None) – Labels set to 0 on the first pulse’s block, to be changed per shot by the caller.
- Attributes:
rf_prep (RfEvent) – The 90 degree tip-down pulse.
rf_ref (RfEvent) – The 180 degree refocusing pulse between the lobes.
rf_store (RfEvent) – The 90 degree storage pulse.
g_diff (TrapEvent) – The diffusion lobe at the design b-value, played identically on both sides of the refocusing pulse.
wait_first, wait_last (DelayEvent) – The gaps before and after the refocusing pulse; each is absent when zero.
gx_spoil, gy_spoil, gz_spoil (GradEvent) – Spoiler gradient of each axis; absent when
spoiling_cyclesis zero.prep_labels (LabelSetEvent or list of LabelSetEvent) – One per name in
labels.b_value (float) – Design b-value of the lobes as played (s/mm^2).
max_b_value (float) – b-value this timing reaches at
system.max_grad(s/mm^2).
- Raises:
ValueError – If a duration is out of order, the separation cannot hold the refocusing pulse, or the b-value exceeds what the system can reach – the message says what it can.
Examples
>>> import pypulseqpp.sequences as design >>> import pypulseqpp as pp >>> system = pp.Opts(max_grad=40, grad_unit="mT/m", max_slew=150, slew_unit="T/m/s") >>> prep = design.DiffusionPreparation(system, 500.0) >>> round(prep.b_value) 500 >>> round(prep.scale_for(125.0), 3) 0.5
The whole module, pulses and diffusion lobes together. Both lobes have the same sign; the refocusing pulse between them inverts the phase accrued during the first, so the pair produces diffusion weighting rather than cancelling:
(
svg)
Methods
Build the module's block layout; implemented by the subclass. |
|
Publish events from the caller's locals and register keyword aliases. |
|
Publish named events, whether or not they were added to a block. |
|
Return the gradient-amplitude factor for a requested b-value. |
|
Simulate this module's pulse across off-resonance. |
Attributes