Conversation
for more information, see https://pre-commit.ci
|
|
Hi, is there anything I need to add or change for this pr? |
|
Hi @HARSHDIPSAHA, thanks for your interest in contributing to Based on my review, this PR appears to be mostly generated by LLMs, which conflicts with our AI contributions policy. We're closing it for now, but please do get in touch if you think we've got this wrong. Even setting that aside, we want to be upfront that a Kalman filter implementation is a substantial feature requiring both scientific and code review, and it isn't currently prioritised in our near-term roadmap. It would be difficult for us to commit to a timely and thorough review of a PR of this scope at this stage. If you'd like to contribute to this in the future, we'd suggest starting a discussion on the existing issue #10 first to agree on scope and design, and then working in small, focused PRs, with full test coverage. That would make the review process much more manageable for everyone. Thanks for understanding, and we hope to see you contribute in other ways. |



Description
What is this PR
Why is this PR needed?
The movement library currently provides filtering methods (
rolling_filter,savgol_filter) that smooth position data, but they don't leverage the underlying physics of motion or provide direct estimates of velocity and acceleration. For many tracking applications, especially those involving smooth trajectories, we need a filtering method that:This PR addresses issue #749.
What does this PR do?
This PR adds a Kalman filter implementation to the
movement.filteringmodule with the following features:New function:
kalman_filter()inmovement/filtering.pyImplementation details:
@log_to_attrs, supportsprint_report, etc.Comprehensive tests in
tests/test_unit/test_filtering.py:Example script in
examples/kalman_filter.py:References
How has this PR been tested?
Unit tests:
tests/test_unit/test_filtering.py::TestKalmanFilterIntegration testing:
examples/kalman_filter.py) tested and runs successfullyBackward compatibility:
rolling_filter,savgol_filter,interpolate_over_time,filter_by_confidence)Is this a breaking change?
No.
Does this PR require an update to the documentation?
I think yes? To just show the example of using kalman filter.
Example results:
Graph1:

Graph2:

Checklist: