Creating Diffence Image

21 views
Skip to first unread message

b. schitter

unread,
Feb 14, 2022, 3:50:20 PMFeb 14
to pytroll
Hello,

what's the simpliest way to create a fog diffence image?

It should be the diffence of IR3.9 - IR10.8.

Do I have to calculate the differnce for all the 3 colors (RGB) or is there another way?

Best regards,
Bernhard

Raspaud Martin

unread,
Feb 15, 2022, 4:50:13 AMFeb 15
to pyt...@googlegroups.com
Hi Bernhard,

One simple solution would be to use something like explained here:
https://satpy.readthedocs.io/en/stable/quickstart.html#creating-new-datasets
and then just save that dataset as an image (it will be black and white
if it is just the difference you mention)

If you want to have more control over the result, you can have you own
custom yaml composite config and enhancement config.

Maybe this part of the documentation can help too:
https://satpy.readthedocs.io/en/stable/composites.html#creating-composite-configuration-files

Best regards,
Martin

David Hoese

unread,
Feb 15, 2022, 10:04:23 AMFeb 15
to pyt...@googlegroups.com
Hi Bernhard,

For VIIRS data we actually have a composite builtin to Satpy that comes
from my Polar2Grid software. In Satpy it is called "ssec_fog" and is a
temperature difference between the I05 and I04 bands:

https://github.com/pytroll/satpy/blob/82112a60f843ad0d3fa32c6d49f224bcb00f28d7/satpy/etc/composites/viirs.yaml#L419-L424

Hope that can be used as a starting point.

Dave

b. schitter

unread,
Feb 16, 2022, 12:52:54 AMFeb 16
to pytroll
Hi Dave, hi Martin,

thank you for this hints. I could calculate the difference image. Now I want to enhance it.

The minimum value (-5) should have the color 255,255,153 and the max value (1) should have the color 0,0,128.

Is this possible in .../enhancements/generic.yaml?

Best regards,
Bernhard

Raspaud Martin

unread,
Feb 16, 2022, 2:19:21 AMFeb 16
to pyt...@googlegroups.com
Hi Bernhard,

Yes generic.yaml would be a good place to put your enhancement. For
giving a palette to apply, look for example here:
https://github.com/pytroll/satpy/blob/e72a3f029e6a94b55f48d894cbad20b1f4ef0562/satpy/etc/enhancements/viirs.yaml#L11-L48

Best regards,
Martin

Gis Geo

unread,
Mar 8, 2022, 3:26:58 PMMar 8
to pyt...@googlegroups.com
Hi 
How create image RGB using python whit satellite meteosat 8
Best regards

--
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/51aa823f3aabf216182f17ea4ab4d69f73271beb.camel%40smhi.se.

Raspaud Martin

unread,
Mar 9, 2022, 3:29:18 AMMar 9
to pyt...@googlegroups.com
Hi,

If the data you have is in HRIT format, satpy can read it, and you can have a look here for instructions:
https://satpy.readthedocs.io/en/stable/quickstart.html

Best regards,
Martin

________________________________________
From: pyt...@googlegroups.com <pyt...@googlegroups.com> on behalf of Gis Geo <gis...@gmail.com>
Sent: 08 March 2022 21:26:44
To: pyt...@googlegroups.com
Subject: Re: [pytroll] Creating Diffence Image

Hi
How create image RGB using python whit satellite meteosat 8
Best regards

في الأربعاء، ١٦ فبراير، ٢٠٢٢ ١٠:١٩ ص Raspaud Martin <martin....@smhi.se<mailto:martin....@smhi.se>> كتب:
Hi Bernhard,

Yes generic.yaml would be a good place to put your enhancement. For
giving a palette to apply, look for example here:
https://github.com/pytroll/satpy/blob/e72a3f029e6a94b55f48d894cbad20b1f4ef0562/satpy/etc/enhancements/viirs.yaml#L11-L48

Best regards,
Martin

On Tue, 2022-02-15 at 21:52 -0800, b. schitter wrote:
> Hi Dave, hi Martin,
>
> thank you for this hints. I could calculate the difference image. Now
> I want to enhance it.
>
> The minimum value (-5) should have the color 255,255,153 and the max
> value (1) should have the color 0,0,128.
>
> Is this possible in .../enhancements/generic.yaml?
>
> Best regards,
> Bernhard
>
> dho...@gmail.com<mailto:dho...@gmail.com> schrieb am Dienstag, 15. Februar 2022 um 16:04:23
To unsubscribe from this group and stop receiving emails from it, send an email to pytroll+u...@googlegroups.com<mailto:pytroll%2Bunsu...@googlegroups.com>.
--
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/CAG3epdB56hkHwufHq%2BN0ubLiuv%3Dyv9sQLuMbeAkjWfqDzGj44A%40mail.gmail.com<https://groups.google.com/d/msgid/pytroll/CAG3epdB56hkHwufHq%2BN0ubLiuv%3Dyv9sQLuMbeAkjWfqDzGj44A%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Raspaud Martin

unread,
Mar 9, 2022, 5:12:53 AMMar 9
to pyt...@googlegroups.com
Hi,

If the data you have is in HRIT format, satpy can read it, and you can
have a look here for instructions:
https://satpy.readthedocs.io/en/stable/quickstart.html

Best regards,
Martin

Gis Geo

unread,
Mar 10, 2022, 5:27:32 PMMar 10
to pyt...@googlegroups.com
Hello dear, I have the data in netcdf format and I want to make an RGB image without going to the site or the archive. I just want to clarify how the air mass works in the anacoda program.
Best regards🙏

Raspaud Martin

unread,
Mar 11, 2022, 2:23:10 AMMar 11
to pyt...@googlegroups.com
Hi,

I suppose it is netcdf format from the Eumetsat archive? I which case,
there is a reader for it (have a look at the reader table on the main
page on the satpy documentation).

The airmass product is described here:
https://www.eumetsat.int/media/41623

Best regards,
Martin
Reply all
Reply to author
Forward
0 new messages