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 image 'mode' as identifying attribute to enhancements #817

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Jun 12, 2019

Similar to how we have name and standard_name as identifying factors that someone can use in the enhancement configs, this PR adds mode. This is used in the new RGB default enhancement which does a crude linear stretch between 0 and 1. This is a nice thing to have when creating new RGBs and experimenting with them because we don't have to configure a new enhancement every time. This is also useful for DayNightCompositor composites which are already enhanced and on a 0 to 1 scale. This way you could make any number of DayNight composites and wouldn't need to make a new 0 to 1 enhancement for each one.

I should really add documentation for this and it needs tests but I wanted to have people look at this as soon as possible since I'd like this for my scipy tutorial.

The other thing that is not implemented here but has been talked about is the shortcut of allowing certain attributes to "shortcut" the enhancement process. So if an RGB is detected (via the enhancement mode) then a special RGB-friendly enhancement would be used which would default to color limits of 0 and 1 for each band but could also use a color_limits attribute or vmin and vmax attributes if they existed to override the 0 and 1. I'm not sure this is the right time to implement this functionality since it seems like a work around for the general problem of "creating enhancements is more annoying than it should be for simple composites".

  • Tests added and test suite added to parent suite
  • Tests passed
  • Passes flake8 satpy
  • Fully documented

@djhoese djhoese added enhancement code enhancements, features, improvements component:enhancements labels Jun 12, 2019
@djhoese djhoese added this to the v0.16 milestone Jun 12, 2019
@djhoese djhoese requested review from mraspaud and pnuu June 12, 2019 13:52
@codecov
Copy link

codecov bot commented Jun 12, 2019

Codecov Report

Merging #817 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #817      +/-   ##
==========================================
+ Coverage   83.72%   83.75%   +0.02%     
==========================================
  Files         165      165              
  Lines       24115    24167      +52     
==========================================
+ Hits        20190    20240      +50     
- Misses       3925     3927       +2
Impacted Files Coverage Δ
satpy/writers/__init__.py 85.64% <100%> (+0.43%) ⬆️
satpy/tests/test_writers.py 97.89% <100%> (+0.07%) ⬆️
satpy/tests/compositor_tests/__init__.py 99.52% <100%> (ø) ⬆️
satpy/enhancements/__init__.py 85.89% <100%> (+0.66%) ⬆️
satpy/composites/__init__.py 74.39% <0%> (+0.2%) ⬆️

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 5b74266...aefe7a4. Read the comment docs.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 83.746% when pulling aefe7a4 on djhoese:feature-rgb-enhancer into 5b74266 on pytroll:master.

@djhoese djhoese removed this from the v0.16 milestone Jun 17, 2019
@gerritholl
Copy link
Member

@djhoese What is the status of this PR? Is this still current? Seems to have some merge conflicts.

@djhoese
Copy link
Member Author

djhoese commented Jul 29, 2022

@gerritholl I still like the idea of this PR but I think @pnuu and @mraspaud didn't like it so much. I can fix the conflicts, but am curious what their current opinion is.

@djhoese djhoese mentioned this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:enhancements enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants