dnvgl / qats

Python library and GUI for efficient processing and visualization of time series.
MIT License
38 stars 10 forks source link

data file documentation #90

Open TorsteinSkar opened 2 years ago

TorsteinSkar commented 2 years ago

I'm using qats for plotting of time series that originate from un-supported software, which i modify in notepad. In this context, it would be very good if the docs had a format specification for at least one of the supported formats.

tovop commented 2 years ago

Hi @TorsteinSkar. My apologies for the late response, I found this issue by coincidence. I guess you have already found a solution or left us for something else 😉

I guess that the easiest way is to arrange the data as columns with a (time in first column and the data series in the next ...). Remember to put the names of the data series in the first row. You can choose to use the CSV format (see example below) or a basic ASCII formatted text file where the columns are separated with space or tab.

image

Such data files can be read directly with the TsDB class (it recognizes the file suffix .csv/.dat and uses the CSV parser and the DAT parser

Note that this structure assume that all data series share the same array of timestamps. If you need to handle timeseries with unique time arrays you need to read each time series separately, construct a TimeSeries object and add that to a TsDB object.

Thanks for suggesting improvements to the documentation. We will add a section on data formats.