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

Add example of track-to-track fusion #666

Merged
merged 5 commits into from
Aug 24, 2022

Conversation

ekhunter123
Copy link
Contributor

@ekhunter123 ekhunter123 commented Jun 27, 2022

Add example of track-to-track fusion using the new Bayesian formulation of the covariance intersection algorithm from Clark and Campbell (link).

I have run Sphinx to check the formatting, here is what it looks like as a PDF:
Track2Track_Fusion_Example.pdf

This work was done with Daniel Clark, Sean O'Rourke (@orourkesm-afrl), and Bhashyam Balaji (@bhashyambalaji).

@ekhunter123 ekhunter123 requested a review from a team as a code owner June 27, 2022 14:45
@ekhunter123 ekhunter123 requested review from jswright-dstl and bgarthwaite-dstl and removed request for a team June 27, 2022 14:45
Copy link
Contributor

@nperree-dstl nperree-dstl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tutorial looks good! Just some really small documentation comments from looking at the pdf version.

docs/examples/Track2Track_Fusion_Tutorial.py Outdated Show resolved Hide resolved
docs/examples/Track2Track_Fusion_Tutorial.py Outdated Show resolved Hide resolved
docs/examples/Track2Track_Fusion_Tutorial.py Outdated Show resolved Hide resolved
docs/examples/Track2Track_Fusion_Tutorial.py Outdated Show resolved Hide resolved
docs/examples/Track2Track_Fusion_Tutorial.py Outdated Show resolved Hide resolved
docs/examples/Track2Track_Fusion_Tutorial.py Outdated Show resolved Hide resolved
docs/examples/Track2Track_Fusion_Tutorial.py Outdated Show resolved Hide resolved
@ekhunter123
Copy link
Contributor Author

Now that the ChernoffUpdater and the track feeder are merged into main, I could remove their class definitions in this example. Or is it helpful to have them here for clarity?

@nperree-dstl
Copy link
Contributor

Now that the ChernoffUpdater and the track feeder are merged into main, I could remove their class definitions in this example. Or is it helpful to have them here for clarity?

Yeah I would probably remove them from the example as it is quite a long one and let people explore the classes themselves if they want to

@ekhunter123
Copy link
Contributor Author

I removed the class definitions for the ChernoffUpdater and the Tracks2GaussianDetectionFeeder, and reworked the explanation to accommodate this. Here is the latest Sphinx rendering

T2TFusionExample.pdf

docs/examples/Track2Track_Fusion_Tutorial.py Outdated Show resolved Hide resolved
docs/examples/Track2Track_Fusion_Tutorial.py Outdated Show resolved Hide resolved

plotter1.fig.show()

track = track_fusion_tracks.pop()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Building on CircleCI currently fails as track_fusion_tracks is an empty set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, thanks Steve! I added an if statement to check if the track_fusion_tracks has any tracks in it before plotting. I've run the notebook so many times on my own, and it very rarely happens that there are no tracks. So I think this is an adequate solution.

@sdhiscocks
Copy link
Member

I'm not sure why, but when running on CircleCI, no tracks are produced. But it works fine locally.

I'll rebase on main to see if that resolves it.

ekhunter123 and others added 4 commits August 23, 2022 10:15
Add example of track-to-track fusion using the new Bayesian formulation of the covariance intersection algorithm
The ChernoffUpdater and Tracks2GaussianDetectionFeeder are now merged in Stone Soup, so don't need to be written in this example.
On certain environments, no tracks are formed as mixture is pruned too
soon.
@sdhiscocks
Copy link
Member

sdhiscocks commented Aug 24, 2022

So the issue was in certain configurations, the prune threshold was slightly too high. I recreated this on another Linux system running Python 3.10. I suspect this is caused by floating point precision discrepancy, either with Linux, Python 3.10, or version of NumPy or 3rd party libraries. Decreasing the threshold seems to have resolved the issue.

@codecov
Copy link

codecov bot commented Aug 24, 2022

Codecov Report

Merging #666 (10a4c0d) into main (ee4ad3a) will increase coverage by 0.14%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #666      +/-   ##
==========================================
+ Coverage   94.48%   94.62%   +0.14%     
==========================================
  Files         171      171              
  Lines        8789     8789              
  Branches     1705     1705              
==========================================
+ Hits         8304     8317      +13     
+ Misses        350      342       -8     
+ Partials      135      130       -5     
Flag Coverage Δ
integration 70.36% <ø> (+0.96%) ⬆️
unittests 90.77% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
stonesoup/mixturereducer/gaussianmixture.py 97.80% <0.00%> (+1.09%) ⬆️
stonesoup/updater/pointprocess.py 98.64% <0.00%> (+2.70%) ⬆️
stonesoup/simulator/simple.py 98.00% <0.00%> (+4.66%) ⬆️
stonesoup/tracker/pointprocess.py 93.54% <0.00%> (+4.83%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@sdhiscocks sdhiscocks merged commit 56b449e into dstl:main Aug 24, 2022
@ekhunter123 ekhunter123 deleted the T2T_Fusion_Example branch August 26, 2022 20:51
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.

4 participants