[Kst] extragear/graphics/kst/src/libkst

Barth Netterfield netterfield at astro.utoronto.ca
Sun Dec 10 02:00:30 CET 2006

SVN commit 611928 by netterfield:

Some comments explaining frames and skip.

 M  +21 -0     kstrvector.cpp  

--- trunk/extragear/graphics/kst/src/libkst/kstrvector.cpp #611927:611928
@@ -423,6 +423,27 @@
   return setLastUpdateResult(rc);
+// Some things to consider about the following routine...
+// Frames:
+//    Some data sources have data devided into frames.  Each field
+//    has a fixed number of samples per frame.  For some (eg, ascii files)
+//    each frame has 1 sample.  For others (eg, dirfiles) you may have more.
+//    Different fields in the same data source may have different samples per frame.
+//    Within a data source, it is assumed that the first sample of each frame is
+//    simultaneous between fields.
+// Last Frame Read:
+//    Only read the first sample of the last frame read, in cases where there are more
+//    than one sample per frame.   This allows for more sensible association of vectors
+//    into curves, when the X and Y vectors have different numbers of samples per frame.
+//    The rule is that we assume is that the first sample of each frame is simultaneous.
+// Skip reading:  
+//    -'Skip' means read 1 sample each 'Skip' frames (not read one sample,
+//     then skip 'Skip' samples or something else).
+//    -In order that the data are not re-drawn each time a new sample arrives, and to
+//     ensure the re-usability (via shifting) of previously read data, and to make a
+//     region of data look the same regardless of the chouse of f0, all samples
+//     read with skip enabled are read on 'skip boundries'... ie, the first samples of
+//     frame 0, Skip, 2*Skip... N*skip, and never M*Skip+1.
 KstObject::UpdateType KstRVector::doUpdate(bool force) {
   int i, k, shift, n_read=0;

More information about the Kst mailing list