ScannerSequence.validate

ScannerSequence.validate#

ScannerSequence.validate()#

Return the validation of a request, as the wire carries it.

The request is in wire values, completed with the initial values of the entries it omits. It is converted to a Protocol, its prescription rotation is checked to be orthonormal, and evaluate() runs; nothing is generated. This is the one boundary between a request and the code of a plugin.

A valid reply carries the evaluated protocol, the duration of the evaluation, None where it is 0.0, its note and its RF layout, None where it states none or plays no RF. An exception raised by any of these steps makes the reply invalid, carrying the request, and is logged with its traceback. A control of the RF layout that is not an entry of protocol, or whose value in the evaluated protocol is not positive, is a ValueError naming it. ValueError and AssertionError, which pypulseqpp and PyPulseq raise for a protocol they cannot realize, are logged at WARNING and the message is the reply’s info. Any other exception is logged at ERROR, and the info is "<ExceptionType> in <Plugin>.evaluate".

exam, the directory of the current exam’s cache, is passed to evaluate() as its exam argument where it takes one, and read with load_exam().

Raises:

ValueError – If the declared entries are inconsistent with the sequence function, as listing() reports; this is a defect of the plugin and not of the request.