User Operators


Use the commands listed in this topic to configure and run user-defined signal processing functions. Like FlexDCA's standard operators, user-defined signal processing functions modify an input waveform and display an output waveform. Creating a user-defined signal processing function requires that you write either a Python script or MATLAB measurement script.
For detailed instructions on creating user measurements, refer to FlexDCA's user's help.
To install a user-defined function, use the following two :FUNCtion
subsystem commands:
:FUNCtion:FOP USER
(installs a single input operator):FUNCtion:FOP BUSer
(installs a dual input operator)
To configure your user-defined function use these commands:
:SPRocess:USER:CFILe
(single input operator):SPRocess:BUSer:CFILe
(dual input operator)
MATLAB Based User Measurements
With a MATLAB measurement script, the source waveform, standard variables, and any custom variables are made available in the MATLAB workspace.
Python Based User Signal Processing Functions
Observe these notes when running Python based user signal processing functions scripts.
Install Python. Before running your script, you must install Python on either an N1000A or the PC where N1010A FlexDCA is running. Python is not provided by Keysight.
Python 3 (latest version) is recommended. FlexDCA revision A.07.90 is the last FlexDCA version that will support Python 2 user operator or user measurement scripts. If you want to run Python 2 scripts in FlexDCA revisions greater than A.07.90, update the scripts to Python 3.
Update PC's PATH variable. Modify the PC's Path environment variable to include the path to the Python executable. You can select the option in the Python installer to update the path variable as part of the installation.
NumPy is required. NumPy is a Python package for creating multidimensional arrays. NumPy must always be installed with Python. Install NumPy using Python's package manager, pip, from the command prompt: pip install numpy
Always import NumPy. Because the source waveform input variable is a NumPy array, you must always import NumPy into your user operator script. For example, add this statement: import numpy as np
.