Git Product home page Git Product logo

rigolwfm's Introduction

Using .wfm files created by Rigol scopes

This project is intended to be a comprehensive resource for interpreting waveform .wmf files created by any Rigol oscilloscope. Open source (and Rigol's own applications) that parse/convert Rigol's binary .wfm files are sadly balkanized: each program tends to support a single oscilloscope group and the available efforts are spread across a range of languages.

This project leverages a domain specific language (kaitai struct) to represent the binary files. Once a binary file has been described in this text format, parsers can be generated for a wide range of languages (C++/STL, C#, Go, Java, JavaScript, Lua, Perl, PHP, Python, and Ruby).

Kaitai Struct <https://kaitai.io> also has a slick web IDE <https://ide.kaitai.io> that allows one to interactively reverse engineer binary file formats directly in your browser. This is super helpful for those Rigol .wfm formats that are undocumented.

Installation

The RigolWFM package can be installed via pip:

pip install RigolWFM

Usage

Once this is done, one can plot the signals from binary Rigol .wfm files by:

import matplotlib.pyplot as plt
import RigolWFM.wfm as rigol

filename = 'example.wfm'
scope = 'DS1000E'

w = rigol.Wfm.from_file(filename, scope)
w.plot()
plt.show()

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 E csv *.wfm

If you wanted to create .wav files for use with LTSpice then this would create them:

prompt> wfmconvert E wav *.wfm

More extensive documentation can be found at <https://RigolWFM.readthedocs.io>

Status

There is a bit of work remaining (testing, validation, repackaging) but there are binary file descriptions for .wfm files created by the following scopes:

  • DS1000C untested
  • DS1000E tested
  • DS1000Z tested, but with wonky voltage offsets
  • DS2000 tested
  • DS4000 tested
  • DS6000 untested

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.

Source code repository

<https://github.com/scottprahl/RigolWFM>

License

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

rigolwfm's People

Contributors

avian2 avatar mabl avatar scottprahl avatar stapelberg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.