# [Kst] [kst] [Bug 352367] vectors too short. last frame not plotted

via KDE Bugzilla bugzilla_noreply at kde.org
Fri Feb 26 00:37:59 UTC 2016

```https://bugs.kde.org/show_bug.cgi?id=352367

--- Comment #3 from netterfield at astro.utoronto.ca ---
On February 25, 2016 01:06:06 PM you wrote:
> https://bugs.kde.org/show_bug.cgi?id=352367
>
> --- Comment #2 from Michael Brewer <brewer at astro.umass.edu> ---
> Following this logic, if my data set consisted of less than 201 samples, KST
> would display nothing.

Right: Imagine you want to plot a field which is 100 samples per frame vs
something that is 1 samples per frame.  And you want to plot one frame.  Maybe
because your datasource is only one frame long.  What should you do?

There is clearly no general solution to this problem.

> In my opinion, the INDEX vector should always extend
> to one point beyond the number of frames (or partial frames) present in the
> data set to capture all of the data that the user may be interested in.

INDEX is nothing special: it is something provided by some data sources.  It
would be just the same if we were talking about any field sampled once per
frame; say.... "Time".  So all vectors from a data source would need to do
this.  But then we would need to know to ignore the last extrapolated sample
for everything other than interpolating.

> It
> is like the X axis on a plot which should extend slightly past the end of
> the data. Another way to look at this is that each frame represents a unit
> of time (one second in my case). If I have 10 seconds of data, then the
> INDEX field shoold extend from 0 seconds to 10 seconds, not from 0 seconds
> to 9 seconds.

Formally, Index goes from 0 to 10 - (1/sample rate), but it needs to be an
integer.

>
> In fact, my data set contains fields with different sample rates. Most of
> the data is sampled at 200 Hz. But some of it is sampled at 10 Hz and some
> at 1 Hz. Extending the INDEX vector by 1 would capture all of this data.

It is a tricky problem to get right everywhere, but I will mull upon it
further (and not close the bug...)

--
You are receiving this mail because:
You are the assignee for the bug.
```