""" Connect the GND of Phoenix and Analog Box. Connect SG2 output to CH) through a level shifter. """ import phm, phmath p=phm.phm() p.select_adc(0) p.set_adc_size(1) data = p.read_block(800,10,1) res = phmath.fit_sine(data) p.plot(res[0]) # first element is data + fit print res[1][1]*1.0e6 # parameters Amplitude, freq, phase, Offset raw_input() # wait for a Keypress