Small piece of code, I'm using to add some automation to measurements. Currently i'm using PicoScope 2206b, so code is checked and debuged on this platform. In order to get it working i've downloaded PicoScope SDK from https://www.picotech.com/downloads . Needed libraries and dependencies:
picoscope
pylab
numpy
peakutils
for further information please go to wiki.