←back to thread

146 points hugohadfield | 1 comments | | HN request time: 0.209s | source

This little project came about because I kept running into the same problem: cleanly differentiating sensor data before doing analysis. There are a ton of ways to solve this problem, I've always personally been a fan of using kalman filters for the job as its easy to get the double whammy of resampling/upsampling to a fixed consistent rate and also smoothing/outlier rejection. I wrote a little numpy only bayesian filtering/smoothing library recently (https://github.com/hugohadfield/bayesfilter/) so this felt like a fun and very useful first thing to try it out on! If people find kalmangrad useful I would be more than happy to add a few more features etc. and I would be very grateful if people sent in any bugs they spot.. Thanks!
Show context
pm ◴[] No.41864206[source]
Congratulations! Pardon my ignorance, as my understanding of mathematics at this level is beyond rusty, but what are the applications of this kind of functionality?
replies(5): >>41864688 #>>41864699 #>>41864774 #>>41865843 #>>41872941 #
thatcherc ◴[] No.41864774[source]
I actually have one for this! Last week I had something really specific - a GeoTIFF image where each pixel represents the speed in "x" direction of the ice sheet surface in Antarctica and I wanted to get the derivative of that velocity field so I could look at the strain rate of the ice.

A common way to do that is to use a Savitzky-Golay filter [0], which does a similar thing - it can smooth out data and also provide smooth derivatives of the input data. It looks like this post's technique can also do that, so maybe it'd be useful for my ice strain-rate field project.

[0] - https://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter

replies(2): >>41864872 #>>41865298 #
1. pm ◴[] No.41864872[source]
Thanks for that, it looks like my research today is cut out for me.