2D 32 shot spiral scan with 0th moment compensation. TR = 15 ms, TE = 2.5 ms, FA = 60º.  Number of dummy scan dependence. The number of subvoxels is 1×1×4. The total number of subvoxel is 13,572,096. The calculation time was 7 s.

 

Sequence chart visualized by the SequenceViewer:

One data acquisition sequence.

 

Six acquisition sequence.

 

Entire sequence with dummy scan.

 

Python sequence code:

from psdk import *
import numpy as np

gamma = 42.57747892 # [MHz/T]
TR = 15.0e+3 # [us]
TE = 2.5e+3 # [us]
NR = 4096 # Number of readout points
NSHOT = 32 # Number of shots
fov = [256.0, 256.0, 256.0] # [mm]
dwell_time = 2.0 # [us]
slice_width = 5.0 # [mm]
gz_value = 1.25 / (slice_width * 1.0e-3) / gamma # [mT/m]
gx_rise_time = 300.0 # [us]
gy_rise_time = 300.0 # [us]
gz_rise_time = 300.0 # [us]
PW = 1600.0 # [us]
excitation_pulse_flip_angle = 60.0 # [degree]
gx_waveform = np.fromfile('GX.dbl', dtype=np.float64)
gy_waveform = np.fromfile('GY.dbl', dtype=np.float64)

def sinc_with_hamming(flip_angle, pulse_width, points, *, min=-2.0*np.pi, max=2.0*np.pi):
    x0 = np.arange(min, max, (max - min) / points)
    x1 = x0 + (max - min) / points
    y = (np.sinc(x0 / np.pi) + np.sinc(x1 / np.pi)) * 0.5 * np.hamming(points)
    return flip_angle * y * points / (y.sum() * pulse_width * 360.0e-6 * gamma)

def phase_shift_angle(i):
    phi = i * (i + 1) / 2 * 0.0 / 360
    phi -= round(phi)
    return 2.0 * np.pi * phi

with Sequence('2D Spiral'):

    with Block('Dummy', PW * 1.5 + 4.0*gz_rise_time):
        GZ(0.0, gz_value, gz_rise_time)
        RF(gz_rise_time, sinc_with_hamming(excitation_pulse_flip_angle, PW, 160), PW / 160, 
        phase=([phase_shift_angle(i) for i in range(100)], ['SHOT']))
        GZ(PW + gz_rise_time, -gz_value, gz_rise_time * 2.0)
        GZ(PW * 1.5 + gz_rise_time * 3.0, 0.0, gz_rise_time)

    with Block('Excitation', PW * 1.5 + 4.0*gz_rise_time):
        GZ(0.0, gz_value, gz_rise_time)
        RF(gz_rise_time, sinc_with_hamming(excitation_pulse_flip_angle, PW, 160), PW / 160, 
        phase=([phase_shift_angle(i + 20) for i in range(NSHOT)], ['SHOT']))
        GZ(PW + gz_rise_time, -gz_value, gz_rise_time * 2.0)
        GZ(PW * 1.5 + gz_rise_time * 3.0, 0.0, gz_rise_time)
        
    with Block('Readout', 8192):
        GX.waveform(0.0, ([gx_waveform[i * 4096:(i+1)*4096:] for i in range(NSHOT)], ['SHOT']), 2.0)
        GY.waveform(0.0, ([gy_waveform[i * 4096:(i+1)*4096:] for i in range(NSHOT)], ['SHOT']), 2.0)
        AD(0.0, NR, dwell_time)
                
    with Main():
        with Loop('SHOT', 10):
            BlockRef('Dummy')
            WaitUntil(TE + PW * 0.5 + gz_rise_time)
            WaitFor(8192)
            WaitUntil(TR)
        with Loop('SHOT', NSHOT):
            BlockRef('Excitation')
            WaitUntil(TE + PW * 0.5 + gz_rise_time)
            BlockRef('Readout')
            WaitUntil(TR)