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 SandwichCompositor modifying input data #1690

Merged
merged 3 commits into from May 26, 2021

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented May 25, 2021

In issue #1689 we realized that generating a true color composite while also generating a sandwich composite of that same true color produced an all black image. With this PR the SandwichCompositor no longer does an inplace operation.

One could argue that the utility methods used by the composites should always pass copies, but I think this is unnecessary in most cases and I'm scared it would hurt performance in the worst cases. This is the first time we've run into something like this...I think.

@codecov
Copy link

codecov bot commented May 25, 2021

Codecov Report

Merging #1690 (01ae41a) into main (88938ab) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1690   +/-   ##
=======================================
  Coverage   92.32%   92.32%           
=======================================
  Files         258      258           
  Lines       38123    38124    +1     
=======================================
+ Hits        35196    35197    +1     
  Misses       2927     2927           
Flag Coverage Δ
behaviourtests 4.84% <0.00%> (-0.01%) ⬇️
unittests 92.86% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
satpy/composites/__init__.py 88.74% <100.00%> (ø)
satpy/tests/test_composites.py 99.88% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88938ab...01ae41a. Read the comment docs.

@coveralls
Copy link

coveralls commented May 25, 2021

Coverage Status

Coverage increased (+0.0002%) to 92.812% when pulling 01ae41a on djhoese:bugfix-sandwich-inplace into 88938ab on pytroll:main.

satpy/composites/__init__.py Outdated Show resolved Hide resolved
@djhoese djhoese merged commit aa14951 into pytroll:main May 26, 2021
@djhoese djhoese deleted the bugfix-sandwich-inplace branch May 26, 2021 16:13
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.

BackgroundCompositor using IR Sandwich (masked so only coldest clouds are visible) and True Color as inputs
2 participants