Bug 1494 - Pulseview cannot import analog data
Summary: Pulseview cannot import analog data
Status: RESOLVED FIXED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Acquisition (show other bugs)
Version: 0.4.1
Hardware: x86 Windows
: Normal major
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-12 11:16 CET by Tobias
Modified: 2020-02-24 09:40 CET (History)
1 user (show)



Attachments
sigrokExport.csv (467.93 KB, application/vnd.ms-excel)
2020-02-12 11:18 CET, Tobias
Details
ownDataLogicOnly.csv (90 bytes, application/vnd.ms-excel)
2020-02-12 11:19 CET, Tobias
Details
ownDataIncludingAnalog.csv (182 bytes, application/vnd.ms-excel)
2020-02-12 11:19 CET, Tobias
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias 2020-02-12 11:16:15 CET
Hello Everyone,

[THANKS]
this is a really useful project for inspecting or visualizing technical data from anywhere! :-) Thanks for keeping it running!

[SHORT DESCRIPTION]
Therefore I want to import data using the CSV import. That fails on some files. I guess it is because of the presence of analog data.

[LONG DESCRIPTION]
I can easily import the bus.csv file from bug 635 without problems. (It is zipped and renamed to *.txt). So binary data import generally works (No problems with line endings)

Now I want to include analog data. Is that supported by Pulseview? I know it should work with the CLI but I cannot find features regarding CSV import for the GUI. (That (documentation) might be improved)
So generating CSV data by exporting it from Pulseview. I use the simulation session that is opened by default on opening when Pulseview has no loaded data. I hit run to create data - then stop it. Then export it to CSV file. (Attached: sigrokExport.csv) I tried various setup changes in the import dialog to import this file without success.
Then I created my own data using a spreadsheet editor. I created digital data only (Attached: ownDataLogicOnly.csv) and successfully imported it by telling the importer dialog to use ";" as separation and use the first line as header.
Then I added analog data to that file (Attached: ownDataIncludingAnalog.csv) where I used the same settings in the import dialog without success.

I would be happy to hear from you.
Comment 1 Tobias 2020-02-12 11:18:18 CET
Created attachment 588 [details]
sigrokExport.csv
Comment 2 Tobias 2020-02-12 11:19:21 CET
Created attachment 589 [details]
ownDataLogicOnly.csv
Comment 3 Tobias 2020-02-12 11:19:41 CET
Created attachment 590 [details]
ownDataIncludingAnalog.csv
Comment 4 Gerhard Sittig 2020-02-12 18:34:54 CET
Disclaimer: haven't checked the details yet, just want to ask to make sure.

Have you tried a recent development version, does the issue reproduce with 
a nightly build?  The CSV import was dramatically improved recently, just 
may not yet have been released in a stable version.

Notice that you need to declare the file content's layout by means of options 
for the CSV input module.  Only the simple case of all-logic data is supported 
by default, the more involved cases need non-default values for the options 
(but then support quite a variety of use cases, yours might be covered too).
Comment 5 Tobias 2020-02-17 11:26:41 CET
Hello Gerhard,

thanks for your quick reply.

Same for me:
"haven't checked the details yet, just want to ask to make sure."

Installing the newest nightly might take a little longer in my organisation. That is why I want to know if it is worth the waiting.

Did the CSV import changed in general or SINCE VERSION 0.4.1? (If so I'll check out the nightlies)
Comment 6 Gerhard Sittig 2020-02-17 17:31:06 CET
Hmm, let's see.  I haven't checked when Pulseview 0.4.1 was released.  Have 
noticed in the meantime that it's been a while since that release.

What I did not need to check is whether support for the CSV input format 
has changed.  It certainly did, and I was kind of involved. :-P  And I did 
state above that CSV input has improved.  The only open question was whether 
your version contained these changes or not.

  https://sigrok.org/commits/libsigrok/17c30d0..212769c

So yes, running a nightly build will make the improved CSV support available 
to you.  It's always worth checking against a recent version before reporting 
an issue.  And I guess you need not wait for "the organization" for a quick 
check, any machine will do when no special hardware is involved (you operate 
on mere files, don't you).

Am closing the report.  Feel free to re-open if a recent version doesn't work 
for your use case.
Comment 7 Tobias 2020-02-18 09:47:41 CET
Exactly the piece of information that was missing for me.

So I'll try to get the nightly here and give you a feedback.
Comment 8 Tobias 2020-02-24 09:40:11 CET
Hello Gerhard,

I was able to get an update of Pulseview and sigrok. Thanks for your help! Details below:

The updated import works with analog signals now.
Two Things were wrong:

1. The files I attached contain analog data with decimal comma instead of decimal dot. (15, 4 vs. 15.4)
2. The format of analog data columns has to be defined. (in this Pulseview version 0.5 I can do that in contrast to 0.4.1)

An example input format that works for the attached file ownDataIncludingAnalog.csv (When replacing the wrong decimal comma "," with "." in the analog data): 1b, 1b, 1a

I am documenting things here for others that come across.

I currently work with:

PulseView 0.5.0-git-9a22097
Qt 5.7.1
glibmm 2.42.0
Boost 1_60
libsigrok 0.6.0-git-8491cf7/4:0:0 (rt: 0.6.0-git-8491cf7/4:0:0)
- glib 2.44.1 (rt: 2.44.1/4401:1)
- libzip 1.5.1
- libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1)
- libusb-1.0 1.0.20.11003-rc3 API 0x01000104
- hidapi 0.8.0-rc1
- libftdi 1.4
- Host x86_64-w64-mingw32.static.posix, little-endian
- SCPI backends TCP, serial, USBTMC
libsigrokdecode 0.6.0-git-9677dcf/4:0:0 (rt: 0.6.0-git-9677dcf/4:0:0)
- glib 2.44.1 (rt: 2.44.1/4401:1)
- Python 3.4.4 / 0x30404f0 (API 1013, ABI 3)
- Host x86_64-w64-mingw32.static.posix, little-endian