Add a compositor to mask visible night
My use case for the true color composite is often to put it on top of another composite that fills in the night part of the image. For that a straightforward solution is to use the daynightcompositor. However, I'm never really satisfied because it in a compromise between having a large termiator area or loosing bright spots from true color on the night side.
This PR proposes a simple thresholding from the image channel to complement the opacity gradient.
Feedback on this idea is welcome.
- [ ] Closes #xxxx
- [ ] Tests added
- [ ] Fully documented
Examples:
- FCI
With another composite behind
-
VIIRS
-
an example configuration for this composite:
true_color_day:
compositor: !!python/name:satpy.composites.MaskVisibleNightCompositor
standard_name: image_ready
lim_low: 88.0
prerequisites:
- name: true_color
Codecov Report
Attention: Patch coverage is 14.54545% with 47 lines in your changes missing coverage. Please review.
Project coverage is 96.08%. Comparing base (
3a208c0) to head (2c87c5a). Report is 26 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| satpy/composites/__init__.py | 14.54% | 47 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #3102 +/- ##
==========================================
- Coverage 96.16% 96.08% -0.08%
==========================================
Files 389 389
Lines 56418 56473 +55
==========================================
+ Hits 54256 54264 +8
- Misses 2162 2209 +47
| Flag | Coverage Δ | |
|---|---|---|
| behaviourtests | 3.85% <14.54%> (+0.01%) |
:arrow_up: |
| unittests | 96.18% <14.54%> (-0.08%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
An example for the cloud phase composite
Pull Request Test Coverage Report for Build 14337460508
Details
- 8 of 55 (14.55%) changed or added relevant lines in 1 file are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.08%) to 96.192%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| satpy/composites/init.py | 8 | 55 | 14.55% |
| <!-- | Total: | 8 | 55 |
| Totals | |
|---|---|
| Change from base Build 14322426188: | -0.08% |
| Covered Lines: | 54516 |
| Relevant Lines: | 56674 |
💛 - Coveralls
Oh, this looks really nice.