An interactive Python Console!
Access hardware using the Instance 'I'. e.g. I.get_average_voltage('CH1')
In [1]: from pylab import * #Library Containing plotting utilities
In [2]: %matplotlib inline #This makes plots appear alongside text instead of opening a separate window
In [3]: I.set_sine2(1000) #Set sine wave 2 to 1000Hz. Connect a wire from SINE2 to CH1
Out[3]: 1000.0
In [4]: x,y=I.capture1('CH1',10000,1) #Use the oscilloscope function to record 10000 datapoints from CH1 input with 1uS gap between each sample.
In [5]: plot(x,y)
Out[5]: [<matplotlib.lines.Line2D at 0x7fb5f5258f90>]
In [6]: analytics.sineFit(x,y) #This will try to fit the data to a standard sinusoidal function with parameters {amplitude, frequency, offset, phase}
Out[6]:
[6.3831692601930508,
999.98913137576847,
-0.0018713989523442658,
46.484812106445695]
In [7]: