-
Notifications
You must be signed in to change notification settings - Fork 94
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
Fix using cached LUTs in bilinear resampler #438
Conversation
Codecov Report
@@ Coverage Diff @@
## main #438 +/- ##
==========================================
+ Coverage 94.20% 94.28% +0.07%
==========================================
Files 68 69 +1
Lines 12255 12388 +133
==========================================
+ Hits 11545 11680 +135
+ Misses 710 708 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
In addition to Coveralls acting up, I can't get the tests to fail. I tried adding _ = new_resampler.resample(self.data1) to https://github.com/pytroll/pyresample/blob/main/pyresample/test/test_bilinear.py#L1198 As far as I understand, this test pretty much does what Satpy is doing, so it should be failing, but passes with the current |
Also |
Yeah I would have expected adding
|
I'm fairly certain it's the correct version because my I modified the test so that it saves to a persistent location, then ran again with modification that skipped the saving. Still works fine. |
I have to finish my docstring updates for my antimeridian PR but then I'll switch branches and test on main. |
I also just noticed that I ran Ernst's tests again my antimeridian branch which is relatively old so it may not include things you may have fixed in your more recent PRs. |
I'm starting my holiday now, so I'll get back to this in August at the earliest. |
Ok, I've tracked down why the real world case fails and the test doesn't. It is this line of code: pyresample/pyresample/bilinear/xarr.py Line 113 in e531bd9
From what I understand this |
Hhhmmm even the outside target area doesn't hit this condition. I'm not sure if it is a smart idea for me to dive further into this until you're back @pnuu. Let me know if you have ideas and I can try them out before then. |
Damn, had forgotten this. I'll see if I have time early next week to have a look. |
I tested with the target area that doesn't overlap the input area at all with the pyresample/pyresample/bilinear/xarr.py Line 113 in e531bd9
Same with a partially overlapping target area (added with the latest commit to this PR) that gets a sample using pre-calculated LUTs. |
Looks like the test failure is an HTTP hiccup in the deploy test (no big deal) and a new failure in the EWA resampling. I guess I know what I'm working on this morning. |
I'm a little scared about the EWA failure. I didn't change anything and it seems to pass now. I guess I'll deal with it next time... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Feel free to merge.
I was a bit surprised about the failure in the first place, as only thing I changed was the flake8 complaint. But yeah, merging. |
This PR fixes the bilinear resampling when the resampling LUTs have been cached.
The bug were introduced in #324 where a check was added to make sure the data array dimensions are in correct order. The test was done against an index array that only exists during the initial run, and a better comparison is against the shape of the source geo definition.
git diff origin/main **/*py | flake8 --diff