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

Do not apply linear stretch to alpha band #145

Merged
merged 1 commit into from Sep 27, 2023
Merged

Conversation

mraspaud
Copy link
Member

This PR fixes trollimage stretching the alpha band along with the other bands when using linear.

  • Tests added (for all bug fixes or enhancements)
  • Tests passed (for all non-documentation changes)
  • Passes git diff origin/master **/*py | flake8 --diff (remove if you did not edit any Python files)

@mraspaud mraspaud added the bug label Sep 27, 2023
@mraspaud mraspaud self-assigned this Sep 27, 2023
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #145 (47a0f2e) into main (f211ef7) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #145      +/-   ##
==========================================
+ Coverage   91.18%   91.23%   +0.04%     
==========================================
  Files          11       11              
  Lines        3847     3867      +20     
==========================================
+ Hits         3508     3528      +20     
  Misses        339      339              
Flag Coverage Δ
unittests 91.23% <100.00%> (+0.04%) ⬆️

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

Files Coverage Δ
trollimage/tests/test_image.py 100.00% <100.00%> (ø)
trollimage/xrimage.py 89.43% <100.00%> (+0.19%) ⬆️

@coveralls
Copy link

Coverage Status

coverage: 91.479% (+0.04%) from 91.435% when pulling 47a0f2e on mraspaud:fix-alpha into f211ef7 on pytroll:main.

@djhoese
Copy link
Member

djhoese commented Sep 27, 2023

Looks good. My only comment on this is what if I want to linear scale the alpha channel? Don't let this question stop this from being merged...but still.

@mraspaud
Copy link
Member Author

Looks good. My only comment on this is what if I want to linear scale the alpha channel? Don't let this question stop this from being merged...but still.

I can't really imagine why someone would want to stretch the alpha channel, but yeah, this PR removes that possibility

@mraspaud
Copy link
Member Author

I'll just merge this, and will fix this if the need to stretch alpha arises.

@mraspaud mraspaud merged commit 486dc11 into pytroll:main Sep 27, 2023
25 checks passed
@mraspaud mraspaud deleted the fix-alpha branch September 27, 2023 16:28
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.

None yet

3 participants