Read, parse, and convert oscilloscope waveform files
Project description
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 |
.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.
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 .bin formats for the 1000, 5000, and 8000
Lathe’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 .bin reference readers and programming guides
Siglent’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 LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rigolwfm-1.5.0.tar.gz.
File metadata
- Download URL: rigolwfm-1.5.0.tar.gz
- Upload date:
- Size: 19.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e5b571022d086ec270366156a77402ffa575884bafe2e52119cc46f077c674d
|
|
| MD5 |
5042d38d516549da47790472b12b382c
|
|
| BLAKE2b-256 |
3c156273e28d0a4cee5376f88b1c626faaf6cd6bd13cc4a80dd85b3f96404a65
|
Provenance
The following attestation bundles were made for rigolwfm-1.5.0.tar.gz:
Publisher:
pypi.yaml on scottprahl/RigolWFM
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rigolwfm-1.5.0.tar.gz -
Subject digest:
0e5b571022d086ec270366156a77402ffa575884bafe2e52119cc46f077c674d - Sigstore transparency entry: 1239911749
- Sigstore integration time:
-
Permalink:
scottprahl/RigolWFM@159e647c0b74e1d73d0ad589149e1c26e1610b26 -
Branch / Tag:
refs/tags/1.5.0 - Owner: https://github.com/scottprahl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@159e647c0b74e1d73d0ad589149e1c26e1610b26 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rigolwfm-1.5.0-py3-none-any.whl.
File metadata
- Download URL: rigolwfm-1.5.0-py3-none-any.whl
- Upload date:
- Size: 178.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02e1c9c5926f3edbeb9f0a876e995208bfd01dc90b8d4c95afa7a1c7cd9b2725
|
|
| MD5 |
9d0dd8fa979ae8515224171b8ba048c3
|
|
| BLAKE2b-256 |
24ab4a6714b018fd38ea56e11c8b65f1fbddb6fcb5252214bf8b7a87539577b8
|
Provenance
The following attestation bundles were made for rigolwfm-1.5.0-py3-none-any.whl:
Publisher:
pypi.yaml on scottprahl/RigolWFM
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rigolwfm-1.5.0-py3-none-any.whl -
Subject digest:
02e1c9c5926f3edbeb9f0a876e995208bfd01dc90b8d4c95afa7a1c7cd9b2725 - Sigstore transparency entry: 1239912083
- Sigstore integration time:
-
Permalink:
scottprahl/RigolWFM@159e647c0b74e1d73d0ad589149e1c26e1610b26 -
Branch / Tag:
refs/tags/1.5.0 - Owner: https://github.com/scottprahl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@159e647c0b74e1d73d0ad589149e1c26e1610b26 -
Trigger Event:
release
-
Statement type: