Fix derivation of correct radius of influence when data layout is not standard
This is supposed to solve #554
Make use of the fact that longitudes are an xarray data array and use 'y' dimension for rows/scanlines
This makes the code resilient towards any other (awkward) data layout than the standard (where first dimension is usually the rows).
- [ ] Closes #554
- [x] Tests added
- [x] Tests passed
- [ ] Passes
git diff origin/main **/*py | flake8 --diff - [ ] Fully documented
It looks like I can assume that self.lons is an Xarray DataArray, and never (just) a numpy array, correct?
It looks like I can assume that self.lons is an Xarray DataArray, and never (just) a numpy array, correct?
For Satpy, yes, but we can't (and shouldn't) make that assumption for pyresample.
It looks like I can assume that self.lons is an Xarray DataArray, and never (just) a numpy array, correct?
For Satpy, yes, but we can't (and shouldn't) make that assumption for pyresample.
Ok, got me there then! I was looking for tests on that, but found only with xarray, but possible that I just overlooked such tests...
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
6a8afc0) 94.11% compared to head (a7650f4) 94.14%. Report is 11 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #555 +/- ##
==========================================
+ Coverage 94.11% 94.14% +0.03%
==========================================
Files 82 84 +2
Lines 13078 13199 +121
==========================================
+ Hits 12308 12426 +118
- Misses 770 773 +3
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 94.14% <100.00%> (+0.03%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
coverage: 93.725% (+0.04%) from 93.69% when pulling a7650f4c5725ccb3557ea381b3e8eb396d149259 on adybbroe:finding-geocentric-resolution-resilient-to-data-layout into 6a8afc0085e0b4269f00991ab79fe1b3766bb817 on pytroll:main.
@djhoese I made a comment in the issue: https://github.com/pytroll/pyresample/issues/554#issuecomment-1820556077
Which solution do you propose I pursue? And does @gerritholl and @mraspaud have opinions as well?