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 data promotion in generic_image reader and satpy.composites.add_bands #2923

Merged
merged 5 commits into from
Oct 14, 2024

Conversation

pnuu
Copy link
Member

@pnuu pnuu commented Oct 10, 2024

While figuring out why geo_color was float64, I found that both generic_image reader (used to read background images) and satpy.composites.add_bands() were mishandling the data. This fixes these two bugs in one go, as they both are triggered by BackgroundCompositor for certain cases.

Requires also pytroll/trollimage#186 for the geo_color to be fully fixed, the invert enhancement promotes data to float64 when the inversion parameters are given for each channel.

The generic_image reader tests were converted to pytest.

  • Closes #xxxx
  • Tests added
  • Fully documented
  • Add your name to AUTHORS.md if not there already

Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.07%. Comparing base (7eb17ab) to head (b8991c0).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2923   +/-   ##
=======================================
  Coverage   96.07%   96.07%           
=======================================
  Files         373      373           
  Lines       54479    54491   +12     
=======================================
+ Hits        52338    52352   +14     
+ Misses       2141     2139    -2     
Flag Coverage Δ
behaviourtests 3.99% <0.00%> (-0.01%) ⬇️
unittests 96.17% <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

coveralls commented Oct 10, 2024

Pull Request Test Coverage Report for Build 11323677685

Details

  • 197 of 197 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 96.17%

Totals Coverage Status
Change from base Build 11304823079: 0.004%
Covered Lines: 52586
Relevant Lines: 54680

💛 - Coveralls

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

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

LGTM, thanks a lot for refactoring the tests!

@mraspaud mraspaud merged commit b02fd62 into pytroll:main Oct 14, 2024
18 checks passed
@pnuu pnuu deleted the bugfix-generic_image-float64 branch October 14, 2024 09:30
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.

4 participants