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

ENH: add centroid method for angles #453

Merged
merged 6 commits into from
Dec 12, 2022
Merged

Conversation

bifbof
Copy link
Collaborator

@bifbof bifbof commented Dec 5, 2022

Fix #437.
Such that centroids can be calculated for angles that pass over the -180, 180 wrapping border.

@codecov
Copy link

codecov bot commented Dec 5, 2022

Codecov Report

Base: 98.06% // Head: 98.08% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (e13b865) compared to base (d3ade20).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #453      +/-   ##
==========================================
+ Coverage   98.06%   98.08%   +0.01%     
==========================================
  Files          39       39              
  Lines        1858     1877      +19     
  Branches      261      263       +2     
==========================================
+ Hits         1822     1841      +19     
  Misses         14       14              
  Partials       22       22              
Impacted Files Coverage Δ
trackintel/preprocessing/positionfixes.py 98.78% <100.00%> (+0.02%) ⬆️
trackintel/preprocessing/staypoints.py 99.01% <100.00%> (ø)
trackintel/preprocessing/util.py 100.00% <100.00%> (ø)

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@henrymartin1 henrymartin1 left a comment

Choose a reason for hiding this comment

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

Looks really good, thanks for the fix!
I have a small comment for the test and didn't you mention in the error report that the same error applies here. Then we should fix this as well, shouldn't we?

tests/preprocessing/test_util.py Outdated Show resolved Hide resolved
Copy link
Member

@henrymartin1 henrymartin1 left a comment

Choose a reason for hiding this comment

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

Great work, thanks for the changes!

@henrymartin1 henrymartin1 merged commit 88ef62e into mie-lab:master Dec 12, 2022
@bifbof bifbof deleted the #437 branch June 27, 2023 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: .centroid does not wrap for angles
2 participants