Skip to content

scottprahl/RigolWFM

Repository files navigation

RigolWFM

by Scott Prahl

A utility to process oscilloscope waveform files

pypi github conda kaitai-struct doi

License Testing Docs Downloads

Oscilloscope Web Viewer

This project started as a resource for interpreting the proprietary .wfm files created by Rigol oscilloscopes. It now also includes parsers for Tektronix, LeCroy, Agilent / Keysight, Siglent, Yokogawa, and Rohde & Schwarz waveform files. Open source tools that can parse or convert these binary oscilloscope formats are often balkanized: each program tends to support a single oscilloscope group. I have gathered a bunch together here.

This project leverages the domain specific language at <https://doc.kaitai.io> to describe binary files. Once a format has been described in this text form, parsers can be generated for a wide range of languages.

Installation

You can install locally using pip:

pip install RigolWFM

or conda:

conda install -c conda-forge RigolWFM

or just open <https://scottprahl.github.io/RigolWFM/> and try the web version.

Usage

Once RigolWFM is installed, you can plot signals from supported waveform files by:

import matplotlib.pyplot as plt
from RigolWFM import Wfm

w = Wfm.from_file("example.wfm")
w.plot()
plt.show()

Wfm.from_file() will autodetect the file family for supported formats, so the same call works for Rigol .wfm / .bin files, Tektronix .wfm / .isf files, LeCroy .trc files, Agilent / Keysight AGxx .bin files, supported Siglent .bin revisions, Yokogawa .wfm files, and Rohde & Schwarz RTP XML .bin files with companion .Wfm.bin payloads.

Alternatively, wfmconvert can be used from the command line. For example, the following should convert all the DS1000E files in the current directory to the .csv format:

prompt> wfmconvert csv *.wfm

If you just wanted to convert channel 1 from a single file to .csv then:

prompt> wfmconvert --channel 1 csv DS1102E.wfm

If you wanted to a signal .wav file using the second channel waveform (for use with LTspice) then:

prompt> wfmconvert --channel 2 wav *.wfm

If you want to create a .wav file with channels one and four as signals (using the default auto scaling for Audacity or Sigrok Pulseview):

prompt> wfmconvert --channel 14 wav *.wfm

The project also includes a browser-based viewer at <https://scottprahl.github.io/RigolWFM/>. The current web app supports Rigol .wfm / .bin files, Tektronix .wfm / .isf files, LeCroy .trc files, Agilent / Keysight AGxx .bin files, Rohde & Schwarz RTP XML .bin files plus their companion .Wfm.bin payloads, and supported Siglent .bin revisions.

Status

There are binary file descriptions and normalized adapters for waveform files created by the following oscilloscopes. Most of these work directly through Wfm.from_file(); rows with special limitations are called out in the notes.

Family Models Format Notes
Rigol DS1000B DS1074/1104/ 1204B .wfm tested
Rigol DS1000C DS1042/1102/ 1202CA .wfm tested (limited files)
Rigol DS1000D DS1052/1102D .wfm tested (limited files)
Rigol DS1000E DS1052/1102E .wfm tested
Rigol DS1000Z DS1054Z, MSO1054Z, etc. .wfm tested
Rigol DS2000 DS2072A, MSO2102A, etc. .wfm tested
Rigol DS4000 DS4012-DS4054, MSO4012-MSO4054 .wfm tested
Rigol DS6000 DS6062-DS6104 .wfm untested
Rigol MSO5000 MSO5354, etc. .bin tested
Rigol MSO7000 / MSO8000 DS7000, MSO7000, MSO8000, DS8000 .bin tested
Rigol DHO800 / DHO1000 DHO800, DHO1000 .bin .wfm tested; calibrated float32 samples, official .bin and proprietary .wfm support
Tektronix WFM modern DPO/DSA families .wfm supports WFM#001/WFM#002/WFM#003; legacy LLWFM also supported
Tektronix ISF many Tek scopes .isf tested
LeCroy many WaveRunner/ WaveSurfer/etc. .trc tested; handles SCPI-prefixed WAVEDESC files
Agilent / Keysight InfiniiVision / Infiniium .bin supports AG01/AG03/AG10 analog captures; low-level parser preserves segments and multi-buffer metadata
Rohde & Schwarz RTP export RTP / RTO / RTM families .bin + .Wfm.bin normalized single-acquisition analog exports; history / multi-acquisition captures reject explicitly
Siglent documented .bin families .bin supports documented V0.1-V6 revisions; old platform files are detectable via low-level parsers but not normalized yet
Yokogawa ASCII-header waveform exports .wfm tested single-file import path

Resources

This has been a bit of an adventure. In the process of nailing down the basic formats, I have gleaned information from a wide range of projects started by others.

License

BSD 3-clause -- see the file LICENSE for details.

About

Parsers for .wfm binary files created by a wide range of Rigol oscilloscopes

Resources

License

Stars

Watchers

Forks

Contributors