Is it possible to make the Picoscope software use complete data for math channels and measurements?

Forum for discussing PicoScope version 6 (non-automotive version)
Post Reply
Mmm22
User
User
Posts: 2
Joined: Mon Jun 15, 2020 9:21 am

Is it possible to make the Picoscope software use complete data for math channels and measurements?

Post by Mmm22 »

Is it possible to make the Picoscope software use complete data (rather than downsampled one) for math channels and measurements?

Gerry
PICO STAFF
PICO STAFF
Posts: 1145
Joined: Mon Aug 11, 2014 11:14 am

Re: Is it possible to make the Picoscope software use complete data for math channels and measurements?

Post by Gerry »

Hi Mmm22,

PicoScope 6 software already does use raw (complete) data for Measurements and most Math Channels (the whole purpose of applying Measurements and Math Channels is to measure and manipulate what was actually acquired). PicoScope 6 is sent both downsampled and raw data, from the hardware, during a capture, and displays the data downsampled sufficiently for the zoom level selected, and for the resolution of the screen (no point in sending data points for display that can't be displayed) which is why fast zooming in and out is possible, while the raw data is being collected.

Measurements only apply to the data in the buffer, so they are fixed when zooming in and out, while most Math channels are like data channels, in that, where they have a 1-to-1 relationship with the data points, they will have different zoom levels reflecting on the different zoom levels of the data. So, if you zoom in fully then the Math manipulation of the channel data will be visible at the resolution of the raw data (once again, at smaller zoom values the full mathematically manipulated data values would not be visible on the screen). However, if you're using Math functions that reduce the number of samples during calculation, e.g. such as Averaging, and Filtering, then some of the data will have been discarded during the calculation, so for these functions you will not have the full data resolution of the raw data in the Math Channel.

To show you what I have been discussing I have an example that I created on a laptop, with a horizontal resolution much smaller than the number of samples that I will be capturing. As you can see from the below image 'Laptop screen resolution', the Horizontal value is 1366 (so the number of samples that can be plotted on the graph is even less). The psdata file and image 'Math Channel capture', below show a capture of a waveform with 100,000 data points. The raw data was exported as a CSV file for Excel, and the resulting Excel file and image 'Exported CSV with Math Channel', show that the Math channel data count contains as many points as the raw data channel (which is way beyond the capacity of the screen resolution) and you can see that the Math Channel data is continually changing (not duplicated) so it is at the sane resolution as the raw data.
Laptop screen resolution.png
Math Channel Capture.png
Math Channel capture.psdata
(155.33 KiB) Downloaded 311 times
Exported CSV with Math Channel.png
Exported CSV with Math Channel.xlsx
(2.49 MiB) Downloaded 310 times

Finally, the psdata file 'Manual measurement when zoomed in' also shows that the automatic measurement of both raw data and Math channels are the same, and the same as the Manual Measurement made when zoomed in sufficiently, and also the same as the Pk-Pk calculation done in Excel on the raw data in the previous Excel file and image file 'Exported CSV with Math Channel' (to within the precision of the tools), so the Measurements are being done at the resolution of the raw data.
Manual measurement when zoomed in.psdata
(153.79 KiB) Downloaded 314 times

Regards,

Gerry
Gerry
Technical Specialist

Mmm22
User
User
Posts: 2
Joined: Mon Jun 15, 2020 9:21 am

Re: Is it possible to make the Picoscope software use complete data for math channels and measurements?

Post by Mmm22 »

Gerry wrote:
Mon Sep 21, 2020 3:11 pm
PicoScope 6 is sent both downsampled and raw data, from the hardware, during a capture, and displays the data downsampled sufficiently for the zoom level selected
Hi Gerry,
I thought that the whole reason for downsampling is to reduce the data transfer time via USB. But you say that downsampled data actually increases the amount of data sent, since it is in addition to the raw data. Is that right?

Gerry
PICO STAFF
PICO STAFF
Posts: 1145
Joined: Mon Aug 11, 2014 11:14 am

Re: Is it possible to make the Picoscope software use complete data for math channels and measurements?

Post by Gerry »

Hi Mmm22,

UPDATE 31/1/23
As a result of answering a recent customer question, I was reminded that this post was still incorrect. So, just for completeness (i.e. to correct the following posts as well), the first paragraph has been changed to the following 2 paragraphs:

Our PicoScope software has 2 Sampling Modes, which are described on page 108 of our PicoScope 6 User Guide (see here: https://www.picotech.com/download/manua ... -guide.pdf). When you’re using Slow Sampling Mode, while a capture is running, the PicoScope Software just displays the incoming data, for an Input Channel, with a zoom level of x1, which means that when you zoom in, the display just changes to a lower resolution image of the new incoming data being captured. However, a Math Channel (using the Input Channel for its calculation) in Slow Sampling Mode will still be unchanged until the acquisition has completed (i.e. it either (a) just retains the use of the screen buffer data during a further capture, as described for an Input Channel when performing a Fast Sample Mode capture, next, or (b) is not displayed at all, for a 1st capture). The further capture is demonstrated in the following motion Gif file and data file, where the blue trace is the Input channel, and the black trace is the Math Channel:
Math Channel and Input Channel display during Slow Sample Mode Capture.gif
When you're using Fast Sampling Mode, for Longer Timebases (which you can do by changing a value in the Preferences), while a capture has started but isn't complete, there is no display at all until a first capture has been completed. If the capture is not a 1st capture then the PicoScope Software just displays the data in the screen buffer. This means that (a) if you change the Timebase, and then start a new capture, the displayed old waveform will stretch or shrink horizontally (depending on whether it is a shorter or longer Timebase value) or (b) if you change the Input Range, and then start a new capture, the displayed old waveform will stretch or shrink vertically, or (c) if you zoom in or zoom out, and then start a new capture, the displayed old waveform will stretch of shrink, horizontally and/or vertically, depending upon how you have zoomed in horizontally, vertically or both.

At higher USB speeds (USB 2 and USB 3) a common misconception is that the USB medium limits the practical rate at which we can transfer the data, but it's the processing at the computer end of the USB bus that is the limiting factor. Once the data arrives and is available for the software it has to do a bunch of things with it before it gets displayed, and if you are asking the PicoScope 6 software to perform a number of functions on the data as well, it can quickly become too difficult to keep up with the rate at which the data is coming across. So, if the data wasn't being down-sampled, you would keep getting freezing displays.

When working with the SDK you can specify how all of the data is transferred, including down-sampling to reduce the time taken to transfer and process the data. So, in this case the actual transfer rate, as opposed to the just display rate, is increased.

Regards,

Gerry
Gerry
Technical Specialist

bennog
Advanced User
Advanced User
Posts: 208
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: Is it possible to make the Picoscope software use complete data for math channels and measurements?

Post by bennog »

I think there is a misunderstanding.

The math data is always calculated by the windows PC, but there are 2 situations.
1. live view (the math channel data is calculated and shown from the downsampled data)
this is because during live view (in all situations ?) there is only downsampled data send to the pc.
2. When stopped the math cannel data is calculated from the real downloaded data)

This is my understanding how the data collection works on picoscope.
I think this is not the case when the scope works in streaming mode.

Benno

Gerry
PICO STAFF
PICO STAFF
Posts: 1145
Joined: Mon Aug 11, 2014 11:14 am

Re: Is it possible to make the Picoscope software use complete data for math channels and measurements?

Post by Gerry »

Hi Mmm22,

In hindsight, saying "PicoScope 6 is sent both downsampled and raw data, from the hardware, during a capture, and displays the data downsampled sufficiently for the zoom level selected" is a bit misleading for Fast Sampling Mode, and I could have made that clearer. Bennog's description is better (so thanks for that).

In Slow Sampling Mode (when the data is being streamed to the Computer, i.e. transferred as it is being captured) things are different because you are typically waiting for the capture to complete. So, the displayed data is fixed for a Zoom level of 1. Once captured you can zoom as normal.

Regards,

Gerry
Gerry
Technical Specialist

Post Reply