Skip to content

Add resample force kwarg - #726

Merged
djhoese merged 3 commits into
pytroll:mainfrom
ameraner:add_resample_force
Jun 12, 2026
Merged

Add resample force kwarg#726
djhoese merged 3 commits into
pytroll:mainfrom
ameraner:add_resample_force

Conversation

@ameraner

Copy link
Copy Markdown
Member

This PR adds a force kwarg to the resampler.resample call. When set to True, it bypasses the area equality checks that skip the resampling if the geometries are the same. This is useful e.g. when data has NaN gaps (for example after a parallax correction) and one wants to gapfill it, e.g. with nearest neighbour.

@codecov

codecov Bot commented May 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.68%. Comparing base (3b1287b) to head (2e7a3c8).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #726      +/-   ##
==========================================
+ Coverage   93.66%   93.68%   +0.02%     
==========================================
  Files          89       89              
  Lines       13707    13715       +8     
==========================================
+ Hits        12838    12849      +11     
+ Misses        869      866       -3     
Flag Coverage Δ
unittests 93.68% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@djhoese djhoese left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I can't help but think this smells like we're doing something wrong in Satpy's design that this is needed.

@djhoese djhoese left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was pretty sure when I last reviewed this there was another location I found where this equality/comparison needs to be forced, but now I can't find it. It may have just been that we'll need to keep this in mind when I do further work on the pyresample.future resampler stuff.

@djhoese
djhoese merged commit aa21da7 into pytroll:main Jun 12, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pyresample cannot be used for gapfilling due to geometries_are_the_same check

2 participants