Module RigolDSWrap
[hide private]
[frames] | no frames]

Module RigolDSWrap

source code

RigolDSWrap.py - A Python Interface to Rigol DS1000 Oscilloscope Library.

Acquire and read waveform data from a Rigol DS1052E (all DS 1000 series perhaps) oscilloscope. Provide basic mechanisms for issuing all other commands and queries.

Author: Nick Glazzard 2013

Classes [hide private]
  RigolDS
Class that encapsulates some Rigol DS1052E functionality.
Functions [hide private]
 
argerr() source code
 
fourier_spectrum(nsamples, data, deltat, logdb, power, rms)
Given nsamples of real voltage data spaced deltat seconds apart, find the spectrum of the data (its frequency components).
source code
 
time_plot(nsamples, data, deltat, hoff, title=None)
Create a simple amplitude versus time plot using Matplotlib.
source code
 
freq_plot(nfreqs, spectrum, freq_step, max_freq, title=None, logdb=False, fmin=0.0, fmax=10000.0, ylo=-60.0, yhi=0.0)
Create an amplitude versus frequncy plot for data analysed with fourier_spectrum().
source code
Variables [hide private]
  lib = cdll.LoadLibrary('./rigol_ds1000.so')
Function Details [hide private]

fourier_spectrum(nsamples, data, deltat, logdb, power, rms)

source code 
Given nsamples of real voltage data spaced deltat seconds apart, find the spectrum of the
data (its frequency components). If logdb, return in dBV, otherwise linear volts.
If power, return the power spectrum, otherwise the amplitude spectrum.
If rms, use RMS volts, otherwise use peak-peak volts.
Also return the number of frequency samples, the frequency sample spacing and maximum frequency.
Note: The results from this agree pretty much with my HP 3582A FFT Spectrum Analyzer,
      although that has higher dynamic range than the 8 bit scope.