ADC gridding vs appending end time mismatch
Easy to reproduce:
system_specs = cmrseq.SystemSpec(max_grad=Quantity(80, "mT/m"), max_slew=Quantity(200., "mT/m/ms"), grad_raster_time=Quantity(0.01, "ms"), rf_raster_time=Quantity(0.01, "ms"), adc_raster_time=Quantity(0.01, "ms"))
delay = cmrseq.bausteine.Delay(system_specs=system_specs, duration=Quantity(0.1, 'ms'))
adc = cmrseq.bausteine.SymmetricADC(system_specs=system_specs, num_samples=10, duration=Quantity(2, 'ms'), delay=Quantity(0, 'ms'))
seq = cmrseq.Sequence([delay], system_specs=system_specs)
seq.append(adc_block90)
seq.append(delay)
time, rf_grid, grad_grid, adc_on_grid = cmrseq.utils.grid_sequence_list([seq], force_uniform_grid=False)
Error will be with out of bounds index.
It seems that there is some mismatch between how blocks are appended and how the adcs are gridded using _grid_single_adc_block
_grid_single_adc_block
adds one extra adc dwell time at the end after the last sample, however when appending, the end time of the adc events is the sample time of the last sample. If the dwell time that was added (in this example it is 0.4ms) is less than the remaining gradients in the sequence (this case 0.1ms delay) then this error occurs