TransformFOV#
- class pypulseqpp.TransformFOV[source]#
Bases:
objectGeometry prescription applied to an existing sequence.
Scales gradient amplitudes per channel axis, translates the field of view in metres along the channel axes, or the logical axes with
through_rotation, and composes a rotation after each block’s own rotation. A rotation given with a translation does not turn the translation. The field of view scales inversely with gradient amplitude, so halving an axis’s scale doubles the field of view along it.- Parameters:
rotation (ArrayLike | Rotation, default=None) – Prescription orientation as a 3-by-3 matrix or SciPy rotation. Composed after the rotation already attached to each block. A matrix with determinant -1 is played as the rotation
rotation @ diag(1, 1, -1)after negating the gradient on channel axis z, with each block’s own rotation conjugated by that reflection; seereflected_axis.translation (Sequence[float], default=None) – Three offsets in metres, along the channel axes, or along the logical axes with
through_rotation.scale (Sequence[float], default=None) – Gradient amplitude multipliers along the three channel axes. A factor of zero disables encoding on that axis.
transform (ArrayLike, default=None) – 4-by-4 homogeneous matrix, mutually exclusive with
rotationandtranslation. Its translation is in the output frame and is converted into the frame oftranslationusing the transpose of its rotation.use_rotation_extension (bool, default=True) – Must be True; waveform-baked rotation is not implemented.
through_rotation (bool, default=False) – Translate along the logical axes: a block carrying rotation
Ris translated by the rotated gradientsR ginstead of its channel-axis gradientsg. Suited to designs whose rotations are part of the encoding, such as radial spokes; leave False for a sequence whose rotations are a prescription composed onto it.system (Opts, default=None) – Stored for compatibility; not used to validate transformed events.
- Attributes:
quaternion (NDArray[np.float64] | None) – Scalar-first unit quaternion of the prescription’s rotation.
reflected_axis (int | None) – Channel axis whose gradient is negated to play an improper
rotation: 2, for z. None for a proper one.block_k_origin (tuple[float, float, float]) – k-space position entering the next processed range, in 1/m, in the frame of the translation. Reset at excitation and inverted at refocusing, at the RF centre.
swept_k (tuple[float, float, float]) – Cumulative gradient area, in 1/m, in the frame of the translation, without RF resets. RF and ADC shift phases share this reference.
Notes
A nonzero translation updates
block_k_originandswept_kon each application. A block range does not integrate the blocks before it, so ranges must be applied consecutively with the same object, or the two attributes set to the state entering the first block of the range.Examples
>>> import pypulseqpp as pp >>> seq = pp.Sequence(pp.Opts()) >>> seq.add_block(pp.make_trapezoid("y", area=500, duration=2e-3)) 1 >>> halved = pp.TransformFOV(scale=(1, 0.5, 1)).apply_to_sequence(seq) >>> halved.get_block(1).gy.amplitude == 0.5 * seq.get_block(1).gy.amplitude True
Methods
The reference toolbox's name for the same thing. |
|
Apply the scaling, translation and rotation, in that order, and return the sequence. |
|
Return ADC trajectories on the channel axes, in 1/m. |