-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Versions above 1.21.0 will not produce IR Images #162
Comments
There's nothing IR-specific in Trollimage. Could you share a minimal script that reproduces the issue you're seeing? |
Looks like the stretching is not behaving correctly: greenland is blue and the day part also has funky colours. |
OK, I am not the only one with this problem, have a look at this link from the Group for Earth Observation MSG Attached is the Python script to create the above image, my areas yaml file and the list of modules in my Python venv using Python 3.11.7 All the modules are up to date as the latest except trollimage. |
Smells like a problem in stretching integer data as this happens only(?) when using a static background image. |
Looking at the second image in the original post I see that the land on the night side still has valid data. The sea/ocean is the only part that seems to be pure black. The night_ir_alpha:
compositor: !!python/name:satpy.composites.GenericCompositor
standard_name: night_ir_alpha
prerequisites:
- name: IR_039
- name: IR_108
- name: IR_120
- name: IR_10 |
Ah here we go, why is
If I recall correctly that's exactly what @mraspaud assumed would never be done in #145. My comment:
Martin's reply:
That need has arisen @mraspaud lol |
Ok, I'll have a look in the morning |
@TheMetMan I just created PR #163, which should address part of the problem, the other part being in satpy. I will fix the corresponding satpy recipes once this is merged, but if you want to try it out, in satpy's night_ir_alpha:
standard_name: night_ir_alpha
operations:
- name: stretch
method: !!python/name:satpy.enhancements.stretch
kwargs: {stretch: linear, cutoffs: [[0.02, 0.02], [0.02, 0.02], [0.02, 0.02], [0.02, 0.02]]}
- name: inverse
method: !!python/name:satpy.enhancements.invert
args:
- [true, true, true, true] Using this, I get the expected image. |
OK, I have changed the
I am using the same script I have uploaded above It happens on the line:
|
Did you also install the Trollimage version from #163 that adds the handling for the new limits? |
pip install git+https://github.com/mraspaud/trollimage.git@fix-alpha-stretching should install the version on the PR. |
@TheMetMan the error you have shows the PR version of trollimage is not installed... |
Sorry@mraspaud My error, I have installed trollimage 1.22.2 and then the patch as above and all well now. |
@TheMetMan thanks a lot for checking this out! |
Describe the bug
I am decoding MSG Data using SatPy
I upgrade to SatPy 0.46.0 and all the modules in the virtual environment to the latest versions. After that all my images with IR in them would not render, they are just blank.
In particular 'natural_color_with_night_ir' only shows daylight image, not Night. So decoding an image at 0800 hrs of the Eastern Atlantic the cloud in the night part of the image is missing.
After a lot of research I discovered that the problem is with trollimage. Versions above 1.21.0 will not render IR.
To Reproduce
Expected behavior
The image should show the cloud structure for daylight and nighttime.
Actual results
I attach two images to show the difference. The IR part of the image should be rendered, but it is not.
Environment Info:
The text was updated successfully, but these errors were encountered: