imr-framework / pypulseq

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

Fix a bug, that returns the wrong trigger channel in get_block #67

Closed mavel101 closed 2 years ago

mavel101 commented 2 years ago

This commit fixes a bug, where the wrong trigger channel is returned or get_block might even fail completely for the "ext1" trigger channel.

sravan953 commented 2 years ago

@mavel101 Is this still an issue on the latest dev branch?

mavel101 commented 2 years ago

Yes, it is still not working. You can reproduce it by adding one trigger to a sequence and getting that block:

seq = Sequence()
trig =  make_digital_output_pulse(channel='ext1', duration=10e-6, delay=0)
seq.add_block(trig)
seq.get_block(1)

This will fail in the current code, as the channel index is wrong. This is fixed in the pull request.