This code edit is a quick fix to enable JEMRIS-generated pulseq .seq files (of an older version) to be read. The difference between the old and new Pulseq versions is in the number of fields for RF and trapezoidal gradients.
For RF pulses, PyPulseq 1.2.0 version uses [id, amplitude, mag_id, phase_id, delay, freq, phase], but the JEMRIS version uses [id, amplitude, mag_id, phase_id, freq, phase]
For trapezoidal gradients, PyPulseq 1.2.0 uses [id, amplitude, rise, flat, fall, delay], but JEMRIS uses [id, amplitude, rise, flat, fall]
NOTE : An empty section, [JEMRIS], must be manually added to the seq file before seq.read() can be called to parse it.
Example:
# Pulseq sequence format
# Created by JEMRIS 2.8.3
[JEMRIS]
[DEFINITIONS]
id 1
Num_Blocks 192
# Format of blocks:
# # D RF GX GY GZ ADC
[BLOCKS]
1 0 1 0 0 0 0
2 1 0 0 0 0 0
3 0 0 1 2 0 0
......
This code edit is a quick fix to enable JEMRIS-generated pulseq .seq files (of an older version) to be read. The difference between the old and new Pulseq versions is in the number of fields for RF and trapezoidal gradients.
NOTE : An empty section, [JEMRIS], must be manually added to the seq file before seq.read() can be called to parse it.
Example: