calc_adc_segments#
- pypulseqpp.calc_adc_segments()[source]#
Calculate splitting of the ADC in segments with equal samples.
- Parameters:
num_samples (int) – Initial number of samples to split into segments.
dwell (float) – Dwell time of the ADC in [s]
system (Opts, default=None) – System limits. Default is a system limits object initialized to default values.
mode (str, default='lengthen') – The total number of samples can either be shortened or lengthened to match the constraints.
- Returns:
(num_segments, num_samples_seg) – Number of segments and number of samples per segment.
- Return type:
Notes
This is PyPulseq’s function. Events go in as the namespaces it expects and come back with their fields in slots.
“On some scanners, notably Siemens, ADC objects that exceed a certain sample length (8192 samples on Siemens) should be splittable to N equal parts, each of which aligned to the gradient raster. Each segment, however, needs to have the number of samples smaller than system.adcSamplesLimit’ and divisible by system.adcSamplesDivisor to be executable on the scanner. The optional parameter mode can be either ‘shorten’ or ‘lengthen’.” [Matlab implementation of ‘calcAdcSeg’. pulseq]
- Raises:
ValueError – If ‘mode’ is not ‘shorten’ or ‘lengthen’.
ValueError – If no suitable segmentation could be found.
ValueError – If number of segments exceeds 128.