rigolwfm

Parsers for .wfm binary files created by a wide range of Rigol oscilloscopes

https://github.com/scottprahl/rigolwfm

Science Score: 46.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    1 of 9 committers (11.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.2%) to scientific vocabulary

Keywords

kaitai-struct oscilloscope parser rigol

Keywords from Contributors

dispersion fibers modes noise optical refraction sellmeier waveguide
Last synced: 6 months ago · JSON representation

Repository

Parsers for .wfm binary files created by a wide range of Rigol oscilloscopes

Basic Info
  • Host: GitHub
  • Owner: scottprahl
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 44.5 MB
Statistics
  • Stars: 59
  • Watchers: 5
  • Forks: 8
  • Open Issues: 9
  • Releases: 23
Topics
kaitai-struct oscilloscope parser rigol
Created almost 6 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License Citation

README.rst

.. |pypi-badge| image:: https://img.shields.io/pypi/v/RigolWFM?color=68CA66
   :target: https://pypi.org/project/RigolWFM/
   :alt: pypi

.. |github-badge| image:: https://img.shields.io/github/v/tag/scottprahl/RigolWFM?label=github&color=68CA66
   :target: https://github.com/scottprahl/RigolWFM
   :alt: github

.. |conda-badge| image:: https://img.shields.io/conda/vn/conda-forge/RigolWFM?label=conda&color=68CA66
   :target: https://github.com/conda-forge/RigolWFM-feedstock
   :alt: conda

.. |kaitaistruct| image:: https://img.shields.io/badge/kaitai-struct-68CA66
   :target: https://ide.kaitai.io
   :alt: kaitai-struct

.. |zenodo-badge| image:: https://zenodo.org/badge/244228290.svg
   :target: https://zenodo.org/badge/latestdoi/244228290
   :alt: doi

.. |license-badge| image:: https://img.shields.io/github/license/scottprahl/RigolWFM?color=68CA66
   :target: https://github.com/scottprahl/RigolWFM/blob/main/LICENSE.txt
   :alt: License

.. |test-badge| image:: https://github.com/scottprahl/RigolWFM/actions/workflows/test.yaml/badge.svg
   :target: https://github.com/scottprahl/RigolWFM/actions/workflows/test.yaml
   :alt: Testing

.. |docs-badge| image:: https://readthedocs.org/projects/rigolwfm/badge?color=68CA66
   :target: https://rigolwfm.readthedocs.io
   :alt: Docs

.. |downloads-badge| image:: https://img.shields.io/pypi/dm/RigolWFM?color=68CA66
   :target: https://pypi.org/project/RigolWFM/
   :alt: Downloads

RigolWFM
=========

by Scott Prahl

A utility to process Rigol oscilloscope ``.wfm`` files
------------------------------------------------------

|pypi-badge| |github-badge| |conda-badge| |kaitaistruct| |zenodo-badge|

|license-badge| |test-badge| |docs-badge| |downloads-badge|

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).  

Documentation can be found at 

Installation
---------------

You can install locally using pip::
    
    pip install --user RigolWFM

or ``conda``::

    conda install -c conda-forge RigolWFM

or use immediately by clicking the Google Colaboratory button below

.. image:: https://colab.research.google.com/assets/colab-badge.svg
  :target: https://colab.research.google.com/github/scottprahl/RigolWFM/blob/main
  :alt: Colab

or `analyze your files using the kaitai struct IDE `_ (you will need to manually upload the appropriate `.ksy` file and your `.wfm` to the IDE).  This 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 or not parsing correctly.


Usage
-----

Once ``RigolWFM`` is installed, you 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 just wanted to convert channel 1 from a single file to ``.csv`` then::

   prompt> wfmconvert --channel 1 E 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 E wav *.wfm

If you want to create a ``.wav`` file with channels one and four as signals (and autoscale for use with Audacity or Sigrok Pulseview)::

   prompt> wfmconvert --autoscale --channel 14 E wav *.wfm

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:

* DS1000B tested 
* DS1000C tested (two files only)
* DS1000D tested (one file only)
* 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.


* Shein's Pascal program 
* Wagenaars's Matlab script 
* Steele's C program 
* Blaicher's python code 
* Szkutnik's python code 
* Cat-Ion's python code 
* Šolc's python code 
* Contributions from 
* A LabView program I got from Rigol support
* Rigol's documentation of the 1000E, 1000Z, 2000, and 6000 file formats.


Source code repository
-------------------------------------------

    

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

Owner

  • Name: Scott Prahl
  • Login: scottprahl
  • Kind: user
  • Location: Portland, Oregon
  • Company: Oregon Institute of Technology

GitHub Events

Total
  • Issues event: 3
  • Watch event: 13
  • Issue comment event: 1
Last Year
  • Issues event: 3
  • Watch event: 13
  • Issue comment event: 1

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 511
  • Total Committers: 9
  • Avg Commits per committer: 56.778
  • Development Distribution Score (DDS): 0.133
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Scott Prahl s****t@p****m 443
Work Prahl p****l@b****u 37
Matthias Blaicher m****s@b****m 20
James Pitts j****m@c****m 4
GitHub Action a****n@g****m 3
Tomaz Solc t****c@t****g 1
Michael Stapelberg s****g@g****m 1
Karl Palsson k****p@t****u 1
Wouter van der Vinne w****r@e****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 19
  • Total pull requests: 10
  • Average time to close issues: 18 days
  • Average time to close pull requests: 15 days
  • Total issue authors: 14
  • Total pull request authors: 8
  • Average comments per issue: 4.32
  • Average comments per pull request: 0.9
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: 36 minutes
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • scottprahl (5)
  • stapelberg (2)
  • benvanloock (1)
  • danbates2 (1)
  • goodjing50 (1)
  • svpcom (1)
  • JoetVer (1)
  • Phi1983 (1)
  • PeterGrace (1)
  • beta-tester (1)
  • mh- (1)
  • AlejandroBizzotto (1)
  • ziceva (1)
  • byzantic (1)
Pull Request Authors
  • scottprahl (2)
  • wvdv2002 (2)
  • jamespitts (1)
  • avian2 (1)
  • karlp (1)
  • brainstorm (1)
  • dependabot[bot] (1)
  • stapelberg (1)
Top Labels
Issue Labels
Pull Request Labels
bug (1) enhancement (1) dependencies (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 334 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 26
  • Total maintainers: 1
pypi.org: rigolwfm

Read and parse Rigol Oscilloscope WFM files

  • Versions: 26
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 334 Last month
Rankings
Dependent packages count: 10.0%
Stargazers count: 10.2%
Forks count: 13.3%
Average: 14.0%
Downloads: 14.9%
Dependent repos count: 21.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

docs/requirements.txt pypi
  • RigolWFM *
  • kaitaistruct *
  • matplotlib *
  • nbsphinx *
  • numpy *
  • sphinx-automodapi *
  • sphinx-rtd-theme *
requirements-dev.txt pypi
  • check-manifest * development
  • flake8 * development
  • kaitaistruct * development
  • ksylint * development
  • markupsafe ==2.0.1 development
  • matplotlib * development
  • nbconvert * development
  • nbformat * development
  • nbsphinx * development
  • numpy * development
  • pydocstyle * development
  • pylint * development
  • pyroma * development
  • pytest * development
  • rstcheck * development
  • sphinx-automodapi * development
  • sphinx-rtd-theme * development
  • tox * development
  • yamllint * development
requirements.txt pypi
  • kaitaistruct *
  • matplotlib *
  • numpy *