Add utility function to compute the relative azimuth angle.
This PR adds a utility function to calculate the relative azimuth angle between sun and sensor. This code already existed in the PSPRayleighReflectance class, but here I move it to be a function in modifiers.angles.py so that users can access it more easily (as they can with the get_angles function).
Also, I have moved a lot of the angles tests from satpy/tests/test_modifiers.py into satpy/tests/modifier_tests/test_angles.py.
- [x] Tests added
- [x] Fully documented
Codecov Report
Merging #2175 (377283d) into main (fcbc517) will increase coverage by
0.00%. The diff coverage is81.25%.
@@ Coverage Diff @@
## main #2175 +/- ##
=======================================
Coverage 94.25% 94.25%
=======================================
Files 300 300
Lines 45638 45649 +11
=======================================
+ Hits 43014 43026 +12
+ Misses 2624 2623 -1
| Flag | Coverage Δ | |
|---|---|---|
| behaviourtests | 4.66% <12.50%> (+<0.01%) |
:arrow_up: |
| unittests | 94.89% <81.25%> (+<0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| satpy/modifiers/atmosphere.py | 46.26% <25.00%> (+0.68%) |
:arrow_up: |
| satpy/modifiers/angles.py | 99.16% <100.00%> (+0.01%) |
:arrow_up: |
| satpy/tests/modifier_tests/test_angles.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.
Coverage increased (+0.003%) to 94.847% when pulling 377283d69b18c57d7326cdcf4d8411c4b5186e7b on simonrp84:raa_calc into fcbc517578c7b8a3e206ec9b48d2f1cb4239ff87 on pytroll:main.
Can I be of any help to make this merged @simonrp84?
Would you be in favor of adding utility functions to compute also the phase angle and a sun glint angle or flag ?
Thanks for the offer @ghiggi, I hope to get this PR ready today - phase_angle and sun_glint_angle would also be really useful, perhaps you could make a separate PR for that once this one is merged? Happy to help code / review it!