pypulseq
pypulseq copied to clipboard
Potential issue with gradient continuity check
Hi all, are those lines supposed to be
if ( abs(grad_to_check.stop[1]) > self.system.max_slew * self.system.grad_raster_time and abs(grad_to_check.stop[0] - duration) > 1e-7 ): raise RuntimeError("A gradient that doesn't end at zero needs to be aligned to the block boundary.")
instead of the current version (i.e., similar to the check at the beginning of the gradient)? Otherwise, check will pass for negative ending gradients regardless of the alignment to the block boundary. Cheers, Matteo