Hi there!
We are trying to replicate settings from the GUI in a Python program. We are using a 5000A series USB PicoScope.
As reported by the PicoScope 6 Beta GUI program on Linux, we have
Sample interval: 56 ns
Sample rate: 17.86 MS/s
No. samples: 892,857
Hardware Resolution: 14 bit
Channel: A
Range: +-2V
Coupling: DC
Res. Enhancement: 18.0 bits
How do I calculate the timebase from this? To get the 18 bits resolution enhancement, if I understand correctly, I need to use RATIO_MODE_AVERAGE, averaging over 256 samples. Should I then use a timebase that corresponds to 256x the sampling rate I would otherwise use? Or should I use a timebase that corresponds to the 56 ns Sample interval reported by the GUI? Is there a way to see what low level settings the GUI is using, instead of this high level info? E.g. timebase and AVERAGE parameters instead of "Sample interval" and "Res. Enhancement". Can this be gathered from a .pssettings file somehow?
When I've captured the data using my Python program, is there an API you guys provide for saving it in a format that can be read by the GUI application (*.psdata), so my colleagues can investigate the data using that GUI they are familiar with? If not, can I put that on a feature wish list?
Investigating this, I'm not sure how I can replicate what the GUI does here. According to https://www.picotech.com/library/oscilloscopes/resolution-enhancement 18 bits enhanced resolution from 14 bits hardware resolution would mean averaging groups of 256 samples. However, then I would need to change the timebase so that 256x as many samples are collected in the same time interval, but the timebase for the PicoScope 5000A series does not go that low. 8 ns (timebase 3) is the lowest timbase for 14 bit, but I would need 56 ns / 256 which is well, below 1 ns.
In case anyone runs into the same problem, here's the explanation I got from tech support. Apparently, the RATIO_MODE_AVERAGE uses a different averaging strategy compared to the GUI. The RATIO_MODE_AVERAGE will average blocks of 256 values down to one value, reducing the number of samples 256-fold. The GUI when operating in enhanced resolution mode will do a windowed average, moving along the samples and averaging 256 values at a time, but only advancing one step to get each new value. The result is that it has approximately the same number of samples, only dropping the first 127 and the last 127/128 samples.