Skip to content
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 bug that would add spurious nan lines in gradient search #643

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

mraspaud
Copy link
Member

This PR fixes #642.

The symptom was that every other line, or all lines, of chunks that were on the edges of a geos disc would be nans. That was because the cursor in the gradient search algorithm was not moved along x when a pixel was skipped because of invalid target coordinates.

@mraspaud mraspaud added the bug label Jan 15, 2025
@mraspaud mraspaud requested review from djhoese and pnuu January 15, 2025 16:18
@mraspaud mraspaud self-assigned this Jan 15, 2025
@mraspaud
Copy link
Member Author

Fixed images from the use case in #642:
fixed

@pnuu
Copy link
Member

pnuu commented Jan 15, 2025

I restarted CI, there was a hickup with Conda.

Copy link
Member

@pnuu pnuu left a comment

Choose a reason for hiding this comment

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

LGTM.

Simple fix, but must've been a pain to hunting the bug 😅

Copy link
Member

@djhoese djhoese left a comment

Choose a reason for hiding this comment

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

Looks good from what I understand. I had one question just to clear something up for me, but otherwise good to merge.

pyresample/test/test_gradient.py Show resolved Hide resolved
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.96%. Comparing base (d33686e) to head (7ac934f).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #643   +/-   ##
=======================================
  Coverage   93.95%   93.96%           
=======================================
  Files          86       86           
  Lines       13541    13546    +5     
=======================================
+ Hits        12723    12728    +5     
  Misses        818      818           
Flag Coverage Δ
unittests 93.96% <100.00%> (+<0.01%) ⬆️

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.

@coveralls
Copy link

Coverage Status

coverage: 93.656% (+0.002%) from 93.654%
when pulling 7ac934f on mraspaud:fix-gradient-geos
into c499af0 on pytroll:main.

@mraspaud mraspaud merged commit e2c20c9 into pytroll:main Jan 15, 2025
26 checks passed
@mraspaud mraspaud deleted the fix-gradient-geos branch January 16, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gradient search skips some data when resampling from geos to mercator
4 participants