Installation guide

PicoScope 4000 Series (A API) Programmer's Guide 7
Copyright © 2008-2014 Pico Technology Ltd. All rights reserved. ps4000apg.en r1
3.5
Downsampling
The driver can optionally apply a data reduction, or downsampling, process before
returning data to the application. Downsampling is done by firmware on the device
and is generally faster than using the PC's own processor(s). You instruct the driver to
downsample by passing a downSampleRatioMode argument to one of the data-
retrieval functions such as ps4000aGetValues. You must also pass in an argument
called downSampleRatio: how many raw samples are to be combined into each
processed sample.
You can optionally retrieve data using more than one downsampling mode with a
single call to ps4000aGetValues. Set up a buffer for each downsampling mode by
calling ps4000aSetDataBuffer. Then, when calling ps4000aGetValues, set
downSampleRatioMode to the bitwise OR of the required downsampling modes.
The available downsampling modes are:
PS4000A_RATIO_MODE_NONE (0)
No downsampling is performed. The downSampleRatio parameter is ignored.
PS4000A_RATIO_MODE_AGGREGATE (1)
The aggregate method generates two buffers of data for every channel, one
containing the minimum sample value for every block of downSampleRatio raw
samples, and the other containing the maximum value.
PS4000A_RATIO_MODE_DECIMATE (2)
The decimate method returns the first sample in every block of downSampleRatio
successive samples and discards all the other samples.
PS4000A_RATIO_MODE_AVERAGE (4)
The average method returns the sum of all the samples in each block of
downSampleRatio samples, divided by the size of the block.
PS4000A_RATIO_MODE_DISTRIBUTION (8)
This mode is not implemented.