No subject


Fri Jul 2 11:13:49 CEST 2010


to read data file with a formatted timestamp, from Nicolas it might be
a feature for the future.
I have tried to change the comment indicator to remove /.
I'm however afraid that this did not solve the problem. When I load
the file, I still get a vector with all 2010's. It does solve the
interpretation of the next columns (actual values).
I have made an example to show what I see.

The file=A0temp_rt_plot_file_0.txt contains the data set:
2010/06/24 09:54:32.761 32.84130859375000 32.21429443359375
2010/06/24 09:54:33.763 35.84130859375000 31.90078735351562
2010/06/24 09:54:34.762 37.84130859375000 32.21429443359375
2010/06/24 09:54:35.762 39.84130859375000 31.90078735351562
2010/06/24 09:54:36.761 31.84130859375000 31.90078735351562
2010/06/24 09:54:37.760 33.84130859375000 31.58731079101562
2010/06/24 09:54:37.768 34.84130859375000 31.58731079101562

The file=A0tst_tmpp_kst_script.js contains a very simple version of the
java script I use.

// grab the window
var w =3D Kst.windows[0];
// add a plot to the window
var p =3D new Plot(w);
// create new (editable) vectors.
// these could also be loaded from files.
//var v1 =3D new Vector(); var v2 =3D new Vector(); var v3 =3D new Vector()=
;
var s =3D new DataSource("temp_rt_plot_file_0.txt");//specify a data
source file system. See the DataSource Class for details
s.setConfiguration("commentindicators","#")
v1 =3D new DataVector(s,"1");//construct a new vector v and set its
value from field 1 of the source file
v1.tagName =3D "vector1"; //give the vector a name in the Data Manager
v2 =3D new DataVector(s,"2");//construct a new vector v and set its
value from field 1 of the source file
v2.tagName =3D "vector2"; //give the vector a name in the Data Manager
v3 =3D new DataVector(s,"3");//construct a new vector v and set its
value from field 1 of the source file
v3.tagName =3D "vector3"; //give the vector a name in the Data Manager
c =3D new Curve(v3,v2); // to construct a new curve using xv and yv
c.tagName =3D "v3 vs v2"; //define the name for the curve in the data manag=
er
// using the append method in the CurveCollection Class to show the
curve in plot
p.curves.append(c);
// label the x-axis of our plot
p.xAxis.label =3D "Time (s)";
p.xAxis.interpretation.input =3D 0;
p.xAxis.interpretation.output =3D 0; // =A0the ?time? vector needs to be sh=
own in
//the format: DD/MM/YY HH:MM:SS.
p.xAxis.interpretation.active =3D true; //Active the interpretation
If I load the javascript, then I can see 3 data vectors as expected.
The first one contains all 0's, the second all 9's, the third contains
the correct values.
What I would want is to have only 2 data vectors, the date and time in
1, the data in 2. Does anyone know how I can achieve this?
All help is most welcome!

Thank you,

Stijn


More information about the Kst mailing list