It looks like this file hasn't been commented, yet. Especially inside the functions.
Then, one question about calculating velocity of the wheel in detect_wheel_move: if I understand correctly, the resolution is 1 sec? Seems a bit long. Did you try shorter intervals? Previously, I calculated differences between successive samples, and then convolved this with a normal distribution with STD of 0.5 s. May come out smoother than convolving with a box.
It looks like this file hasn't been commented, yet. Especially inside the functions. Then, one question about calculating velocity of the wheel in detect_wheel_move: if I understand correctly, the resolution is 1 sec? Seems a bit long. Did you try shorter intervals? Previously, I calculated differences between successive samples, and then convolved this with a normal distribution with STD of 0.5 s. May come out smoother than convolving with a box.