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

Tests for range of the spherical angle #22

Merged
merged 7 commits into from
Dec 4, 2024
Merged

Tests for range of the spherical angle #22

merged 7 commits into from
Dec 4, 2024

Conversation

mmikhasenko
Copy link
Member

@mmikhasenko mmikhasenko commented Oct 5, 2024

Closes #20

Checklist

  • Tests are passing
  • Docs were updated and workflow is passing
  • add Test

@mmikhasenko mmikhasenko requested a review from szabo137 October 5, 2024 17:30
Copy link

codecov bot commented Oct 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.91%. Comparing base (46d7df1) to head (cc082b2).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #22   +/-   ##
=======================================
  Coverage   93.91%   93.91%           
=======================================
  Files           4        4           
  Lines         148      148           
=======================================
  Hits          139      139           
  Misses          9        9           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@szabo137
Copy link
Member

szabo137 commented Oct 8, 2024

I think the current implementation does what you need because the two-argument atan function has only values in $[0,\pi]$ if and only if the first argument is not negative, which is always true for the transverse momentum.

With this, I would like to stay with the current implementation, because it is slightly faster than the usage of arccos, especially in coordinate systems that provide direct access to the transverse momentum.

@mmikhasenko
Copy link
Member Author

I see what you mean for the range, it's likely correct. I'd add a test for it.
For the speed, I'd surprised to see that gain, but could well be I do not have an intuition.

@mmikhasenko mmikhasenko changed the title Theta range [WIP] Theta range Oct 8, 2024
@mmikhasenko
Copy link
Member Author

Confirm that the range is what I want: I've added the test for the ranges.
Fill free to merge if happy

@mmikhasenko mmikhasenko changed the title [WIP] Theta range Tests for range of the spherical angle Dec 1, 2024
@szabo137 szabo137 merged commit cf892a6 into main Dec 4, 2024
5 checks passed
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.

angles and ranges
2 participants