Poblem creating an image with static background

35 views
Skip to first unread message

AlePas

unread,
Jun 16, 2021, 4:56:52 AM6/16/21
to pytroll
Hi everyone, I am new with satpy I hope to find someone who can support me.
I am trying to produce an image (MSG hrit data, IR_108 channel) with static background. I have created a composite named "palette_ir_clouds" with which the image, whitout background, results just as I want it (with white clouds).
When I add the background, with the composite "IR108_Europa_bkg", it happens that the clouds appear in black color.
These are the composites I created:

from seviri.yaml

palette_ir_clouds:
   compositor: !!python/name:satpy.composites.SingleBandCompositor
    prerequisites:
        - name: 'IR_108'
    standard_name: palette_ir_clouds

ir108_mask_prova:
   compositor: !!python/name:satpy.composites.MaskingCompositor
    conditions:
     - method: less
       value: 213
       transparency: 5
     - method: greater_equal
       value: 213
       transparency: 5
     - method: greater_equal
       value: 238
       transparency: 15
     - method: greater_equal
       value: 248
       transparency: 25
     - method: greater_equal
       value: 258
       transparency: 35
     - method: greater_equal 
       value: 268 
       transparency: 55
     - method: greater
       value: 278
       transparency: 95
   prerequisites:
   - name: 'palette_ir_clouds'
   - name: 'palette_ir_clouds'
   standard_name: ir108_mask_prova

IR108_Europa_bkg:
    compositor: !!python/name:satpy.composites.BackgroundCompositor
    standard_name: IR108_Europa_bkg
    prerequisites:
       - ir108_mask_prova
       - backgr_static_2

backgr_static_2:
    compositor: !!python/name:satpy.composites.StaticImageCompositor
    standard_name: backgr_static_2
    filename: /home/postelab/shape_data/background/world.topo.bathy.200407.3x21600x10800.jpg
    area: world_plat_21600_10800


from generic.yaml

palette_ir_clouds:
      standard_name: palette_ir_clouds
      operations:
       - name: colorize
         method: !!python/name:satpy.enhancements.colorize
         kwargs:
             palettes:
                  - {colors: greys, min_value: 213.27, max_value: 293.91}


Does anyone know how I can solve this problem?

Thanks a lot,
Alessia
image2.jpg
image.jpg

David Hoese

unread,
Jun 16, 2021, 10:01:50 PM6/16/21
to pyt...@googlegroups.com
Hi Alessia,

What composites are your images of (I can't tell by the filenames)?

Also, you said that "palette_ir_clouds" looks fine, but in your final
composite you use "ir108_mask_prova". Have you tried looking at that
composite alone? Does it look as you expect?

Dave
> --
> 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/b8d13566-5b32-4712-b74e-a4515ef5cfafn%40googlegroups.com
> <https://groups.google.com/d/msgid/pytroll/b8d13566-5b32-4712-b74e-a4515ef5cfafn%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages