2

I am doing a RGB image using python for GOES16 Air Mass product, I extract the information for the range of interest like this:

RED[RED < -26.2] = -26.2
RED[RED > 0.6] = 0.6
GREEN[GREEN < -43.2] = -43.2
GREEN[GREEN > 6.7] = 6.7
BLUE[BLUE < 243.9] = 243.9
BLUE[BLUE > 208.5] = 208.5

And makes the RGB:

RGB = np.zeros((5424,5424,3))
RGB[:,:,0] = (RED-np.min(RED))/(np.max(RED)-np.min(RED))
RGB[:,:,1] = (GREEN-np.min(GREEN))/(np.max(GREEN)-np.min(GREEN))
RGB[:,:,2] = (BLUE-np.min(BLUE))/(np.max(BLUE)-np.min(BLUE))

I think it's ok because it works in the generation of other products, like S02 or Volcanic Ash. The problem is that I am getting a yellowish image (like there is no contribution for the blue color), and I don't know what is wrong.

tonysg
  • 64
  • 6
  • I think you have `<` and `>` backwards for `BLUE` in your first block of code. – hoffee Jul 12 '18 at 17:26
  • I thought that, but it is all right because in this case the values for the blue color are supposed to be inverted, that's why 243.9 is the minimum value and 208.5 the maximum. – tonysg Jul 12 '18 at 17:41
  • Look at the values of `BLUE` after you scale them. I believe they will all be 208.5. I'll explain in an answer. – hoffee Jul 12 '18 at 17:59

1 Answers1

1

Let's look at the manipulation of BLUE:

BLUE[BLUE < 243.9] = 243.9

This line makes the minimum value of BLUE 243.9.

BLUE[BLUE > 208.5] = 208.5

This line sets all values of BLUE greater then 208.5 equal to 208.5. Since the minimum value of BLUE is 243.9, all values of BLUE are now 208.5.

hoffee
  • 470
  • 3
  • 16
  • Yes, you are right. I changed that, and also made changes in the second block of code, in the blue equation, because of the inversion of the values. Thank you. – tonysg Jul 12 '18 at 18:47