pyrocko.squirrel.mantra¶
Processing pipeline configuration and wiring.
A Mantra describes a chain (or, more generally, connected
graph) of BaseOperator
instances to be connected on top of a
Squirrel. Mantra configurations are
Guts-serializable YAML, typically loaded via --mantra PATH[:PATTERN,...]
in squirrel mantra and other CLI tools, or constructed
programmatically and connected with Mantra.setup().
Classes
|
Represents a connected graph of processing operators. |
Exceptions
Raised on errors while planning or connecting a |
- exception MantraError[source]¶
Bases:
SquirrelErrorRaised on errors while planning or connecting a
Mantra’s operator graph, e.g. duplicate operator names, references to undefined operators, or unused operators.
- class Mantra(**kwargs)[source]¶
Bases:
ObjectRepresents a connected graph of processing operators.
- ♦ name¶
str, default:'untitled'Name of this mantra, used e.g. to select it via
--mantra PATH:PATTERNand as a namespacing element in derived data codes.
- ♦ operators¶
listofpyrocko.squirrel.operators.base.BaseOperatorobjects, default:[]Operators forming the processing graph, in connection order (see
setup()).
- setup(squirrel)[source]¶
Connect operators into a processing graph on top of a squirrel.
- Parameters:
squirrel (
Squirrel) – The squirrel instance to serve as the graph’s root input.
After this call,
outletholds the graph’s final operator (orsquirrelitself, if this mantra has no operators), ready to be queried like a squirrel (e.g.mantra.outlet.get_waveforms(...)).