imr-framework / pypulseq

Pulseq in Python
https://pypulseq.readthedocs.io
GNU Affero General Public License v3.0
115 stars 62 forks source link

Enable reading of JEMRIS-generated .seq files #30

Closed tonggehua closed 4 years ago

tonggehua commented 4 years ago

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:

# 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

......