Thanks for all the information and the data Ernst.
I don't have a ton of time to debug the whole process, but I have a
similar but slightly different theory. The
"night_ir_with_background_hires" consists of two sub-composites:
night_ir_alpha and _night_background_hires. The _night_background_hires,
as you know, comes from a geotiff that is downloaded. This data is
loaded as an RGB with uint8 data type. The night_ir_alpha composite is
produced as an RGBA of bands from the reader and is of type 32-bit float.
So, what this means is that the Alpha band of night_ir_alpha is in the
range of 180K to 303K in your data case. The space pixels in this alpha
band are set to NaN. So when resampling handles it and is told to use 0
or 255, it isn't that these values are 0 or 255 alpha values but
actually 0 or 255 Kelvin and are then scaled during the enhancement
phase. However, this doesn't explain why the middle of the foreground
image is transparent.
I can't think of a good or easy way to resample these dependencies in
one execution. I guess one question is, what happens to the alpha band
when the two composites are merged to make the
"night_ir_with_background_hires"? You'd think even if the background had
a fill value of 255 (the default resample fill_value for this integer
data) that the alpha band from the foreground would make these
transparent...oh unless the alpha band is explicitly ignored.
Looks like there is some alpha blending going on:
On 6/7/22 04:27, lobsiger...@gmail.com
> I attached the wrong *.txt. Here is the satpy script I was talking about.
schrieb am Dienstag, 7. Juni 2022 um 11:21:55 UTC+2:
> Hi Dave,
> Hi core developers,
> I made a minimal script that produces the issues discussed in this
> thread. I attach the script as *.txt below. You can download via
> "wetransfer" a *.tgz that contains everything needed (including the
> MSG4 seviri ir-data) under the link:
> > NOT neo.gsfc.nasa.gov
> 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