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 the reinhard enhancements #1623

Merged
merged 7 commits into from Mar 29, 2021
Merged

Conversation

mraspaud
Copy link
Member

@mraspaud mraspaud commented Mar 26, 2021

This PR adds a reinhard-based tonemapping enhancement.

  • Tests added
  • Fully documented

An example on an Himawari 8 True Color image

Reinhard:
h8_reinhard

Cira stretch
h8_cira

@mraspaud mraspaud added enhancement code enhancements, features, improvements component:enhancements labels Mar 26, 2021
@mraspaud mraspaud self-assigned this Mar 26, 2021
@mraspaud mraspaud requested a review from djhoese as a code owner March 26, 2021 21:53
@codecov
Copy link

codecov bot commented Mar 26, 2021

Codecov Report

Merging #1623 (de1099a) into master (f6fe88f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1623   +/-   ##
=======================================
  Coverage   92.60%   92.60%           
=======================================
  Files         258      258           
  Lines       37716    37739   +23     
=======================================
+ Hits        34927    34950   +23     
  Misses       2789     2789           
Flag Coverage Δ
behaviourtests 4.81% <13.04%> (+<0.01%) ⬆️
unittests 92.74% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
satpy/enhancements/__init__.py 97.35% <100.00%> (+0.29%) ⬆️
satpy/tests/enhancement_tests/test_enhancements.py 100.00% <100.00%> (ø)

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 f6fe88f...de1099a. Read the comment docs.

@mraspaud mraspaud marked this pull request as draft March 29, 2021 08:27
@mraspaud mraspaud marked this pull request as ready for review March 29, 2021 09:32
@mraspaud mraspaud requested a review from djhoese March 29, 2021 10:56
Copy link
Member

@djhoese djhoese left a comment

Choose a reason for hiding this comment

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

Looks good to me. Should it be documented somewhere? I suppose we don't really have a lot of enhancement documentation.

Also, I'm wondering if this should be wrapped in a single function that gets with map_blocks? We've seen in other areas that limiting the number of tasks that dask has to deal with can improve the performance. Just an idea, not a requirement for merge.

@mraspaud
Copy link
Member Author

I'm going to merge this as it is because:

I think if we want to limit the number of dask tasks, it should be done at a higher level, for example in the code that calls the enhancements. Otherwise we will end up with many map_blocks everywhere that will lower readability and maintenability I think.

@djhoese
Copy link
Member

djhoese commented Mar 29, 2021

That was the intention (at least a little bit) with the apply_enhancement function that is in enhancements/__init__.py.

@mraspaud mraspaud merged commit bf90fea into pytroll:master Mar 29, 2021
@mraspaud mraspaud deleted the feature-reinhardt branch March 29, 2021 12:44
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.

None yet

2 participants