calc_adc_timing#
- pypulseqpp.calc_adc_timing()[source]#
Choose an ADC dwell whose acquisition duration is a multiple of the gradient raster.
Search upward from the nearest ADC-raster dwell that meets the duration floor, and return the first whose acquisition duration is a whole number of gradient raster periods. The receiver bandwidth achieved is
1 / dwell.If the bounded search finds no common-raster solution, the returned duration may be off the gradient raster; check it before constructing events.
- Parameters:
num_samples (int) – Number of ADC samples (>= 1).
target_dwell (float) – Requested dwell time (s), the reciprocal of the requested receiver bandwidth.
grad_raster_time (float) – Gradient raster (s), e.g.
system.grad_raster_time.adc_raster_time (float) – ADC raster (s), e.g.
system.adc_raster_time.min_readout_duration (float, default=0.0) – Lower bound on the returned duration (s), e.g. to fit a flat top.
- Returns:
dwell (float) – Feasible dwell time (s), a multiple of
adc_raster_time.duration (float) –
num_samples * dwell(s).
- Raises:
ValueError – If the sample count, dwell or rasters are not positive, or the duration floor is negative.
Examples
>>> import pypulseqpp as pp >>> dwell, duration = pp.calc_adc_timing( ... 96, 3.7e-6, grad_raster_time=10e-6, adc_raster_time=100e-9 ... ) >>> round(dwell * 1e6, 4), round(duration * 1e6, 4) (5.0, 480.0) >>> round(duration / 10e-6, 6) 48.0
See also
make_adcbuild the ADC event from the returned dwell.
calc_adc_segmentssplit a long ADC into equal segments.