Bug 17 - libsigrok does not communicate precision and accuracy data
Summary: libsigrok does not communicate precision and accuracy data
Status: RESOLVED DUPLICATE of bug 640
Alias: None
Product: libsigrok
Classification: Unclassified
Component: Other (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-19 19:38 CET by mrnuke
Modified: 2016-01-03 23:49 CET (History)
3 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mrnuke 2012-12-19 19:38:52 CET
libsigrok does not have a mechanism for specifying accuracy and precision data. There's currently no way for a frontend to tell how reliable the measurement is (accuracy). Data from different devices looks identical, although some measurements carry more information than others (precision).

This renders libsigrok unsuitable for scientific applications. There isn't enough information to determine uncertainties in derived quantities (i.e. Power, from a device measuring voltage and a device measuring current). There's no way to determine if the difference from a differential arrangement (i.e. current on live line minus current on neutral line) is significant.

Precision data is immediately available from the number of digits displayed by the device. Accuracy is more complicated, as it depends on device specifics. sigrok needs both.

For more details: http://sigrok.org/wiki/High_precision_analog

Marking this as a bug to serve as a blocker for the 0.2.0 release tracker.
Comment 1 Uwe Hermann 2015-12-28 13:27:09 CET
Merging this with #640. Parts of the "analog2" support was implemented already, the remaining parts are tracked in #640.

*** This bug has been marked as a duplicate of bug 640 ***
Comment 2 Stefan Brüns 2015-12-30 00:20:12 CET
Although the current metadata for analog samples is quite good already, I miss one attribute: range or min/max

Multimeters provide data as integers, but both an 22000 and an 6000 count DMM will output an int16_t.

Scopes output 8 to 16 bit of sample data, but an 14 bit value may be left or right aligned, thus range may be either 0...65532 or 0...16383.

Float samples are typically in a -1.0 ... +1.0 range, but may as well be outside of this range.

This is an attribute mostly useful for visualization, it does not affect physical interpretation. It should be specified as either two integers (min/max) or two doubles, depending on is_float, and refer to the raw sample value.
Comment 3 Martin Ling 2016-01-03 23:49:15 CET
(In reply to comment #2)

Stefan, yours is a good point and I have filed a new bug #729 for this.