Gradient splitting in CMRseq -> Pulseq conversion not using correct grid
When splitting the previous gradient in the pulseq conversion due to block collisions, currently the gradients are split on the raster of the colliding block.
Therefore the splitting needs to be floored to the previous gradient raster point.
MWE:
from pint import Quantity
import numpy as np
import cmrseq.utils
from cmrseq.io import PulseSeqFile
import pypulseq as pp
system_specs = cmrseq.SystemSpec(
max_grad=Quantity(32, "mT/m"),
max_slew=Quantity(150, "mT/m/ms"),
rf_ringdown_time=Quantity(20, "us"),
rf_dead_time=Quantity(100, "us"),
adc_dead_time=Quantity(10, "us"),
grad_raster_time=Quantity(10, "us"),
rf_raster_time=Quantity(1, "us"),
adc_raster_time=Quantity(100, "ns")
)
seq = cmrseq.seqdefs.readout.single_shot_epi(system_specs,
Quantity([10, 10], "cm"),
matrix_size=np.array([100, 100]),
slope_sampling=True)
fig = cmrseq.plotting.plot_sequence(seq, axes="single")
fig.savefig("cmrseq_epi.png")
pfile = PulseSeqFile(sequence=seq)
pfile.write("cmrseq_epi_def.seq")
seqpp = pp.Sequence()
seqpp.read("cmrseq_epi_def.seq")
seqpp.check_timing()
>>> (False, ['Event: 2 - [type: grad delay: 928.9999999999999 us ]\n'])
Edited by Jonathan Weine