quantize_readout_timing#
- pypulseqpp.quantize_readout_timing()[source]#
Choose an ADC dwell from a requested receiver bandwidth.
Search upward from the nearest ADC-raster dwell satisfying the duration floor, for at most
MAX_RASTER_SEARCH_STEPScandidates, for the first whose readout duration is a whole number of gradient rasters. If none is, return that starting dwell. Inputs must be positive.- Parameters:
nx_ro (int) – Number of readout samples.
target_bw_hz_px (float) – Requested receiver bandwidth
1 / dwell(Hz); this is not the bandwidth per pixel,1 / (nx_ro * dwell).grad_raster_s (float) – Gradient and ADC rasters (s).
adc_raster_s (float) – Gradient and ADC rasters (s).
min_flat_time_s (float) – Lower bound on the flat time (s), e.g. from the max-gradient limit.
- Returns:
dwell_s (float) – ADC dwell time (s), a multiple of
adc_raster_s.flat_time_s (float) –
nx_ro * dwell_s(s); gradient-raster alignment is not guaranteed if the search is exhausted.
Examples
>>> import pypulseqpp as pp >>> dwell, flat = pp.quantize_readout_timing(256, 62_500.0, 1e-5, 1e-7, 0.0) >>> abs(flat / 1e-5 - round(flat / 1e-5)) < 1e-9 True