dstl / Stone-Soup

A software project to provide the target tracking community with a framework for the development and testing of tracking algorithms.
https://stonesoup.rtfd.io
MIT License
388 stars 128 forks source link

Modify SystematicResampler to enable down/upsampling #786

Closed timothy-glover closed 1 year ago

timothy-glover commented 1 year ago

Added a modification to SystematicResampler to allow an optional argument "nparts" to be added to the resample method of the class. If this is not defined or equal to the length of the input ParticleState object, the resampler will function in the same way. If it is larger/smaller than the length of the input ParticleState object, the resampler will down/up sample to return the desired output.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (bf40a9a) 94.87% compared to head (9839325) 94.87%.

:exclamation: Current head 9839325 differs from pull request most recent head 65962a6. Consider uploading reports for the commit 65962a6 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #786 +/- ## ======================================= Coverage 94.87% 94.87% ======================================= Files 176 176 Lines 9757 9758 +1 Branches 1938 1939 +1 ======================================= + Hits 9257 9258 +1 Misses 356 356 Partials 144 144 ``` | Flag | Coverage Δ | | |---|---|---| | integration | `68.28% <87.50%> (-0.01%)` | :arrow_down: | | unittests | `89.90% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/dstl/Stone-Soup/pull/786?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl) | Coverage Δ | | |---|---|---| | [stonesoup/resampler/particle.py](https://codecov.io/gh/dstl/Stone-Soup/pull/786?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#diff-c3RvbmVzb3VwL3Jlc2FtcGxlci9wYXJ0aWNsZS5weQ==) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.