Skip to main content

by Scott Prahl

A utility to process oscilloscope waveform files

Testing

Testing

Package

pypi Supported Python versions conda Downloads License github

Documentation

Docs doi

Explore

Oscilloscope Web Viewer kaitai-struct

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

LTspice reads a .wav source against a fixed -1 V to +1 V full-scale range. To keep the waveform’s own voltage scale and offset, export a piecewise linear .pwl file instead – a headerless, tab-separated table of time/voltage pairs. One file describes one waveform, so pick a channel when the capture has several:

prompt> wfmconvert --channel 2 pwl DS1102E.wfm

A full memory dump is often far more than you need. --trim keeps only a window of the given length, centered on the point the scope was displaying:

prompt> wfmconvert --trim 1ms csv DS1102E.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.

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.6.0.tar.gz (19.5 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.6.0-py3-none-any.whl (189.8 kB view details)

Uploaded Python 3

File details

Details for the file rigolwfm-1.6.0.tar.gz.

File metadata

  • Download URL: rigolwfm-1.6.0.tar.gz
  • Upload date:
  • Size: 19.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rigolwfm-1.6.0.tar.gz
Algorithm Hash digest
SHA256 d01a5ef31e8093892c69972449c2ab1357808f4c03096dcc6cf5bb83d5532c87
MD5 c8bb620569157b38271e67cd4f67ff0a
BLAKE2b-256 2bee1a1660f873c33a467108dd1c8739f7ec033503f25c9e2ec7be3bb04de17a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rigolwfm-1.6.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.6.0-py3-none-any.whl.

File metadata

  • Download URL: rigolwfm-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 189.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rigolwfm-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e359b0c59af4a92c9f8e1448c3fe1efb2cd5859982481fddfd1d1b7192740992
MD5 eaa08d922541ffcf5d40a79e13ea40e5
BLAKE2b-256 e7b0ba6626abcc823f327b7d5df358581aed3b798d08aa723d144e1c3a4115b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for rigolwfm-1.6.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.

Release history Release notifications | RSS feed

This release

1.6.0 This release

2 files

1.5.0

2 files

1.0.0

2 files

0.9.9

2 files

0.9.8

2 files

0.9.7

2 files

0.9.6

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

1 file

0.9.0

1 file

0.8.1

1 file

0.8.0

1 file

0.7.4

1 file

0.7.2

1 file

0.7.1

1 file

0.7.0

1 file

0.6.7

1 file

0.6.6

1 file

0.6.5

1 file

0.6.4

1 file

0.6.3

1 file

0.6.2

1 file

0.6.1

1 file

0.6.0

1 file

0.4.1

1 file

0.3.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page