OpenCurves
0.9
|
Open Curves supports CSV style, text based data files as input. Input files are considered a tabular format, where each line represents a new row in the table, and each delimited item corresponds to the table columns. The columns are mapped to plotted items appearing in the plot view, and one column may optionally identify the timestamp for each row.
Open Curves does its best to deduce the table definition from the first few lines of the data file. Columns may be whitespace or comma delimited and the first line of the file may optionally identify column headings. However, each line of an input file must have the same number of columns. Each column data item, after the headings line, must be of a numeric format; integer, floating point or scientific notation (see below).
Column headings are parsed differently to data lines and support some additional whitespace allowances. Specifically, whitespace may be used to delimit columns, however, the space character may also be included in column names provided that the space characters are followed by an open bracket '('. This is specifically to support column names of the form: "data (units)". That is a named column followed by a specification of the units for that column. Valid column names are shown below.
Unicode formats are supported provided the file includes a byte-order-mark (BOM).
This page documents how text file sources are loaded. For details of how real time sources are handled see Real Time Sources.
Column headings are whitespace and/or comma separated. Additionally, a column heading may include spaces after non-whitespace before the next open bracket character. Examples are provided below:
Headings Line | Heading 1 | Heading 2 | Heading 3 |
---|---|---|---|
timestamp speed acceleration | timestamp | speed | acceleration |
timestamp,speed,acceleration | timestamp | speed | acceleration |
timestamp , speed , acceleration | timestamp | speed | acceleration |
timestamp(s) speed(m/s) acceleration(m/s/s) | timestamp(s) | speed(m/s) | acceleration(m/s/s) |
timestamp (s) speed (m/s) acceleration (m/s/s) | timestamp (s) | speed (m/s) | acceleration (m/s/s) |
Open Curves data items can be of any string format which can be parsed to a valid double-precision floating point type. Integer, floating point and scientific notation are all supported. Infinite and not-a-number values are also supported. Numeric parsing uses Qt's QString
double parsing. Hexadecimal values are not supported and values which fail parsing are interpreted as zero.
Examples of supported values are:
42
-382
3.141
-2.8
inf
-inf
nan
nan(snan)
The last items correspond to infinite and not-a-number results.