-
Notifications
You must be signed in to change notification settings - Fork 303
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 CIMSS True Color (Natural Color) RGB recipes #672
Conversation
Codecov Report
@@ Coverage Diff @@
## master #672 +/- ##
==========================================
+ Coverage 84.62% 84.64% +0.01%
==========================================
Files 169 171 +2
Lines 24996 25035 +39
==========================================
+ Hits 21153 21191 +38
- Misses 3843 3844 +1
Continue to review full report at Codecov.
|
Did you get feedback from the Imagery team @djhoese ? |
I sent them some updates, but not sure I got an explicit approval or disapproval. I will re-read the emails, check in with them in person, and let you know. |
I'm missing some information from the GOES Imagery team on this. It seems that their true color (natural color) image doesn't use solar zenith correction. I was also given code from Kaba Bah that is used in AWIPS to generate these images from the L1b data, but am still waiting on answers to the "why" for some of the strategies taken. For example, their processing has an additional contrast enhancement applied to it to make the image brighter but doesn't use the full image (0-255) range. I've removed this from the 0.16 milestone and we'll have to wait for answers before merging this. |
Current Satpy New New New Comparison of enhancement methods (cira_stretch is used for satpy 'true_color', Kaba's contrast is used for all cimss_true_color variations): Code to generate above plotimport matplotlib.pyplot as plt
import numpy as np
plt.figure()
x = np.arange(256.0)
# sqrt
sqrt_data = ((x / 255.) ** 0.5) * 255
# cira stretch
band_data = x / 2.55
log_root = np.log10(0.0223)
denom = (1.0 - log_root) * 0.75
band_data *= 0.01
band_data = band_data.clip(np.finfo(float).eps)
band_data = np.log10(band_data)
band_data -= log_root
band_data /= denom
band_data *= 255
band_data[band_data < 0] = 0
# contrast
aband = (np.linspace(0, 1.0, 256) ** 0.5) * 255
maxValue = 255
acont = 255.0 / 10.0
amax = 255.0 + 4
amid = 255.0 / 2.0
afact = (amax * (acont + maxValue) / (maxValue * (amax - acont)))
aband = (afact * (aband - amid) + amid)
aband[aband <= 10] = 0
aband[aband >= 255] = 255
plt.plot(x, x, label='linear')
plt.plot(x, sqrt_data, label='sqrt')
plt.plot(x, band_data, label='cira_stretch')
plt.plot(x, aband, label='Kaba\'s contrast')
plt.legend()
plt.savefig('true_color_stretch_compare.png') |
I talked with the NOAA/CIMSS GOES Imagery team about adding this composite to SatPy so that it could be included in CSPP Geo2Grid. This PR adds the necessary steps to add it. Although this is complete I want to wait for some feedback from the Imagery team because the produced output makes the output's green colors look very grey.
This recipe is described here: https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2018EA000379
It is important to note that the Imagery team (as described in the above paper) consider composites to fall in to two categories: true color and false color. I have always considered true color one specific composite (with optional modifications like rayleigh correction and any number of enhancement differences). The Imagery team see it as the true color category where the various modifications/enhancements make separate composites in that category. They also use the name "natural color" for their true color because it is the way the earth looks "naturally". Although this name makes more sense for this RGB compared to what EUMETSAT's "natural color" is, most people know the EUTMETSAT version by this name. Therefore, I've named this composite "cimss_true_color".
git diff origin/master -- "*py" | flake8 --diff