ReadoutTable#
- class pulserver.mrd.ReadoutTable[source]#
Bases:
objectEvery ADC readout of one sequence, in play order.
Tabulating follows k-space through the whole sequence once, to find each readout’s echo.
readout_k()adds a readout’s origin to the sweep of its kind whereSequence.adc_echoesreturns both. Otherwise it integrates k-space withSequence.adc_kspace(readouts=...)over a run of consecutive readouts, from the last pulse before the run that resets it, and keeps the last few runs. The table holds the sequence for this, which must not change once tabulated.- Attributes:
block (ndarray) –
int64, 1-based index of the block holding each readout.num_samples (ndarray) –
int32samples per readout.dwell (ndarray) –
float64dwell time, in seconds.labels (dict of str to ndarray) – Every label the sequence writes, with the
int32value in force at each readout. Labels the sequence never writes are absent.center_sample (ndarray) –
int32echo index: of the samplespypulseqpp.Sequence.adc_echoesfinds nearest the centre of k-space over the axes the readout moves along, the last, or the first on a readout labelledREV, so reversed lines mirror onto forward ones. -1 when no axis moves.trajectory_dimensions (ndarray) –
int8axes ofreadout_k()a readout keeps once the trailing axes it does not move along are dropped; 0 when no axis moves.
Examples
>>> import pypulseqpp as pp >>> from pulserver.mrd import ReadoutTable >>> seq = pp.Sequence(pp.Opts()) >>> gx = pp.make_trapezoid("x", flat_area=160.0, flat_time=3.2e-3) >>> adc = pp.make_adc(num_samples=32, duration=3.2e-3, delay=gx.rise_time) >>> rewinder = pp.make_trapezoid("x", area=-gx.area / 2, duration=1e-3) >>> for events in ((rewinder,), (gx, adc), (rewinder,)): ... _ = seq.add_block(*events) >>> table = ReadoutTable.from_sequence(seq) >>> int(table.center_sample[0]), int(table.trajectory_dimensions[0]) (16, 1)
Methods
Tabulate the readouts of a |
|
Return the decoded block holding one readout, as |
|
Return the k-space position of each sample of one readout, in 1/m. |
|
Return the phase modulation of one readout's ADC, in rad, or None. |
Attributes