Incorrect CSV writing behaviour

Post any questions related to the new PicoScope 7 software
Post Reply
fborchers
Newbie
Posts: 0
Joined: Mon Apr 29, 2024 12:34 pm

Incorrect CSV writing behaviour

Post by fborchers »

Hi,

I am currently running PicoScope 7 on Linux connected to a 4824PS. I experience very inconsistent behaviour when saving the results as csv files. For example sampling at 800kS/s for 5s, I should get about 4MS. If I check the resultant csv file the file has 2981907 lines, far from the expected 4MS. Plotting the data yields the timeseries as shown in the attachment (this is not an effect of saving incompletely sampled waveforms, as the complete waveform is visible in PS7).
This behaviour is however inconsistent. After starting the waveform collection and stopping it after collecting some waveforms the resultant csv files actually contain 4M lines (plus header etc.) of data. While not systematic I was able to reproduce this behaviour for

* saving 'All', 'Current' and 'Selection'
* sampling rates 500kS/s - 1 MS/s
* 500kS - 100MS

I was even able to save 5GB of data into a single csv file without this issue occuring.
This issue is somewhat annoying and I would appreciate any help in this regard.

Cheers
Felix
Attachments
Screenshot from 2024-05-27 15-42-57.png

fborchers
Newbie
Posts: 0
Joined: Mon Apr 29, 2024 12:34 pm

Re: Incorrect CSV writing behaviour

Post by fborchers »

Hi,

as an addition to the above problem I made another observation for the following steps

1. Collect a set of waveforms.
2. Save 'All' in psdata file file1.psdata
3. Save 'All' in csv format file1_X.csv
4. Load the file1.psdata file
5. Save again 'All' in csv format

The csv files saved in step 3 and step 5 are identical. So if the waveforms are saved correctly in step 3 they will also be save correctly in step 5 and vice versa. I uploaded two example psdata files (one with correct and one with incorrect csv output) to the cloud accessible via the link:
https://polybox.ethz.ch/index.php/s/ilYeDyVrPc22B7F

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

Re: Incorrect CSV writing behaviour

Post by bennog »

You need to get all samples in a single buffer, not in multiple buffers.
So you need to set 2 sec/div and only capture 1 screen.
You will always lose samples between the screens.

Benno

fborchers
Newbie
Posts: 0
Joined: Mon Apr 29, 2024 12:34 pm

Re: Incorrect CSV writing behaviour

Post by fborchers »

Hi Benno,

thanks for your reply. Just to clarify. For the above plot I chose 500ms/div, which shows as a total time of 5s for a single waveform. Isn't a single waveform captured in one buffer? I get the following in PS7 vs plotting using matplotlib. The number of datapoints saved in the csv are 2768912 instead of 4MS (counted w/ `cat file1.csv | wc -l`). There are no gaps visible in the PS7 software. The image in the first post does not consist of multiple waveforms stitched together, but a single saved waveform.
I hope this clarifies the issue.

Cheers,
Felix
Attachments
Screenshot from 2024-05-28 14-20-38.png
Screenshot from 2024-05-28 14-21-52.png

Post Reply