playout#
- pulserver.ir.playout()[source]#
Play the cache beside a sequence file as a segmented playout plays it, recording both stages.
The stages are the C library’s,
pulseg_playout_prepareandpulseg_playout_scan, over a backend that plays nothing: it keeps what the first stage prepares at each segment position, a model of the waveform memory the waves are loaded into, and the registers the scan loop sets on each block, with the samples its wave reads from that memory when it is set. The waves are held asplan_waves()lays them out forbudget, or, without one, as the cache lays them out.With
prescan, the scan loop plays that receive-gain calibration instead. It waits for no trigger, drives no digital output, and plays at zero every gradient whose amplitude varies across repetitions.- Returns:
mode,memory_samples,slots: howplan_waves()holds the waves, the samples per axis it reserves, and the slots of a position’s ring;positions: per prepared segment position, in segment order,segmentandposition; where the position plays no wave, its gradient events as corners at unit amplitude,event_time_usfrom the block’s start andevent_shape, withevent_span(positions, 3, 2)into them; where it does,slot_offset(positions, slots, 3),slot_samplesandslot_start_us: its ring of slots, or, with offsets -1, the span every resident wave it plays covers;blocks: per played block, in play order,subsequence,segment,position,instance(instances of its segment played before its own),slot(of its position’s ring, -1 unless the waves are streamed),rotate(0 where NOROT keeps the prescription rotation out),await_trigger,first_position(the execution-stream position of its instance’s first block) andduration_us; the registersrf_amp_hz,rf_phase_rad,rf_freq_hz,rf_shim,rf_use,gradient_hz_per_m(blocks, 3),adc,adc_freq_hz,adc_phase_radanddigitalout, andgradient_variable, where the amplitude of that gradient varies across repetitions; and its wave,wave(-1 without one) atwave_amp_hz_per_m, from the regionwave_offset,wave_samplesandwave_start_us, with the samples it reads there inwave_read,wave_read_span(blocks, 3, 2)into them. Withwaveforms, also what each block plays, keyed asplay()keys it: the RF pulse and readout its position prepares, the pulse at the block’s amplitude, the readout’s phase modulation, and the gradients: the events its position prepares at the block’s amplitudes, or the samples its wave reads at the centres of the raster intervals, the first and last held over the half intervals at its two ends;instancesandloads: the segment instances played and the loads into waveform memory;overwrites: loads that wrote over memory the instance in play was reading, andunloaded: samples a block read where nothing was loaded. Both are 0 where every block plays what was loaded for it;rf_shims: per subsequence, each RF shim’s complex channel weights, which a block’srf_shimindexes.
- Return type:
dict of str to Any
- Raises:
ValueError – If the cache cannot be loaded, if the waves do not fit the budget or cannot be loaded in time, or if the prescan’s subsequence does not exist.