change the colormap of 'colorized_ir_clouds'

20 views
Skip to first unread message

Thanasis Karagiannidis

unread,
Dec 17, 2020, 12:07:35 PM12/17/20
to pyt...@googlegroups.com
Hello to all

I was wondering how I could change the colormap of the cold clouds in the "colorized_ir_clouds" composite. I could alter the enhancements.yaml file, but I would like to change the colormap from my script.

And by the way, is there a page where I can find all available colormaps?

Best regrads

Sakis

David Hoese

unread,
Dec 17, 2020, 12:14:41 PM12/17/20
to pyt...@googlegroups.com
Hi Sakis,

I don't think there is currently a way to change the colormap from your
script. At least not easily since the composite has to pre-enhance the
data...I think. If you'd really like a way to do it I'm sure we can find
someone to throw together an example that might work.

As for what colormaps are builtin to Satpy, those come from the
trollimage package and are shown here:

https://trollimage.readthedocs.io/en/latest/colormap.html#default-colormaps
> --
> 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/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Thanasis Karagiannidis

unread,
Dec 17, 2020, 12:37:07 PM12/17/20
to pyt...@googlegroups.com
Hello David

I was afraid so... But it would be really helpful if the change of the colormap could be made from the script, in order to avoid filling the generic.yaml file with similar enhancements with slightly different colormaps!

A second issue that came in my mind is the reverse of the colormap! For example, if I create a new  enhancement in the generic.yaml with the rdby colormap, is there a way to reverse the colormap? The rdby_r trick does not work.

Thanx for thew colormaps page. I was hopping there were more colormaps available!

Sakis

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/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com.

David Hoese

unread,
Dec 17, 2020, 1:18:29 PM12/17/20
to pyt...@googlegroups.com
Colormap objects have a "reverse()" method that can be called. I think
it happens in-place. In the enhancement YAML, the colormap can take a
"reverse: True" parameter.

I see now that "colorized_ir_clouds" is a simpler composite than I
though. You should be able to do:

from trollimage.xrimage import XRImage
scn = Scene(...)
scn.load(['colorized_ir_clouds'])
img = XRImage(scn['colorized_ir_clouds'])
img.colorize(your_colormap)
img.save("your_file.tif")

If you need to add it back to the Scene you can probably do something like:

scn['colorized_ir_clouds'] = img.data

However, you'll have to be careful as calling "save_dataset/s" will
still run the enhancements so you'll need to specify "enhance=False".

Dave
> <mailto:pytroll%2Bunsu...@googlegroups.com>
> > <mailto:pytroll+u...@googlegroups.com
> <mailto:pytroll%2Bunsu...@googlegroups.com>>.
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.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%2Bunsu...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com
> <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.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/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Thanasis Karagiannidis

unread,
Dec 18, 2020, 6:51:33 AM12/18/20
to pyt...@googlegroups.com
Hello David

The reverse of the colomap work just fine. I reversed the rdpu colormap.
Since I also plot the colobar I had to reverse it in the script too using the following

from trollimage.colormap import Colormap
rdpu_r = Colormap((0.000, (73 / 255.0, 0.0, 106 / 255.0)), (1.000, (1.0, 247 / 255.0, 243 / 255.0)))


Regarding the setting of the colormap in the script instead of the yaml file, something does not work. I followed your suggestion

composite = 'colorized_ir_clouds'
files = glob(tmpdir + "/" + "H-000-MSG*" + Dat + "*")
global_scene = Scene(filenames = files, reader = 'seviri_l1b_hrit')
global_scene.load([composite])
from trollimage.xrimage import XRImage
from trollimage.colormap import blues
img = XRImage(global_scene[composite])
img.colorize(blues)
img.save("<path>/your_file.tif", enhance=False)
global_scene['colorized_ir_clouds'] = img.data

but the tif I get is a big one-color globe (see the file). The final image I get is not effected by the modification I try to make. It uses the default colormap of the yaml file.

In any case, a created a new enhancement in the generic.yaml file in the enhancements dir and circumvented the problem.

Thanx again

Sakis



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/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com.
your_file.tif

David Hoese

unread,
Dec 18, 2020, 9:58:17 AM12/18/20
to pyt...@googlegroups.com
Sakis,

Your colormap "values" have to be on the same scale as the data values.
This is done by calling the "set_range" method. You can see the ranges
used for the two colormaps used in the default enhancement:

- {colors: spectral, min_value: 193.15, max_value: 253.149999}
- {colors: greys, min_value: 253.15, max_value: 303.15}

So you should do:

rdpu_r.set_range(193.15, 303.15)

Or whatever range in Kelvin you want to support (Kelvin because those
are the units of the data coming from the reader).

Dave

On 12/18/20 5:51 AM, Thanasis Karagiannidis wrote:
> Hello David
>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      > <mailto:pytroll+u...@googlegroups.com
> <mailto:pytroll%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>>.
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>.
> >     To view this discussion on the web, visit
> >
> https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com
> <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.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%2Bunsu...@googlegroups.com>
> > <mailto:pytroll+u...@googlegroups.com
> <mailto:pytroll%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web, visit
> >
> https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com>
>
> >
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.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%2Bunsu...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com
> <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.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/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Thanasis Karagiannidis

unread,
Dec 18, 2020, 10:05:34 AM12/18/20
to pyt...@googlegroups.com
Yes, of course Dave.

I had already taken care of that.

Thank you

Sakis

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/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com.

David Hoese

unread,
Dec 18, 2020, 10:17:18 AM12/18/20
to pyt...@googlegroups.com
Sakis,

You took care of it. I don't see it in your code. Does this mean you now
have it working?

Dave
> >      >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>>>.
> >      >      > To view this discussion on the web, visit
> >      >      >
> >      >
> >
> https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com>>
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com>>>
> >      >
> >      >      >
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com?utm_medium=email&utm_source=footer>>
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7yXPQiD6pxvckYE7JUCvEv33%2BqRY7DwTidWKix7NRfaBA%40mail.gmail.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%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>>.
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      > <mailto:pytroll+u...@googlegroups.com
> <mailto:pytroll%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>>.
> >      > To view this discussion on the web, visit
> >      >
> >
> https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com>>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>.
> >     To view this discussion on the web, visit
> >
> https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com
> <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.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%2Bunsu...@googlegroups.com>
> > <mailto:pytroll+u...@googlegroups.com
> <mailto:pytroll%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web, visit
> >
> https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com>
>
> >
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.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%2Bunsu...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com
> <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.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/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Thanasis Karagiannidis

unread,
Dec 19, 2020, 5:47:32 AM12/19/20
to pyt...@googlegroups.com
Hello David

There may be a misunderstanding...

The "set_range" was made by me for the colorbar I show on my map. The colormap for the actual map was set in my generic.yaml file.


Now if you mean that I have to add it to the code that tries to change the colormap from inside the script the script:

I have done this

from trollimage.xrimage import XRImage
from trollimage.colormap import blues
blues.set_range(193.15, 303.15)

img = XRImage(global_scene[composite])
img.colorize(blues)
img.save("<path>/your_file.tif", enhance=False)
global_scene[composite] = img.data

But it throws an error "Image should be grayscale to colorize" (and the glob is no longer blue but it is the actual image painted in blue).

Sakis




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/5022e8ed-dd81-8e52-d454-e93bea727ddd%40gmail.com.

David Hoese

unread,
Dec 19, 2020, 10:33:45 AM12/19/20
to pyt...@googlegroups.com
Sakis,

In your previous bit of code you had:

rdpu_r = Colormap((0.000, (73 / 255.0, 0.0, 106 / 255.0)), (1.000, (1.0,
247 / 255.0, 243 / 255.0)))

I meant you needed to add this to your code:

rdpu_r.set_range(193.15, 303.15)

For it to work properly if I'm understanding correctly. I see now that
your second block of code was using the "blues" colormap so your most
recent code looks correct. As for the error, I'm not sure how you are
getting that error unless you are reusing the image (colorizing more
than once in the same script). The code should look something like this:

from trollimage.xrimage import XRImage
from trollimage.colormap import blues
global_scene = Scene(...)
global_scene.load([composite])

blues.set_range(193.15, 303.15)
img = XRImage(global_scene[composite])
img.colorize(blues)
img.save("<path>/your_file.tif")

That is it. That should produce a version of the data with the blue
colormap applied. If you need to plot your data later then `img.data` is
the DataArray you would use to do that and is an RGB image. Once it is
colorized once, that XRImage object can not be colorized again (it is
already RGB). If you need to colorize multiple times, then you'll need
to make multiple XRImage objects from the *original* uncolorized
`global_scene[composite]`.

Hopefully that makes sense.

Dave


On 12/19/20 4:47 AM, Thanasis Karagiannidis wrote:
> Hello David
>
> >      >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>
> >     <mailto:pytroll%25252Bun...@googlegroups.com
> <mailto:pytroll%2525252Bu...@googlegroups.com>>>>
> >      >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>
> >     <mailto:pytroll%25252Bun...@googlegroups.com
> <mailto:pytroll%2525252Bu...@googlegroups.com>>>>>.
> >      >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>
> >     <mailto:pytroll%25252Bun...@googlegroups.com
> <mailto:pytroll%2525252Bu...@googlegroups.com>>>>.
> >      >      >     To view this discussion on the web, visit
> >      >      >
> >      >
> >
> https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com
> <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com>>
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com> <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com>>>
> >      >      >
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com> <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com>> <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com> <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.com <https://groups.google.com/d/msgid/pytroll/544dc0fd-ca35-9c96-4deb-2ab2819ab37d%40gmail.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%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>>
> >      >      > <mailto:pytroll+u...@googlegroups.com
> <mailto:pytroll%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>>>.
> >      >      > To view this discussion on the web, visit
> >      >      >
> >      >
> >
> https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com>>
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com>>>
> >      >
> >      >      >
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer>>
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.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%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>>.
> >      >     To view this discussion on the web, visit
> >      >
> >
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      > <mailto:pytroll+u...@googlegroups.com
> <mailto:pytroll%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>>.
> >      > To view this discussion on the web, visit
> >      >
> >
> https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com>>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>.
> >     To view this discussion on the web, visit
> >
> https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com
> <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.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%2Bunsu...@googlegroups.com>
> > <mailto:pytroll+u...@googlegroups.com
> <mailto:pytroll%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web, visit
> >
> https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com>
>
> >
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.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%2Bunsu...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pytroll/5022e8ed-dd81-8e52-d454-e93bea727ddd%40gmail.com
> <https://groups.google.com/d/msgid/pytroll/5022e8ed-dd81-8e52-d454-e93bea727ddd%40gmail.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/CAJ5NJ7xfjUN7NpeQQs%2BEEsCDxqKj74CxEFagxCsTRRsUHtKbKg%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xfjUN7NpeQQs%2BEEsCDxqKj74CxEFagxCsTRRsUHtKbKg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Thanasis Karagiannidis

unread,
Dec 21, 2020, 12:17:37 PM12/21/20
to pyt...@googlegroups.com
Hello David

I think I did exactly that. An then reloaded the scene with

global_scene[composite] = img.data

as you suggested earlier in our conversation.

I do not attach the blue globe because the file is too large!

There are 2 problems with that.

1. It is painted with blue tones and can not be re-colorized like the "colorized_is_clouds" enhancement.
2. As you said, the  XRImage object can not be colorized again. I think the error is produced when  global_scene[composite] = img.data tries to re-colorize the object.


So, overall, I think that this method may not be suitable to change the colormap (the cold part of it) of the "colorized_ir_clouds" enhancement from within the script.

Thank you very much for your effort to help me, and all Pytroll users.

Best regards

Sakis

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/47b30bd1-76ec-7ff7-8ead-751f0df7021b%40gmail.com.

David Hoese

unread,
Dec 21, 2020, 12:57:48 PM12/21/20
to pyt...@googlegroups.com
Sakis,

I think the issue is that you are using one colormap when the original
enhancement for `colorized_ir_clouds` has two joined together. The YAML has:

- {colors: spectral, min_value: 193.15, max_value: 253.149999}
- {colors: greys, min_value: 253.15, max_value: 303.15}

That means that greys will be used for one range of the data and
"spectral" for the other part. You'd need to provide one joined colormap
to your script's colorize method if you wanted the same grey + color
result. You can join two colormaps by doing:

new_colormap = colormap1 + colormap2

As for this:

> global_scene[composite] = img.data

The above line should not be doing anything to the data. If you are
doing anything with the 'global_scene' **after** this, then that may
accidentally be re-enhancing the data. For example, if after doing the
above line you do:

global_scene.save_datasets()

Then the global_scene will be enhanced again and will be incorrect. If
you do:

global_scene.save_datasets(enhance=False)

Then it will not be.

If you are **only** doing:

img.save('your_image.tif')

with your custom colorized image then there is no need to re-assign to
`global_scene`.

Dave

On 12/21/20 11:17 AM, Thanasis Karagiannidis wrote:
> Hello David
>
> > <mailto:dho...@gmail.com <mailto:dho...@gmail.com>>> wrote:
> >
> >     Sakis,
> >
> >     You took care of it. I don't see it in your code. Does this
> mean you
> >     now
> >     have it working?
> >
> >     Dave
> >
> >     On 12/18/20 9:05 AM, Thanasis Karagiannidis wrote:
> >      > Yes, of course Dave.
> >      >
> >      > I had already taken care of that.
> >      >
> >      > Thank you
> >      >
> >      > Sakis
> >      >
> >      > On Fri, Dec 18, 2020 at 4:58 PM David Hoese
> <dho...@gmail.com <mailto:dho...@gmail.com>
> >     <mailto:dho...@gmail.com <mailto:dho...@gmail.com>>
> >      >     <mailto:pytroll%25252Bun...@googlegroups.com
> <mailto:pytroll%2525252Bu...@googlegroups.com>
> >     <mailto:pytroll%2525252Bu...@googlegroups.com
> <mailto:pytroll%252525252B...@googlegroups.com>>>>>
> >      >     <mailto:pytroll%25252Bun...@googlegroups.com
> <mailto:pytroll%2525252Bu...@googlegroups.com>
> >     <mailto:pytroll%2525252Bu...@googlegroups.com
> <mailto:pytroll%252525252B...@googlegroups.com>>>>>>.
> >      >     <mailto:pytroll%25252Bun...@googlegroups.com
> <mailto:pytroll%2525252Bu...@googlegroups.com>
> >     <mailto:pytroll%2525252Bu...@googlegroups.com
> <mailto:pytroll%252525252B...@googlegroups.com>>>>>.
> https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com>>
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com>>>
> >      >      >
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com>> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com>>>>
> >      >      >
> >      >      >      >
> >      >      >
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer>> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer>>>
> >      >      >
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer>> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xgXqAUOskNZ6%2BaVLm0ntNFU2h6%2BXmt6zn%3DOF-HnVvddQ%40mail.gmail.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%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>>
> >      >      >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>
> >      >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>
> >     <mailto:pytroll%25252Bun...@googlegroups.com
> <mailto:pytroll%2525252Bu...@googlegroups.com>>>>.
> >      >      >     To view this discussion on the web, visit
> >      >      >
> >      >
> >
> https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com
> <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com>>
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com> <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com>>>
> >      >      >
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com> <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com>> <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com> <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.com <https://groups.google.com/d/msgid/pytroll/b0af81f4-8192-6ca1-d617-3eda005567c8%40gmail.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%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>>
> >      >      > <mailto:pytroll+u...@googlegroups.com
> <mailto:pytroll%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>>>.
> >      >      > To view this discussion on the web, visit
> >      >      >
> >      >
> >
> https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com>>
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com>>>
> >      >
> >      >      >
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer>>
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.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%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>>.
> >      >     To view this discussion on the web, visit
> >      >
> >
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      > <mailto:pytroll+u...@googlegroups.com
> <mailto:pytroll%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>>.
> >      > To view this discussion on the web, visit
> >      >
> >
> https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com>>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>.
> >     To view this discussion on the web, visit
> >
> https://groups.google.com/d/msgid/pytroll/5022e8ed-dd81-8e52-d454-e93bea727ddd%40gmail.com
> <https://groups.google.com/d/msgid/pytroll/5022e8ed-dd81-8e52-d454-e93bea727ddd%40gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/5022e8ed-dd81-8e52-d454-e93bea727ddd%40gmail.com <https://groups.google.com/d/msgid/pytroll/5022e8ed-dd81-8e52-d454-e93bea727ddd%40gmail.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%2Bunsu...@googlegroups.com>
> > <mailto:pytroll+u...@googlegroups.com
> <mailto:pytroll%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web, visit
> >
> https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xfjUN7NpeQQs%2BEEsCDxqKj74CxEFagxCsTRRsUHtKbKg%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xfjUN7NpeQQs%2BEEsCDxqKj74CxEFagxCsTRRsUHtKbKg%40mail.gmail.com>
>
> >
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xfjUN7NpeQQs%2BEEsCDxqKj74CxEFagxCsTRRsUHtKbKg%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xfjUN7NpeQQs%2BEEsCDxqKj74CxEFagxCsTRRsUHtKbKg%40mail.gmail.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%2Bunsu...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pytroll/47b30bd1-76ec-7ff7-8ead-751f0df7021b%40gmail.com
> <https://groups.google.com/d/msgid/pytroll/47b30bd1-76ec-7ff7-8ead-751f0df7021b%40gmail.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/CAJ5NJ7wE3CQhmCzo9vsRJSfanz4u0VKkYUr4JWS-LRe-_9Bvtg%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7wE3CQhmCzo9vsRJSfanz4u0VKkYUr4JWS-LRe-_9Bvtg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Thanasis Karagiannidis

unread,
Dec 22, 2020, 2:20:13 AM12/22/20
to pyt...@googlegroups.com
Thank you for the clarifications David.

They were really helpful.

Just one comment of the joining of the two colormaps.

If I do that, I will have no control over which part of the temperature range is colored by each colormap. But I guess it is one solution if someone has no problem with that.

Best regards

Sakis

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/49a82f50-e00c-13e9-3d90-0a7d18e78e51%40gmail.com.

David Hoese

unread,
Dec 22, 2020, 10:33:23 AM12/22/20
to pyt...@googlegroups.com
Sakis,

You run set_range on the individual colormaps **then** merge them. They
will keep the ranges they have. That's why the YAML for the enhancement
include the temperature ranges for each colormap.

Dave
> >      > <mailto:dho...@gmail.com <mailto:dho...@gmail.com>
> <mailto:dho...@gmail.com <mailto:dho...@gmail.com>>>> wrote:
> >      >
> >      >     Sakis,
> >      >
> >      >     You took care of it. I don't see it in your code. Does
> this
> >     mean you
> >      >     now
> >      >     have it working?
> >      >
> >      >     Dave
> >      >
> >      >     On 12/18/20 9:05 AM, Thanasis Karagiannidis wrote:
> >      >      > Yes, of course Dave.
> >      >      >
> >      >      > I had already taken care of that.
> >      >      >
> >      >      > Thank you
> >      >      >
> >      >      > Sakis
> >      >      >
> >      >      > On Fri, Dec 18, 2020 at 4:58 PM David Hoese
> >     <dho...@gmail.com <mailto:dho...@gmail.com>
> <mailto:dho...@gmail.com <mailto:dho...@gmail.com>>
> >      >     <mailto:dho...@gmail.com <mailto:dho...@gmail.com>
> <mailto:dho...@gmail.com <mailto:dho...@gmail.com>>>
> >      >     <mailto:pytroll%2525252Bu...@googlegroups.com
> <mailto:pytroll%252525252B...@googlegroups.com>
> >     <mailto:pytroll%252525252B...@googlegroups.com
> <mailto:pytroll%25252525252...@googlegroups.com>>>>>>
> >      >     <mailto:pytroll%2525252Bu...@googlegroups.com
> <mailto:pytroll%252525252B...@googlegroups.com>
> >     <mailto:pytroll%252525252B...@googlegroups.com
> <mailto:pytroll%25252525252...@googlegroups.com>>>>>>>.
> >      >     <mailto:pytroll%2525252Bu...@googlegroups.com
> <mailto:pytroll%252525252B...@googlegroups.com>
> >     <mailto:pytroll%252525252B...@googlegroups.com
> <mailto:pytroll%25252525252...@googlegroups.com>>>>>>.
>  <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>
> >      >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>
> >     <mailto:pytroll%25252Bun...@googlegroups.com
> <mailto:pytroll%2525252Bu...@googlegroups.com>>>
> >      >      >
>  <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>
> >     <mailto:pytroll%25252Bun...@googlegroups.com
> <mailto:pytroll%2525252Bu...@googlegroups.com>>
> >      >     <mailto:pytroll%25252Bun...@googlegroups.com
> <mailto:pytroll%2525252Bu...@googlegroups.com>
> >     <mailto:pytroll%2525252Bu...@googlegroups.com
> <mailto:pytroll%252525252B...@googlegroups.com>>>>>.
> >      >      >      >     To view this discussion on the web, visit
> >      >      >      >
> >      >      >
> >      >
> >
> https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com>>
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com>>>
> >      >      >
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com>> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com>>>>
> >      >      >
> >      >      >      >
> >      >      >
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer>> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer>>>
> >      >      >
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer>> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7y1BHPvYn0u%3D1vKCtq0tPsrRNJOouSPY_0TG4J5hhyskQ%40mail.gmail.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%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>>
> >      >      >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>
> >      >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>
> >     <mailto:pytroll%25252Bun...@googlegroups.com
> <mailto:pytroll%2525252Bu...@googlegroups.com>>>>.
> >      >      >     To view this discussion on the web, visit
> >      >      >
> >      >
> >
> https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com
> <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com>>
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com> <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com>>>
> >      >      >
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com> <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com>> <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com> <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.com <https://groups.google.com/d/msgid/pytroll/067b130a-bc20-5ca6-1aa3-2d2815432c43%40gmail.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%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>>
> >      >      > <mailto:pytroll+u...@googlegroups.com
> <mailto:pytroll%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>>>.
> >      >      > To view this discussion on the web, visit
> >      >      >
> >      >
> >
> https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com>>
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com>>>
> >      >
> >      >      >
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com?utm_medium=email&utm_source=footer>>
> >      >
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7z%3DkhSdbF7rStCk%2B7uU8Tp2adRnA_%2B_aZGA_6dJu0mxxw%40mail.gmail.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%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>
> >     <mailto:pytroll%252Buns...@googlegroups.com
> <mailto:pytroll%25252Bun...@googlegroups.com>>>.
> >      >     To view this discussion on the web, visit
> >      >
> >
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>
> >      > <mailto:pytroll+u...@googlegroups.com
> <mailto:pytroll%2Bunsu...@googlegroups.com>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>>.
> >      > To view this discussion on the web, visit
> >      >
> >
> https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xfjUN7NpeQQs%2BEEsCDxqKj74CxEFagxCsTRRsUHtKbKg%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xfjUN7NpeQQs%2BEEsCDxqKj74CxEFagxCsTRRsUHtKbKg%40mail.gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xfjUN7NpeQQs%2BEEsCDxqKj74CxEFagxCsTRRsUHtKbKg%40mail.gmail.com <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7xfjUN7NpeQQs%2BEEsCDxqKj74CxEFagxCsTRRsUHtKbKg%40mail.gmail.com>>
> >     <mailto:pytroll%2Bunsu...@googlegroups.com
> <mailto:pytroll%252Buns...@googlegroups.com>>.
> >     To view this discussion on the web, visit
> >
> https://groups.google.com/d/msgid/pytroll/47b30bd1-76ec-7ff7-8ead-751f0df7021b%40gmail.com
> <https://groups.google.com/d/msgid/pytroll/47b30bd1-76ec-7ff7-8ead-751f0df7021b%40gmail.com>
> >
>  <https://groups.google.com/d/msgid/pytroll/47b30bd1-76ec-7ff7-8ead-751f0df7021b%40gmail.com <https://groups.google.com/d/msgid/pytroll/47b30bd1-76ec-7ff7-8ead-751f0df7021b%40gmail.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%2Bunsu...@googlegroups.com>
> > <mailto:pytroll+u...@googlegroups.com
> <mailto:pytroll%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web, visit
> >
> https://groups.google.com/d/msgid/pytroll/CAJ5NJ7wE3CQhmCzo9vsRJSfanz4u0VKkYUr4JWS-LRe-_9Bvtg%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7wE3CQhmCzo9vsRJSfanz4u0VKkYUr4JWS-LRe-_9Bvtg%40mail.gmail.com>
>
> >
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7wE3CQhmCzo9vsRJSfanz4u0VKkYUr4JWS-LRe-_9Bvtg%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7wE3CQhmCzo9vsRJSfanz4u0VKkYUr4JWS-LRe-_9Bvtg%40mail.gmail.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%2Bunsu...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pytroll/49a82f50-e00c-13e9-3d90-0a7d18e78e51%40gmail.com
> <https://groups.google.com/d/msgid/pytroll/49a82f50-e00c-13e9-3d90-0a7d18e78e51%40gmail.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/CAJ5NJ7zbtZqBPOnjS_8bs5eTp2j%3DQfagtSAgpfdOdcmJS_QBEg%40mail.gmail.com
> <https://groups.google.com/d/msgid/pytroll/CAJ5NJ7zbtZqBPOnjS_8bs5eTp2j%3DQfagtSAgpfdOdcmJS_QBEg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Thanasis Karagiannidis

unread,
Dec 24, 2020, 4:05:24 AM12/24/20
to pyt...@googlegroups.com

Dear David

 

Now I get it!

 

I did what you said and it works. In fact I used to following code to resample my scene, add coastlines and color it with my user defined colormap. Thanx for the help!

area = 'Med3'

composite = 'colorized_ir_clouds'

global_scene = Scene(filenames = files, reader = 'seviri_l1b_hrit')

global_scene.load([composite])

 

resample_method = 'bilinear'

new_scene = global_scene.resample(area, radius_of_influence = 7000, resampler = resample_method, cache_dir='/<mypath2>/cache_dir')

 

coast = {'coast_dir': '/<mypath3>/aux/',

         'color': (0, 0, 0), 'width': 1.0, 'resolution': 'f'}

 

from trollimage.xrimage import XRImage

from trollimage.colormap import blues

from trollimage.colormap import greys

blues.set_range(193.15,  253.149999)

greys.set_range(253.15, 303.15)

mycmap = blues + greys

img = XRImage(global_scene[composite])

img.colorize(mycmap)

new_scene[composite] = img.data

 

new_scene.save_dataset(composite,'/<mypath4>/MSG4.png', overlay = coast, enhance=False)



Best regads

Sakis

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/eb221a93-667a-ab3c-e585-bca0c525f4a2%40gmail.com.
Reply all
Reply to author
Forward
0 new messages