Skip to main content

PyArbTools provides waveform creation and remote instrument control capabilities for Keysight signal generators.

Project description

PyArbTools: Keysight Signal Generator Control & Waveform Creation

Current version: 2020.09.2

Frustrated after looking through hundreds of pages of user manuals to find out how to download a waveform to a signal generator?

Need to test your amplifier or filter with a complex signal but don’t want to crack open your digital signal processing books from college?

Tired of troubleshooting VISA connections, conflicts, and incompatibilities?

Can’t get a Matlab license or the correct toolbox(es) for your work?

Try PyArbTools: a fast, free, and flexible way to create waveforms and control Keysight signal generators.

PyArbTools is a collection of Python classes and functions that provide basic signal creation, instrument configuration, and waveform download capabilities for Keysight signal sources.

It is loosely based on Keysight’s IQ Tools, a Matlab-based toolkit that accomplishes similar things. PyArbTools was built to satisfy the needs of signal generator users who can’t/don’t want to use Matlab and to improve code readability and documentation.


  • Supports M8190A, M8195A, and M8196A arbitrary waveform generators, N5182B MXG/N5172B EXG/E8267D PSG vector signal generators, the M9384B VXG vector signal generator, and N5193/4A UXG agile waveform generators.
  • Connect to and configure instruments, download waveforms, control playback, and load or stream PDWs (for UXG), all using easy-to-use functions rather than a list of SCPI commands.
  • Calibrate waveforms using Keysight’s 89600 VSA software.
  • For custom applications, communicate with instruments using SCPI commands.
  • All instrument control uses socket communication, no VISA required.


Take a look at pyarbtools/ for sample code.

PyArbTools was written for Python and is not currently compatible with legacy Python 2.x

License: GPL 3


0.0.7 (2018-10-09)

  • First release on PyPI.

0.0.8 (2018-11-26)

  • First major update. Added wfmBuilder.iq_correction(), which utilizes Keysight’s VSA software and a Keysight receiver (either an oscilloscope or signal analyzer) and applies a digital predistortion filter to a waveform to flatten amplitude and phase response.

0.0.9 (2018-11-26)

  • Fixed a problem with UXG.csv_pdw_file_download() and UXG.csv_windex_file_download() that threw an error when trying to delete a file that didn’t exist.

0.0.10 (2018-12-10)

  • Added multitone_generator generator. Added 128-QAM and 256-QAM. Streamlined UXG instrument class, split play()/stop into stream_play() and arb_play()/stream_stop() and arb_stop(). Updated index to include a better intro to the project.

0.0.11 (2019-01-23)

  • Fixed bugs with multitone_generator generator. Added AM modulator.

0.0.12 (2019-02-20)

  • Removed UXG class and replaced it with two classes, AnalogUXG and VectorUXG. Expanded VSG class to include M9381A and M9383A without changing public API.

0.0.13 (2019-04-19)

  • Added GUI. Adjusted several functions to streamline waveform creation and download between all instrument types.

0.0.14 (2019-11-12)

  • Fixed bug in UXG classes that emitted a long CW pulse prior to starting streaming. Added “pri” argument to pulse creation methods.

2020.04.0 (2020-04-29)

  • Removed and replaced it with external module socketscpi. .configure() methods now use **kwargs to prevent the function from changing any settings not explicitly specified back to default values. Changed multitone_generator waveform creation method to frequency domain. Significant updates to documentation and in-code comments. Changed from semantic versioning to calendar versioning.

2020.05.0 (2020-05-13)

  • Changed name of digmod_prbs_generator() to digmod_generator(). Overhauled digitally modulated waveform creation function, fixing bugs and producing better signal fidelity. Added, which allows the user to control an instance of Keysight 89600 VSA software for waveform analysis.

2020.06.0 (2020-06-01)

  • Added 16-, 32-, and 64-APSK modulation types to Moved PDW-building function definitions from to Updated documentation.

2020.07.1 (2020-07-06)

  • BUGFIX: corrected a problem with the 16-QAM modulator in digmod_generator(). Fixed a math error in power level calculations in PDW functions.

2020.07.3 (2020-07-31)

  • Dramatically improved resampling and wraparound handling in digmod_generator().

2020.08.1 (2020-08-03)

  • BROKEN: Updated GUI to reflect changes to instrument configuration functions and improvements to wfmBuilder functions. You can now access pyarbtools.pdwBuilder directly. Improved version updating.

2020.08.2 (2020-08-06)

  • Fixed issue where the GUI icon was not included with the PyArbTools package, which prevented the GUI from running.

2020.09.1 (2020-09-03)

  • Added VXG instrument class for controlling the M9384B VXG signal generators.

2020.09.2 (2020-09-08)

  • Added import_mat() method to that imports .mat files containing waveform data and optional metadata.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for PyArbTools, version 2020.9.2
Filename, size File type Python version Upload date Hashes
Filename, size PyArbTools-2020.9.2-py2.py3-none-any.whl (71.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size PyArbTools-2020.9.2.tar.gz (62.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page