Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function to linearly interpolate state mutable sequences #872

Merged
merged 4 commits into from
Oct 31, 2023

Conversation

gawebb-dstl
Copy link
Contributor

@gawebb-dstl gawebb-dstl commented Oct 4, 2023

The function will take a StateMutableSequence and a times: List[datetime.datetime]. The function will create a new StateMutableSequence with states only at the times specified by times.

This time with a clean git history. See #865 for messy history

This provides a step for fixing #364

Removed speed tests and options
Added more words
@gawebb-dstl gawebb-dstl requested a review from a team as a code owner October 4, 2023 15:37
@gawebb-dstl gawebb-dstl requested review from sdhiscocks and jswright-dstl and removed request for a team October 4, 2023 15:37
@gawebb-dstl
Copy link
Contributor Author

I've looked at 4 options (see code). All 4 options run function correctly. Option 4 is the quickest* so will be taken forward

Output when running the file:

Option 1 took 3.9378470000000005
Option 2 took 79.7136048
Option 3 took 1.762432000000004
Option 4 took 1.326851700000006
Option 1 worked
Option 2 worked
Option 3 worked
Option 4 worked

*Option 3 is quicker if all of the states need to be produced by interpolation

docs/source/stonesoup.functions.rst Outdated Show resolved Hide resolved
stonesoup/functions/interpolate.py Show resolved Hide resolved
stonesoup/functions/interpolate.py Outdated Show resolved Hide resolved
Co-authored-by: Steven Hiscocks <[email protected]>
@gawebb-dstl gawebb-dstl linked an issue Oct 19, 2023 that may be closed by this pull request
@sdhiscocks sdhiscocks changed the title Function to linearly interpolate state mutable sequences 2 Function to linearly interpolate state mutable sequences Oct 31, 2023
@sdhiscocks sdhiscocks merged commit 0cc3c61 into main Oct 31, 2023
@sdhiscocks sdhiscocks deleted the interpolate_func_2 branch October 31, 2023 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interpolation in Track-to-Track associators and metrics.
3 participants