Image produced by `gradient_search` has slightly different extent to `native`
Open
@mraspaud is already working on this.
Since Jul 12, 2022.
bug
- Dominant language
- Python
- Stars
- 385
- Forks
- 102
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 9
Description
When I crop a GOES-16 image and then resample using gradient_search, the resulting image appears to be missing pixels on the bottom and right-hand side compared to the native resampler.
Gradient:

Native:

You probably have to load the two images in separate tabs and then quickly flick between them to notice the difference.
Here's the code I'm using:
from satpy import Scene, resample
from satpy.readers import FSFile
the_files = fsspec.open_files("filecache::s3://noaa-goes16/ABI-L1b-RadF/2022/185/17/*_s20221851700*", s3={'anon': True})
fs_files = [FSFile(open_file) for open_file in the_files]
scn = Scene(filenames=fs_files, reader='abi_l1b')
c_lat = 14.4747
c_lon = -90.8806
dell = 1.0
bbox = (c_lon - dell, c_lat - dell, c_lon + dell, c_lat + dell)
scn.load(['true_color_nocorr'])
scn2 = scn.crop(ll_bbox=bbox)
scn3 = scn2.resample(scn2.finest_area(), resampler='native')
scn3.save_dataset('true_color_nocorr', filename='./test_native.png')
print(scn3['true_color_nocorr'].attrs['area'])
scn = Scene(filenames=fs_files, reader='abi_l1b')
scn.load(['true_color_nocorr'])
scn2 = scn.crop(ll_bbox=bbox)
scn3 = scn2.resample(scn2.finest_area(), resampler='gradient_search')
scn3.save_dataset('true_color_nocorr', filename='./test_gradient_search.png')
print(scn3['true_color_nocorr'].attrs['area'])
The printed area definitions are identical, it's just the output images that vary.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.