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. Where
Sequence.adc_echoesreturns each readout’s k as its block’s origin plus the sweep of a block of its kind,readout_k()adds the two. Otherwise k-space is integrated a run of consecutive readouts at a time, bySequence.adc_kspace(readouts=...), from the last pulse before the run that resets it, when the readout’s run is not among the last few kept. 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