Search code examples
pythonexcelnumpyscipysmoothing

3RSSH smoothing in Python


I'm looking for running median smoothing implementations for Python. 3RSSH in particular.

There is an implementation for Excel that works fine: http://www.quantdec.com/Excel/smoothing.htm

Also, R's smooth function has 3RSSH: http://exploratorydataanalysis.blogspot.com/2009/03/smoothing-on-r.html

But I want a Python version, preferably working with numpy/scipy and can't find one. So far, I've had no luck with googling.

Are there any libraries implementing such smoothing functions? Or am I destined to write one? :)


Solution

  • Don't think I saw a 3RSSH implementation, but you could try using scipy.signal to try and make one.

    Maybe these will be enough for your application?

    scipy.signal.medfilt

    scipy.signal.medfilt2d

    scipy.ndimage.filters.median_filter