gain_calibration_readouts

gain_calibration_readouts#

pypulseqpp.sequences.gain_calibration_readouts()[source]#

Return the readouts from the first block to the end of the prescan’s last imaging repetition.

A receive-gain prescan plays the sequence from its first block and stops after the NumGainCalibrationReadouts definition’s count of readouts, so a count it plays through whole repetitions of repetition(), found on the sequence as it is written, its duplicate events merged, sets the gain on the signal the scan acquires. An imaging repetition is one that acquires a readout not flagged NAV; the dummy repetitions before it play and their readouts, navigators included, are counted with it. A readout flagged NOPRESCAN plays in the prescan without being acquired, and is not counted. The prescan plays the fewest imaging repetitions that last duration together, or all of a shorter scan’s, unless repetitions names how many.

Parameters:
  • seq (pypulseqpp.Sequence) – The designed sequence, its definitions set.

  • repetitions (int, default=None) – Imaging repetitions the prescan plays, at least one; None takes as many as duration asks.

  • duration (float, default=GAIN_CALIBRATION_DURATION) – Shortest time (s) the imaging repetitions of the prescan last.

Returns:

Readouts the prescan acquires.

Return type:

int

Raises:

ValueError – If repetitions is below one, or the sequence has fewer imaging repetitions than it names.

Examples

>>> import pypulseqpp as pp
>>> from pypulseqpp import sequences
>>> seq = sequences.gre2D_sequence(n_y=8, n_dummy=2)
>>> sequences.gain_calibration_readouts(seq, repetitions=3)
3