class OperatorBase
This is a Python abstract base class (ABC). The Operator class in an Echoview Python source file must derive from the OperatorBase class. The class supports both the Code and Code - Time series operators.
The eval method is abstract and must be defined in the Echoview Python source file.
The OperatorBase class is available from the Echoview Python package.
The default Echoview Python source file generated for a Code - Time series variable overrides the inherited result_type method to specify the output time series data type. The method may return a MeasurementType or a tuple containing a MeasurementType and a TimeSeriesInterpolationMode. For more information, see Understanding the default Echoview Python source file: Code - Time series.
Methods
__init__(self) Initialize self. eval(self, inputs: List[echoview.OperandInput]) Calculates the output measurement from a list of OperandInputs corresponding to a window of measurements from each operand. For the Code operator, the output ping has the same metadata (for example, ping time) as the matched ping from Operand 1. The returned NumPy sample array must have the same shape as that ping's sample array. For the Code - Time series operator, the returned measurement has the measurement time of the matched ping from Operand 1. Parameters inputs: A list of OperandInputs. Returns For the Code operator, a NumPy sample array with the same shape as the matched ping's sample array. For the Code - Time series operator, a measurement value and TimeSeriesStatus. result_type(self, input_types: List[echoview.MeasurementType]) Specifies the output data type. For the Code operator, the default implementation uses the data type of Operand 1 unless it is single beam wideband or pulse compressed. In that case, it returns the corresponding single beam data type. For example, single beam pulse compressed Sv is mapped to single beam Sv. The default source file for the Code - Time series operator overrides this method to specify a supported time series output type. For an Unspecified time series, the method may also specify a TimeSeriesInterpolationMode. Parameters input_types: A list of MeasurementTypes, one for each operand. Returns The output MeasurementType or, where supported, a tuple containing the MeasurementType and TimeSeriesInterpolationMode.
See also
About the Code operators
Using the Code* operators
About the Echoview Python package
MeasurementType class
TimeSeriesInterpolationMode class
TimeSeriesStatus class