make_epi_shot_offsets#
- pypulseqpp.make_epi_shot_offsets()[source]#
Return the phase-encoding offsets of one EPI shot, relative to its first echo.
result[e]is(Δky, Δkz), in encoded lines and partitions, of the view acquired at echoerelative to the view acquired at echo 0 of the same shot;result[0]is always(0, 0). For a shot whose first echo acquires the view(y0, z0), echoeacquires(y0, z0) + result[e]. The routine does not select the global acquisition support, does not choose the shot origin(y0, z0), which the scan loop chooses, and creates no Pulseq labels.With
R_y = accelerationandS = segments, the line offset of'linear'and'caipi'isΔky_e = e S R_y.Sshots with originsy0, y0 + R_y, ..., y0 + (S - 1) R_ytherefore interleave to acquire everyR_y-th line.'caipi'adds the partition offset of the CAIPIRINHA lattice withR_z = partition_accelerationand shiftΔz = caipi_shift, reduced moduloR_z, so the partition blips cycle through one lattice period; the offsets tilemake_caipirinha_mask()exactly.'zigzag'alternates between an outward and a return pass acrossextentlines, the return pass displaced by half a blip.- Parameters:
etl (int) – Echo-train length: the number of echoes, and of rows returned.
scheme ({'linear', 'caipi', 'zigzag'}, default='linear') –
'linear': segmented or single-shot EPI,Δkz = 0.'caipi': segmented blipped-CAIPI.'zigzag': repeated up-and-down traversal of one phase-encoding segment, which acquires the same lines at several echo times;Δkz = 0.acceleration (int, default=1) – In-plane undersampling factor
R_y.segments (int, default=1) – Number of shots
Samong which the lines are interleaved. The blip isS R_ylines.partition_acceleration (int, default=1) – Partition undersampling factor
R_z, the period of the partition offsets.'caipi'only.caipi_shift (int, default=1) – CAIPIRINHA shift
Δz: partitions the lattice is displaced by per acquired line.'caipi'only.extent (int or None, default=None) – Phase-encoding lines spanned by one pass. Required by
'zigzag'and rejected by the other schemes.
- Returns:
Integer array of shape
(etl, 2):[Δky, Δkz]of each echo, relative to echo 0.- Return type:
- Raises:
ValueError – If a count is out of range,
schemeis unknown, orextentis given for a scheme other than'zigzag'or omitted for it.
See also
make_caipirinha_maskthe lattice the
'caipi'offsets tile.make_cartesian_plane_samplingacquisition support of a Cartesian plane.
make_traversal_orderloop order over shots or slices.
Examples
Four echoes at twofold acceleration step two lines per echo:
>>> import pypulseqpp as pp >>> offsets = pp.make_epi_shot_offsets(4, acceleration=2) >>> offsets.tolist() [[0, 0], [2, 0], [4, 0], [6, 0]]
The offsets are relative. With two segments the blip is four lines, and shots with origins at lines 3 and 5 acquire interleaved lines:
>>> offsets = pp.make_epi_shot_offsets(4, acceleration=2, segments=2) >>> (offsets + [3, 0])[:, 0].tolist() [3, 7, 11, 15] >>> (offsets + [5, 0])[:, 0].tolist() [5, 9, 13, 17]
Segmented blipped-CAIPI with
R_z = 3cycles the partition offset through one lattice period:>>> pp.make_epi_shot_offsets( ... 6, scheme="caipi", acceleration=2, partition_acceleration=3 ... ).tolist() [[0, 0], [2, 1], [4, 2], [6, 0], [8, 1], [10, 2]]
A zigzag pass turns at
extent, and the return pass is displaced by half a blip:>>> offsets = pp.make_epi_shot_offsets( ... 9, scheme="zigzag", acceleration=4, extent=12 ... ) >>> offsets[:, 0].tolist() [0, 4, 8, 12, 10, 6, 2, 0, 4]