Skip to main content

Read, parse, and convert oscilloscope waveform files

Project description

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.

Project details


Download files

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

Source Distribution

rigolwfm-1.5.0.tar.gz (19.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rigolwfm-1.5.0-py3-none-any.whl (178.5 kB view details)

Uploaded Python 3

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

Hashes for rigolwfm-1.5.0.tar.gz
Algorithm Hash digest
SHA256 0e5b571022d086ec270366156a77402ffa575884bafe2e52119cc46f077c674d
MD5 5042d38d516549da47790472b12b382c
BLAKE2b-256 3c156273e28d0a4cee5376f88b1c626faaf6cd6bd13cc4a80dd85b3f96404a65

See more details on using hashes here.

Provenance

The following attestation bundles were made for rigolwfm-1.5.0.tar.gz:

Publisher: pypi.yaml on scottprahl/RigolWFM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for rigolwfm-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02e1c9c5926f3edbeb9f0a876e995208bfd01dc90b8d4c95afa7a1c7cd9b2725
MD5 9d0dd8fa979ae8515224171b8ba048c3
BLAKE2b-256 24ab4a6714b018fd38ea56e11c8b65f1fbddb6fcb5252214bf8b7a87539577b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for rigolwfm-1.5.0-py3-none-any.whl:

Publisher: pypi.yaml on scottprahl/RigolWFM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page