[Kst] Kst filter plugin: cumulative moving average

Barth Netterfield netterfield at astro.utoronto.ca
Thu Sep 13 19:39:04 UTC 2012


David,

David:
Thanks!  Looks good, and I think this will be useful.

A couple comments:
-you have implemented a cumulative average, not a moving average, so I
changed or removed "Moving" in all of the user visible text.
-you didn't list yourself in the copyright list.  Are you explicitly
assigning the copyright over to me, or do you want to be listed.
If you are retaining copyright, do I have your explicit permission to
commit this to svn, and release it under the GPL?

Nicholas:
A cumulative average is a filter which replaces each sample with the
average of all samples up to that point.  Each sample in the vector has had
a different filter applied to it, so its behavior is... different.

An example use might be to find the long term average value of a sensor
(eg, a gyroscope offset).  You would plot this rather than just looking at
the mean of the vector in order to see how well the value is converging. In
a real-time application it might commonly be used in 'read-to-end' mode.

A 'moving average' sounds more like what I typically call a 'boxcar' filter
- which replaces each sample with the average of N samples around it.  In
kst, this is what 'boxcar average' does to data vectors as a very simple
(and, rather leaky) anti-aliasing filter before decimation.

cbn

On Mon, Sep 3, 2012 at 10:54 PM, David Kruger <dxk105 at cwru.edu> wrote:

> I've recently been using Kst quite a bit lately with my work. It's a
> fantastic visualizer, I really appreciate the work you all have put into it.
>
> My data sets are often noisy, and I was tired of writing equations or
> pre-processing them to reduce the noise, so I made a plugin to do a simple
> cumulative moving average on the set. I more-or-less copied cumulativesum.
>
> I thought that others may find it useful, so the patch is attached. It
> applies against kst-2.0.6. If there is a more proper means to submit the
> changes for consideration let me know and I will re-submit that way.
>
> Thanks very much,
> -David Kruger
>
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
>
>


-- 
C. Barth Netterfield
University of Toronto
416-845-0946
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kst/attachments/20120913/b39eebf5/attachment.html>


More information about the Kst mailing list