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 Adaptive DNB composite bug introduced from refactoring #2456

Merged
merged 2 commits into from
May 2, 2023

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Apr 28, 2023

This fixes a bug I introduced when contributing to @simonrp84's #2124 PR when I refactored the VIIRS composites module. One simplification I did resulted in allowing negative indices to be used when accessing data when they were actually supposed to be considered out of bounds.

I haven't added a test for this explicitly because the difference it makes with our test dataset seems to be extremely small (0.9989 to 0.9990) and even in real world cases I didn't see anything obvious. The only reason I caught this is because of some automated testing I have in Polar2Grid which compared two images and it discovered that some pixels had changed.

Otherwise, this PR also fixes a few issues discovered in the tests (name changes and one expected data not being checked).

  • Closes #xxxx
  • Tests added

@codecov
Copy link

codecov bot commented Apr 28, 2023

Codecov Report

Merging #2456 (ec72950) into main (fb9bb8d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2456   +/-   ##
=======================================
  Coverage   94.81%   94.81%           
=======================================
  Files         339      339           
  Lines       49366    49368    +2     
=======================================
+ Hits        46807    46810    +3     
+ Misses       2559     2558    -1     
Flag Coverage Δ
behaviourtests 4.42% <0.00%> (-0.01%) ⬇️
unittests 95.44% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
satpy/composites/viirs.py 94.76% <100.00%> (+0.29%) ⬆️
satpy/tests/compositor_tests/test_viirs.py 100.00% <100.00%> (ø)

@djhoese
Copy link
Member Author

djhoese commented Apr 28, 2023

Looks like there is a coveralls outage that is causing tests to fail. It isn't the actual tests failing.

@djhoese djhoese merged commit 2cae444 into pytroll:main May 2, 2023
15 of 16 checks passed
@djhoese djhoese deleted the bugfix-adaptdnb-postrefactor branch May 2, 2023 02:03
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.

None yet

1 participant