Satpy FCI true color a little dark?

109 views
Skip to first unread message

Cris B

unread,
Nov 17, 2023, 5:58:30 AM11/17/23
to pytroll
Hi there

Plotting the FCI data as a true color composite using satpy 0.44 leads to quite a dark image around the UK and to the North (or more accurately high solar zenith angles), whereas the natural color composite looks adequately bright. Further South the true color does become adequately bright whereas the natural color doesn't appear to get any brighter. So I was wondering, if this is indeed the case, whether there is anything that can be done to brighten up the true color composite for high solar zenith angles as is done with the natural color?

Keep up the great work!

Cris

Andrea Meraner

unread,
Nov 17, 2023, 12:35:38 PM11/17/23
to pytroll
Hi Cris, 

thank you for reporting this. 
We have checked some imagery and indeed we agree that the True Color looks too dark at high solar zenith angles... The reason for it is the "SunZenithReduction" modifier, that is applied to the Sun-zenith and Rayleigh-corrected True Color, that we implemented in order to have a nice transition into nighttime without artefacts + to reduce the "sunzen-halo" at the terminator in the FCI First Image (more details at https://github.com/pytroll/satpy/pull/2556). 

I am doing some experiments with different parameters and putting together a Github issue, I will finish this on Monday and send the link here so that you can take a look at what we come up with and we can discuss further.

Have a nice weekend, 
Andrea
(Remote Sensing Scientist at EUMETSAT)

Cris B

unread,
Nov 20, 2023, 4:45:19 AM11/20/23
to pytroll
Thank you so much for looking into this.

Also, I've noticed that doing a simple plot of the ir_105 channel leads to warm brightness temperatures in light shades of grey and colder ones in dark, which is the opposite of what I might expect. Can you recreate this issue and is there a quick fix for it?

All the best
Cris

Panu Lahtinen

unread,
Nov 20, 2023, 5:26:04 AM11/20/23
to pyt...@googlegroups.com
On 20.11.2023 11.45, 'Cris B' via pytroll wrote:
> Thank you so much for looking into this.
>
> Also, I've noticed that doing a simple plot of the ir_105 channel
> leads to warm brightness temperatures in light shades of grey and
> colder ones in dark, which is the opposite of what I might expect. Can
> you recreate this issue and is there a quick fix for it?

Hi,

Larger values mean lighter values in a normal plot. You can define your
own composite + enhancement pair to invert data so the warm values will
be dark and cold values (like high cloud tops) bright.

See

https://satpy.readthedocs.io/en/stable/composites.html#creating-composite-configuration-files

and

https://satpy.readthedocs.io/en/stable/composites.html#enhancing-the-images

Composite:

  ir105:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
      - name: ir_105
    standard_name: ir105

Enhancement:

  ir105:
    standard_name: ir105
    operations:
    - name: invert
      method: !!python/name:satpy.enhancements.invert
      args: [true]


P
> --
> You received this message because you are subscribed to the Google
> Groups "pytroll" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pytroll+u...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pytroll/80d18796-5752-4611-9dff-575c411eccc8n%40googlegroups.com
> <https://groups.google.com/d/msgid/pytroll/80d18796-5752-4611-9dff-575c411eccc8n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Cris B

unread,
Nov 20, 2023, 8:12:11 AM11/20/23
to pytroll
Thank you!

Andrea Meraner

unread,
Nov 21, 2023, 10:56:13 AM11/21/23
to pytroll
Hi Cris, 

I concluded the investigation and composed an issue with some example imagery: https://github.com/pytroll/satpy/issues/2643 . Let us know if this looks good to you and what you think :) Feel free to comment on the issue as well of course. 
I will then update the defaults of Satpy to include the changes.

Cheers, 
Andrea

Cris B

unread,
Nov 22, 2023, 4:04:26 AM11/22/23
to pytroll
That looks great, thanks for looking in to this so quickly.

Cris B

unread,
Dec 1, 2023, 9:20:45 AM12/1/23
to pytroll
Another issue we have noticed with the FCI true color composite is that it can look a little "blocky" when compared to the natural color composite. I've attached examples of both here. It is subtle but can you see what I mean? Is there a smoothing step applied to the natural color composite that could potentially be applied to the true color?

All the best
Cris
FCI_UK_natural_color_202311301310.png
FCI_UK_true_color_202311301310.png

Martin Raspaud

unread,
Dec 4, 2023, 3:13:50 AM12/4/23
to pyt...@googlegroups.com
Hi Cris,

I can see what you are referring to indeed, but I am not sure where this
comes from. Some questions:
- What data are you using to generate the imagery: HRFI or FDHSI, or both?
- Are you resampling the two images with same resampler? nearest
neighbour vs gradient search for example

Best regards,
Martin
> https://satpy.readthedocs.io/en/stable/composites.html#creating-composite-configuration-files <https://satpy.readthedocs.io/en/stable/composites.html#creating-composite-configuration-files>
>
> and
>
> https://satpy.readthedocs.io/en/stable/composites.html#enhancing-the-images <https://satpy.readthedocs.io/en/stable/composites.html#enhancing-the-images>
> <https://github.com/pytroll/satpy/pull/2556>).
> <https://groups.google.com/d/msgid/pytroll/80d18796-5752-4611-9dff-575c411eccc8n%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/80d18796-5752-4611-9dff-575c411eccc8n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "pytroll" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pytroll+u...@googlegroups.com
> <mailto:pytroll+u...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pytroll/c7b22eb4-5e46-48f3-9758-88c26a898157n%40googlegroups.com <https://groups.google.com/d/msgid/pytroll/c7b22eb4-5e46-48f3-9758-88c26a898157n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Andrea Meraner

unread,
Dec 4, 2023, 10:03:27 AM12/4/23
to pytroll
Hi Cris, 

we think that what you're seeing is related to the fact that the FCI True Color is currently configured by default to have a sharpening operation applied. More specifically it's using the "SelfSharpenedRGB" compositor (instead of the classic "GenericCompositor"), which uses a channel (that is expected to have better detail/higher resolution - in this case the red vis_06) to try to sharpen the final image. 
We have noticed already that this does not work too well for FCI, particularly if you're using HRFI together with FDHSI. So far we have been waiting for the data quality to stabilise a bit before taking a decision on what to keep as default; we will take a look at this soon (next week during our contributors workshop the latest) and let you know the outcome! 
In the meanwhile please let us know your setup (file types used, resampler, target area), as Martin was suggesting, so that we can use it as an example for our investigations.

In the meanwhile, the modification that fixes the dark terminator has been merged and released, so if you update satpy in your environment, things should look better :)

Cheers, 
Andrea

Cris B

unread,
Dec 5, 2023, 6:12:38 AM12/5/23
to pytroll

Hi

These images were created using the same simple setup in v0.45, using just FDHSI. So essentially:

scn = Scene(filenames=files)
scn.load(["true_color", "natural_color"], upper_right_corner="NE")

scn_resampled = scn.resample(UK_area, resampler="nearest", radius_of_influence=5000)

scn_resampled.save_dataset(...

Many thanks for the background info on the FCI true color RGB.

Whilst I have your attention, please could you tell me how to use enhancements? It was suggested above how to setup a composite and enhancement to get a reverse greyscale plot of IR 10.5. I have configured satpy to see my composite OK but I do not know how to get it to apply the enhancement. It could be me but the online documentation doesn't seem very clear on this point. I perhaps naively thought it would be applied when plotting, due to having the same name as the composite, but the following doesn't work (for SEVIRI data, satpy v0.45):

from satpy import config
from satpy import Scene
from glob import glob

config.set(config_path=['/home/cpbatsto/satpy/configurations'])

filenames = glob('/data/home/satimage/segments/MSG_202312051030/*')
scn = Scene(reader='seviri_l1b_hrit', filenames=filenames)

scn.load(["ir108c"])
#<appears to load fine>
scn.show("ir108c")

where:

(satpy_env) [~/satpy/configurations]$ cat composites/seviri.yaml
sensor_name: visir/seviri

composites:

  ir108c:
    compositor: !!python/name:satpy.composites.GenericCompositor
    standard_name: ir108c
    prerequisites:
      - name: IR_108

(satpy_env) [~/satpy/configurations]$ cat enhancements/seviri.yaml
enhancements:

  ir108c:
    standard_name: ir108c

    operations:
    - name: invert
      method: !!python/name:satpy.enhancements.invert
      args: [true]


All the best
Cris
Reply all
Reply to author
Forward
0 new messages