-
Notifications
You must be signed in to change notification settings - Fork 287
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
Add lat lon to Seviri plots #2719
Comments
You'll need to "enhance" your RGB image so that it gets each band stretched to the expected limits. Satpy's from satpy.writers import get_enhanced_image
image = get_enhanced_image(scn_resample_nc["dust"]).data.data.compute().transpose(1, 2, 0) instead of what you're doing now which is this:
Note that |
Now for my question, what does this line do: image = np.interp(image, (np.percentile(image,1), np.percentile(image,99)), (0, 1)) |
Well... imshow scales the color range between 0 and 1, so you can adjust the scaling to customize the color scale. That's why I thought... In summary, this line performs a contrast adjustment where the pixel values of the image are scaled to increase contrast and range between 0 and 1 to highlight and customize specific features in the image.... |
Ah, if I'm understanding you correctly that shouldn't be needed once |
Yes :D that is it... Greetings |
Just to make sure we're talking about the same thing, what do you mean by "pixel coordinate"? Normally I would recommend resampling the SEVIRI data and the model data to the same projection/grid (an AreaDefinition in satpy/pyresample terms). |
Pyresample was the key :) thanks. |
Hello,
I'm new to Satpy and I'm facing a bit of trouble. I've tried various approaches and couldn't find a solution through Google either.
I'm able to work with natural-color images without any issues. I want to integrate the image into Cartopy to add latitude and longitude gridlines. My next step is to incorporate model data, which has worked well for other satellites.
Even with natural-color images, everything is fine. However, when I use imshow() on the Seviri dust product, the image suddenly turns blue. When I use the show() method itself and work with the temporarily generated image, it appears correct. Is there a trick to make imshow() display the normal RGB dust color scheme? It seems that imshow() is altering the color scheme between 0 and 1.
![tmpa3gcgkir](https://private-user-images.githubusercontent.com/156442850/296267142-6a9ac1ab-0184-49bc-8ae9-11d6665daf76.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0NzYz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C1BbXotRGF0ZT0yMDI0MDcwOFQyMjAwNDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kOThlM2RhNDBkYjg0NTU1NWUyYmE4NjJkNzJjMzk2NTJkMGRhYjcyZDA5NTk2NmQ0MmNiMDhhMTFiZWJlNDRmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.UiYn2dPvwHVG6YM2_I1SvkbHeFAfwCN4qMCyFRCGbeM)
.show():
imshow:
I hope someone can assist me with this.
The text was updated successfully, but these errors were encountered: