About the Code operator
The multithreaded Code operator is a virtual variable that is a Python® Application Programming Interface (API). The operator gives users access to various aspects of a ping's data, such as
- ping samples,
- date & time,
- start & stop range, and more.
For a full list of the ping attributes available to the Code operator, refer to the Measurement class.
While most of Echoview's other variables function according to a specification or algorithm, you program the function of the Code operator using Python.
The Code operator supports multiple input operands, and single beam, multibeam and wide band data types.
To begin, refer to the Using the Code operator page. Also refer to the introduction to the Code operator tutorial and video for more information.
Security
Python programs may be written by anyone, and could contain malicious code or other security risks. Echoview recommends you review any files before executing them and only obtain them from trustworthy sources.
When opening an EV file that contains a Code operator or creating a Code virtual variable in a new EV file, a Security Warning window seeks permission to enable Python code for that EV file. Selecting No allows the display of and edits to the Code Variable properties dialog box. The Python source file may be edited, but is not executed.
A permission is valid while the EV file is open. To change the permission, close the EV file and reopen it.
The Security warning can be turned off under the Messages section of the Interface page of the Echoview Configuration dialog box.
Echoview and Python
Echoview comes installed with Python for the Code operator. For the version information, refer to the Echoview Configuration dialog box.
The Python installation includes the common Python list of packages and also the NumPy and SciPy Python packages. Refer installing a package section to use other Python packages with the Code operator
The Code operator and object-oriented programming
To fully exploit the Code operator requires some knowledge of object-oriented programming (OOP) within the Python framework.
However, the content in the help pages aims to introduce the features of the Code operator without this prerequisite. Refer to the example Python snippets on the Using the Code operator page to discover the syntax for basic the basic commands. Then use these as templates for more complex tasks.
See also
Code operator
About the Echoview Python source file
Using the Code operator