You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The seq.write function generates files that cannot be read by seq.read because the gradient section name is different between the two ([GRAD] according to the write function and [GRADIENTS] as expected by the read function).
To Reproduce
Run the following code (under Pypulseq 1.2.1):
from pypulseq.Sequence.sequence import Sequence
from pypulseq.make_sinc_pulse import make_sinc_pulse
from pypulseq.make_extended_trapezoid import make_extended_trapezoid
from pypulseq.opts import Opts
from math import pi
system = Opts()
seq = Sequence()
g = make_extended_trapezoid(channel='x',times=[0,0.01],amplitudes=[1,2],system=system)
seq.add_block(g)
seq.write('test.seq')
seq2 = Sequence()
seq2.read('test.seq')
Expected behavior
The sequence should be read without generating an error.
Error message
When run, this error appears:
File "(personal system path)\pypulseq\Sequence\read_seq.py", line 57, in read
raise ValueError(f'Unknown section code: {section}')
ValueError: Unknown section code: [GRADIENTS]
Desktop (please complete the following information):
OS: Microsoft Windows 10 Pro
Version: pypulseq 1.2.1
The text was updated successfully, but these errors were encountered:
Describe the bug
The seq.write function generates files that cannot be read by seq.read because the gradient section name is different between the two ([GRAD] according to the write function and [GRADIENTS] as expected by the read function).
To Reproduce
Run the following code (under Pypulseq 1.2.1):
Expected behavior
The sequence should be read without generating an error.
Error message
When run, this error appears:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: