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

Add colorize and palettize to XRImage enhancement_history #99

Merged
merged 9 commits into from
Feb 24, 2022

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Jan 28, 2022

I'm 90% sure of the logic on this, but would appreciate a double check. I would like this functionality for my own scripts in my Polar2Grid and Geo2Grid projects. With this the geotiff scale and offset metadata values include the range of the colormap used in palettize or colorize. I can then use that to determine the min/max of the original data so a colorbar can be added (with pydecorate) with the correct limit labels.

  • Closes #xxxx (remove if there is no corresponding issue, which should only be the case for minor changes)
  • 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)
  • Fully documented (remove if this change should not be visible to users, e.g., if it is an internal clean-up, or if this is part of a larger project that will be documented later)

@codecov
Copy link

codecov bot commented Jan 28, 2022

Codecov Report

Merging #99 (ecb7632) into main (4c1bc5b) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #99      +/-   ##
==========================================
+ Coverage   92.21%   92.26%   +0.05%     
==========================================
  Files          10       10              
  Lines        3389     3411      +22     
==========================================
+ Hits         3125     3147      +22     
  Misses        264      264              
Flag Coverage Δ
unittests 92.26% <100.00%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
trollimage/tests/test_image.py 99.92% <100.00%> (+<0.01%) ⬆️
trollimage/xrimage.py 87.96% <100.00%> (+0.17%) ⬆️

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 4c1bc5b...ecb7632. Read the comment docs.

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.

Just one comment, otherwise LGTM.

trollimage/tests/test_image.py Outdated Show resolved Hide resolved
@djhoese djhoese requested review from pnuu and mraspaud February 4, 2022 19:23
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

@djhoese djhoese merged commit 8dd514f into pytroll:main Feb 24, 2022
@djhoese djhoese deleted the feature-colorize-history branch February 24, 2022 01:41
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.

2 participants