Skip to content

Commit c9d0a30

Browse files
mavel101schuenke
andauthored
fix timing check of ADC delay (#235)
* fix timing check for adc delay * split rf and adc case again and add comment --------- Co-authored-by: Patrick Schuenke <[email protected]>
1 parent 9937664 commit c9d0a30

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/pypulseq/check_timing.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,12 @@ def div_check(a: float, b: float, event: str, field: str, raster: str):
7575
# For now this is only the case for arrays of extensions, but we cannot actually check extensions anyway...
7676
continue
7777

78-
if hasattr(e, 'type') and e.type == 'adc':
79-
raster = seq.system.adc_raster_time
80-
raster_str = 'adc_raster_time'
81-
elif hasattr(e, 'type') and e.type == 'rf':
78+
if hasattr(e, 'type') and e.type == 'rf':
79+
raster = seq.system.rf_raster_time
80+
raster_str = 'rf_raster_time'
81+
elif hasattr(e, 'type') and e.type == 'adc':
82+
# note that ADC samples must be on ADC raster time, but the ADC start time must be on RF raster time!
83+
# see https://github.com/pulseq/pulseq/blob/master/doc%2Fpulseq_shapes_and_times.pdf for details
8284
raster = seq.system.rf_raster_time
8385
raster_str = 'rf_raster_time'
8486
else:

0 commit comments

Comments
 (0)