Open gerritholl opened 2 days ago
The documentation contradicts the implementation and the test. The documentation claims that the night is replaced with nans:
The test asserts that the night is replaced with zeroes:
This was added by @yukaribbba in https://github.com/pytroll/satpy/pull/2358 to solve https://github.com/pytroll/satpy/issues/2357. Apparently, a black background was desired at the time, but the documentation still contradicts the implementation.
Describe the bug
When using the
DayNightCompositor
with the parameterday_night: day_only
andinclude_alpha: False
, the night part is not set to fill value and the resulting geotiff (mode L or mode RGB) is the same as without using theDayNightCompositor
at all.To Reproduce
Expected behavior
I expect that those pixels, which are night-time, are set to zero, in accordance to the fill value, so that supporting image viewers such as QGIS will display those pixels as transparent, like they do with space pixels.
Actual results
Environment Info:
Additional context
It seems that the
DayNightCompositor
does not set the night time pixels to fill value at all, but leaves them at zero:Then
get_enhanced_image
does not know those pixels should be masked, and sets them to one because it cannot know those pixels should be considered masked rather than physical zero values.