modelica-tools / csv-compare

Tool to compare curves from one csv files with curves from other csv files using an adjustable tolerance
https://www.modelica.org
BSD 3-Clause "New" or "Revised" License
26 stars 15 forks source link

Use one time vector for results in html reports #12

Open svenruetz opened 9 years ago

svenruetz commented 9 years ago

We have to check if the used jqplot library supports a different way of reading its data sets to be able to set a variable with the time values and use this variable instead of repeating vectors in the report.

Maybe the series to plot could be initialized seperately.

ghost commented 9 years ago

Another idea is to do some preprocessing in javascript:

function build_data(x, y, res) { if (x.length != y.lenght) { // Oh no, something is wrong with the universe! return; } for (var i = 0; i < x.length; i++) { res.push([x[i],y[i]); } }

// For each file: var base_time = [0, 0.001, 0.002, ..., 0.999, 1]; var result_time = [ .... ];

// For each variable: var base_trajectory = [12.3, 12.5, 12.9, ..., 23.1, 23.6]; var result_trajectory = [ ... ]

var data = [[],[],[],[]]

build_data(base_time, base_trajectory, data[0]); build_data(result_time, result_trajectory, data[1]);

Note that if base_time and result_time is the same, then one of them can be skipped. I also noticed that low and high tube have different time-scales than base and result! I guess that they will vary with each trajectory.

tbeu commented 8 years ago

@svenruetz Any idea when we can expect this enhancement?