pytroll / satpy

Python package for earth-observing satellite data processing
http://satpy.readthedocs.org/en/latest/
GNU General Public License v3.0
1.06k stars 292 forks source link

Add LandSeaFalseColorCompositor #2722

Open TAlonglong opened 8 months ago

TAlonglong commented 8 months ago

Add a compositor using the window IR channel, a land sea mask and computing a color palette based on these to generate a false color image. Clouds are shades of gray to white from the brightness temperature(IR window channel), land is greenish and sea is blueish.

Here is an small example using the FCI ir_105

land_sea_false_color_20240104_093000

With a composites config section as this:

  _land_sea_mask:
    compositor: !!python/name:satpy.composites.StaticImageCompositor
    standard_name: land_sea_mask
    filename: /home/trygveas/testdata/static_images/test_20140111_120000.tif

  land_sea_false_color:
    compositor: !!python/name:satpy.composites.LandSeaFalseColorCompositor
    standard_name: null_enhancement
    prerequisites:
      - ir_105
      - _land_sea_mask
TAlonglong commented 8 months ago

It is possible that this can be achieved by using the palettized enhancement together with a mask from the land sea mask.

I have not looked into this, so I'm not sure if this is possible.

codecov[bot] commented 8 months ago

Codecov Report

Attention: 91 lines in your changes are missing coverage. Please review.

Comparison is base (bca22b4) 95.40% compared to head (adb4505) 95.24%.

Files Patch % Lines
satpy/composites/__init__.py 4.21% 91 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2722 +/- ## ========================================== - Coverage 95.40% 95.24% -0.17% ========================================== Files 371 371 Lines 52825 52920 +95 ========================================== + Hits 50399 50403 +4 - Misses 2426 2517 +91 ``` | [Flag](https://app.codecov.io/gh/pytroll/satpy/pull/2722/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pytroll) | Coverage Δ | | |---|---|---| | [behaviourtests](https://app.codecov.io/gh/pytroll/satpy/pull/2722/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pytroll) | `4.15% <4.21%> (+<0.01%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/pytroll/satpy/pull/2722/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pytroll) | `95.85% <4.21%> (-0.17%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pytroll#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mraspaud commented 8 months ago

I've done something similar in the past, using only configuration and palettes, I can try to dig it out if you want...

coveralls commented 8 months ago

Pull Request Test Coverage Report for Build 7552334306


Totals Coverage Status
Change from base Build 7472442128: -0.2%
Covered Lines: 50529
Relevant Lines: 52743

💛 - Coveralls