-
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
gradient_search
fails when resampling Himawari data
#507
Comments
@simonrp84 thanks for reporting the issue. It looks like pyresample complains that the source and destination areas are the same, which is actually true for some of the channels of the true color image I suppose, and probably not for others. |
No, this is just a simple example to prove the bug. I'm actually trying to use the true_color_with_night_ir composite, which is unable to use native as it has non-geos data included. It produces the same error. |
I understand. I suppose one solution will be to make this a warning rather than an error... |
@mraspaud perhaps Satpy, if it doesn't already, should skip resampling data in these cases and instead do a |
Wait...are we completely wasting time with all resamplers by asking to resample data to its same projection?!?!? No. I don't believe it. |
Yeah, that was going to be my next question: If this is a warning rather than an error then what happens with the data? Sounds like it might still get 'resampled' even for the bands where there's no need... |
So, looking at this I can see that in the case of the kdtree resampler, the resampling will take place even if source and target areas are identical. Native works around it by nature (sizes being the same, nothing is done). Gradient search atm raises an error. Working on a PR for the latter. |
The
gradient_search
method is failing when trying to resample Himawari data from one resolution to another:Code Sample, a minimal, complete, and verifiable piece of code
Problem description
The above code produces the following error message:
If I comment out lines 202 and 203 then it runs fine, so presumably something is being incorrectly compared in that
if
statement. For Himawari true color, only one band has a different resolution to the others so my guess is that the comparison is being made between B01 and B02, which are the same resolution. Perhaps this should compare all input bands or something?Expected Output
A resampled image.
Versions of Python, package at hand and relevant dependencies
Python = 3.10
Pyresample = 1.26.1 (from conda-forge).
OS: Windows 10
The text was updated successfully, but these errors were encountered: