Hi, about a year ago I developed for my own purposes a routine for averaging irregularly-sampled data using gaussian average. I would like to contribute it to matplotlib, after a clean-up, if there is interest.
First it stores all data points in a (regular) grid. One can ask for value at arbitrary point within the grid range: based on stDev parameter, all data points within some distance (user-settable) are weighted using the normal distribution function and then the average is returned. Storing data in grid avoids searching all data points every time, only those within certain grid-range will be used. It would be relatively easy to extend to another distribution types (lines 120-130), such as elliptic-normal distribution, with different stDev in each direction. The code is here: http://bazaar.launchpad.net/~yade-dev/yade/trunk/annotate/head% 3A/lib/smoothing/WeightedAverage2d.hpp I should be able to convert it to accept numpy arrays, wrap using Python API instead of boost::python and write some documentation. Let me know if matplotlib-devel list would be more appropriate for this discussion. Cheers, Vaclav ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users