Wfm

class RigolWFM.wfm.Wfm(file_name)[source]

Bases: object

Class with parsed data from a .wfm file.

Methods Summary

best_scaling()

Return appropriate scaling for plot.

csv()

Return a string of comma separated values.

describe()

Return a string describing the contents of a Rigol wfm file.

from_file(file_name, model[, selected])

Create Wfm object from a file.

from_url(url, model[, selected])

Return a waveform object given a URL.

plot()

Plot the data.

sigrokcsv()

Return a string of comma separated values for sigrok.

wav(wav_filename[, autoscale])

Save data as a WAV file for use with LTspice or Sigrok.

Methods Documentation

best_scaling()[source]

Return appropriate scaling for plot.

csv()[source]

Return a string of comma separated values.

describe()[source]

Return a string describing the contents of a Rigol wfm file.

classmethod from_file(file_name, model, selected='1234')[source]

Create Wfm object from a file.

Parameters:
  • file_name – name of file

  • model – Rigol Oscilloscope used, e.g., ‘E’ or ‘Z’

  • selected – string of channels to process e.g., ‘12’

Returns:

a wfm object for the file

classmethod from_url(url, model, selected='1234')[source]

Return a waveform object given a URL.

This is a bit complicated because the parser must have a local file to work with. The process is to download the file to a temporary location and then process that file. There is a lot that can go wrong - bad url, bad download, or an error parsing the file.

Parameters:
  • url – location of the file

  • model – Rigol Oscilloscope used, e.g., ‘E’ or ‘Z’

  • selected – string of channels to process e.g., ‘12’

Returns:

a wfm object for the file

plot()[source]

Plot the data.

sigrokcsv()[source]

Return a string of comma separated values for sigrok.

wav(wav_filename, autoscale=False)[source]

Save data as a WAV file for use with LTspice or Sigrok.