RigolWFM
by Scott Prahl
A utility to process oscilloscope waveform files
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 |
|
tested |
Rigol DS1000C |
DS1042/1102/ 1202CA |
|
tested (limited files) |
Rigol DS1000D |
DS1052/1102D |
|
tested (limited files) |
Rigol DS1000E |
DS1052/1102E |
|
tested |
Rigol DS1000Z |
DS1054Z, MSO1054Z, etc. |
|
tested |
Rigol DS2000 |
DS2072A, MSO2102A, etc. |
|
tested |
Rigol DS4000 |
DS4012-DS4054, MSO4012-MSO4054 |
|
tested |
Rigol DS6000 |
DS6062-DS6104 |
|
untested |
Rigol MSO5000 |
MSO5354, etc. |
|
tested |
Rigol MSO7000 / MSO8000 |
DS7000, MSO7000, MSO8000, DS8000 |
|
tested |
Rigol DHO800 / DHO1000 |
DHO800, DHO1000 |
|
tested; calibrated float32 samples, official
|
Tektronix WFM |
modern DPO/DSA families |
|
supports |
Tektronix ISF |
many Tek scopes |
|
tested |
LeCroy |
many WaveRunner/ WaveSurfer/etc. |
|
tested; handles SCPI-prefixed |
Agilent / Keysight |
InfiniiVision / Infiniium |
|
supports |
Rohde & Schwarz RTP export |
RTP / RTO / RTM families |
|
normalized single-acquisition analog exports; history / multi-acquisition captures reject explicitly |
Siglent |
documented
|
|
supports documented V0.1-V6 revisions; old platform files are detectable via low-level parsers but not normalized yet |
Yokogawa |
ASCII-header waveform exports |
|
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.
Wagenaars’s <https://www.mathworks.com/matlabcentral/fileexchange/18999-read-binary-rigol-waveforms>
Blaicher’s <https://github.com/mabl/pyRigolWFM>
Szkutnik’s <https://github.com/michal-szkutnik/pyRigolWfm1000Z>
Cat-Ion’s <https://github.com/Cat-Ion/rigol-ds4000-wfm>
Contributions from <http://www.hakasoft.com.au/wfm_viewer>
Rigol’s documentation of the 1000E, 1000Z, 2000, and 6000 file formats.
Rigol’s documentation of the
.binformats for the 1000, 5000, and 8000Lathe’s <https://github.com/Lathe26/WFM_for_Rigol_DHO800_900>
Nezarati’s <https://nezarati.github.io/waveform-viewer/index.html>
Wavebin’s <https://github.com/eyalroz/wavebin> Agilent / Keysight parsers and samples
Agilent / Keysight
.binreference readers and programming guidesSiglent’s waveform format PDF and vendor reference parsers
SMASH toolbox vendor importers for Tektronix, LeCroy, and Yokogawa formats
License
BSD 3-clause – see the file
LICENSEfor details.
Introduction
Rigol
- Rigol DS1000B Waveform Examples
- Rigol DS1000C Waveform Examples
- Rigol DS1000D Waveform Examples
- Rigol DS1000E Waveform Examples
- Rigol DS1000Z Waveform Examples
- Honestly, the Rigol firmware for these scopes is a disaster
- Background on the voltage and time conversions.
- Start with waveform with a single trace
- DS1074Z-A Scope file
- DS1054Z-A Scope file
- DS1054Z-B Scope file
- DS1054Z-C Scope file
- DS1054Z-D Scope file
- Summarizing all the results
- Testing channel selection
- DS1054Z-D Scope file
- DS1074Z digital channel
- Rigol DS2000 Waveform Examples
- Rigol DS4000 Waveform Examples
- Rigol MSO5000 Binary Waveform Examples
- Rigol DHO800 Waveform Examples
- Rigol DHO1000 Waveform Examples
Agilent / Keysight
LeCroy
Rohde & Schwarz
Exporting
- Exporting Waveforms as MATLAB MAT Files
- Exporting Waveforms as NPZ Files
- Exporting Waveforms as Sigrok SR Files
- Exporting Waveforms as WAV Files for LTspice
Schema Tables
API
- RigolWFM Package
- Package Root
- RigolWFM Package
- Functions
- Classes
- Wfm
- Channel
ChannelChannel.agilent()Channel.bin5000()Channel.bin7000_8000()Channel.calc_times_and_volts()Channel.dho1000()Channel.ds1000b()Channel.ds1000c()Channel.ds1000d()Channel.ds1000e()Channel.ds1000z()Channel.ds2000()Channel.ds4000()Channel.ds6000()Channel.lecroy()Channel.rohde_schwarz()Channel.siglent()Channel.tek()Channel.yokogawa()
- Core Interfaces
- RigolWFM.channel Module
- Functions
- Classes
- UnitEnum
- Channel
ChannelChannel.agilent()Channel.bin5000()Channel.bin7000_8000()Channel.calc_times_and_volts()Channel.dho1000()Channel.ds1000b()Channel.ds1000c()Channel.ds1000d()Channel.ds1000e()Channel.ds1000z()Channel.ds2000()Channel.ds4000()Channel.ds6000()Channel.lecroy()Channel.rohde_schwarz()Channel.siglent()Channel.tek()Channel.yokogawa()
- RigolWFM.wfm Module
- RigolWFM.wfmconvert Module
- Rigol Family Helpers
- RigolWFM.rigol Module
- RigolWFM.dho Module
- RigolWFM.mso5000 Module
- RigolWFM.mso5074 Module
- RigolWFM.mso7000_8000 Module
- Vendor Adapters
- RigolWFM.agilent Module
- RigolWFM.siglent Module
- RigolWFM.lecroy Module
- RigolWFM.tek Module
- RigolWFM.isf Module
- RigolWFM.rohde_schwarz Module
- RigolWFM.yokogawa Module
- RigolWFM.yokogawa_hdr Module
- Functions
- Classes
- GroupInfo
- HdrInfo
- TraceInfo
TraceInfoTraceInfo.block_sizeTraceInfo.datesTraceInfo.h_offsetTraceInfo.h_resolutionTraceInfo.h_unitTraceInfo.nameTraceInfo.timesTraceInfo.v_data_typeTraceInfo.v_illegalTraceInfo.v_maxTraceInfo.v_minTraceInfo.v_minus_overTraceInfo.v_offsetTraceInfo.v_plus_overTraceInfo.v_resolutionTraceInfo.v_unit
- VDataTypeInfo
- YokogawaWvfHeader
- YokogawaWvfWaveform
- RigolWFM.yokogawa_wdf Module
Versions
- Changelog
- 1.5.0 (2026-04-05)
- 1.0.0 (2023-10-06)
- 0.9.9 (2023-10-05)
- 0.9.8 (2023-10-05)
- v0.9.7 (2023-08-18)
- v0.9.6 (2022-08-26)
- v0.9.5 (2022-03-17)
- v0.9.4 (2021-12-12)
- v0.9.3 (2021-11-24)
- v0.9.2 (2021-08-06)
- v0.9.1 (2021-07-28)
- v0.9.0 (2021-07-25)
- v0.8.1 (2021-03-21)
- v0.8.0 (2021-03-20)
- v0.7.4 (2021-03-14)
- v0.7.3 (2021-03-14)
- v0.7.2 (2021-03-14)
- v0.7.1 (2021-03-09)
- v0.7.0 (2021-02-14)
- v0.6.7 (2020-10-31)
- v0.6.6 (2020-10-10)
- v0.6.5 (2020-08-03)
- v0.6.4 (2020-05-16)
- v0.6.3 (2020-03-29)
- v0.6.2 (2020-03-27)
- v0.6.1 (2020-03-27)
- v0.6.0 (2020-03-26)
- v0.4.1 (2020-03-01)
- v0.4.0 (2020-03-01)
- v0.3.0 (2020-01-12)
- v0.2.0 (2020-01-09)
- v0.1.3 (2020-01-09)
- v0.1.2 (2020-01-09)
- v0.1.1 (2020-01-09)
- v0.1.0 (2020-01-09)