ScannerSequence.design

ScannerSequence.design#

ScannerSequence.design()#

Write the sequence of a request into directory as signed binary Pulseq.

The request is evaluated as in validate(), generate() builds the sequence of the requested protocol, and each sequence is written into directory, which must exist. The request is designed as it stands: a request that evaluates to other values is designed from the values it was given, so a design that is a function of the evaluated protocol is made from validate(...).values.

The first file is sequence.seq. Each later file of a chain is sequence_prescan<n>.seq, n counting from 2, or sequence_main.seq for the last, and each file names the next as its NextSequence definition, so the chain is one scan. exam is passed to evaluate() and generate() as validate() passes it.

Returns:

  • Validation – As validate() returns it.

  • list of str – Written paths in play order, prescans first; empty for an invalid request, for which nothing is written.

Raises:

TypeError – If app returns neither a sequence nor a list of them.