SequencePlugin#
- class pulserver.design.SequencePlugin[source]#
Bases:
objectA sequence function bound to the entries of the scanner protocol.
A subclass sets
appand, for the arguments the operator edits,protocol; withoutprotocolthe sequence function plays its defaults. Entries a request omits keep their initial values, the entry’sdefaultor else the sequence function’s. Times travel as integer microseconds and other floats to six significant digits, the precision of a float32 parameter, so a reply stored in scanner parameters and sent back evaluates to itself.validate()evaluates a request withevaluate(), anddesign()generates and writes it withgenerate(). A subclass overrides the hooksevaluate()andgenerate(), and does not overridevalidate()ordesign().- Attributes:
app (callable) – The sequence function,
app(system, **arguments). It takes the scanner limits, apypulseqpp.Opts, and the keyword arguments the entries ofprotocolbind, and returns apypulseqpp.Sequenceor a list of them, which is a chain: the prescans first and the main sequence last. The defaults the listing shows are those of its signature, so afunctools.partial()is a sequence function too.generate()calls it, and so does anevaluate()that designs the sequence; the defaultevaluate()does not.protocol (mapping) – The entries the operator edits, by key: the interpreter’s parameter names, which are the members of
ProtocolKeythatUIParamcollects. A plain string naming an entry is stored as its member. Empty by default. An entry that states itsdefaultmay bind a name the app does not take; it is then read by the plugin’s ownevaluate()andgenerate(), which do not pass it to the app. The options the plugin module declares withoption()are added, each anOptionParamat its user entry, named in the user entry’s name.strict_limits (bool) – Whether a design that exceeds a limit is refused as designed. By default,
False, the design service lowers the slew rate a design exceeding the nerve-stimulation or slew-rate limit is made under and designs it again; a strict plugin’s design is never adjusted, and each file it writes sets theStrictLimitsdefinition. A design whose sequence setsStrictLimitsitself is held strictly too.
- Raises:
ValueError – When a subclass is defined with a
protocolkey the interpreter does not know, which its parser would drop, with one of the prescription entries, which pulserver applies itself, or with an entry at the user entry of an option; or with bothprotocolandui.TypeError – When a subclass is defined with a class as
app.
- Warns:
DeprecationWarning – When a subclass sets
recon, which has no effect: the reconstruction is named by the reconstruction client or, on a console, by the scan. When a subclass setsfollows, which has no effect: the RF a scanner scales is theRfLayoutan evaluation returns. When a subclass setsui, the deprecated name ofprotocol, or subclassesScannerSequence, the deprecated name of this class.
Methods
Write the sequence of a request into |
|
Evaluate a requested protocol, or refuse it by raising. |
|
Return what |
|
Return the protocol with its schema, at the sequence function's defaults. |
|
Return the validation of a request, as the wire carries it. |
Attributes
The plugin's options, by name, at the values it was loaded with. |
|
Whether |
|