Closed ninahakansson closed 3 years ago
Merging #77 (ca1d4d2) into main (6b7e685) will increase coverage by
0.35%
. The diff coverage is98.68%
.
@@ Coverage Diff @@
## main #77 +/- ##
==========================================
+ Coverage 85.31% 85.67% +0.35%
==========================================
Files 13 13
Lines 1893 1947 +54
==========================================
+ Hits 1615 1668 +53
- Misses 278 279 +1
Flag | Coverage Δ | |
---|---|---|
unittests | 85.67% <98.68%> (+0.35%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
pyorbital/tests/test_orbital.py | 96.21% <98.57%> (+0.76%) |
:arrow_up: |
pyorbital/orbital.py | 86.97% <100.00%> (-0.19%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 6b7e685...ca1d4d2. Read the comment docs.
Congratulations :tada:. DeepCode analyzed your code in 3.465 seconds and we found no issues. Enjoy a moment of no bugs :sunny:.
While slightly out-of-scope for this PR, do you know if this problem that you've fixed here would also affect solar angles?
Good question!
It should not happen for solar azimuth angles as pyorbital in astronomy get_alt_az uses np.artan2 that handles special values separately: https://numpy.org/doc/stable/reference/generated/numpy.arctan2.html So maybe I should just update to use that function also for the satellite angles?
For the sun zenith angle the formulas are different so I don't think the arcsine for values larger than 1 could happen.
When the satellite is exactly above the observer the satellite elevation angle should be 90 degrees and the azimuth angle is undefined. Set azimuth angle to 180 (initially 0) when satellite elevation is 90 degrees. Also handle the case when topz / rg is larger than 1.0 due to rounding. Previously nans were often returned for satellite elevation 90 degrees. The Orbital class also has a get_observer_look function which does not handle dask and xarray. This function has not been updated.
flake8 pyorbital