# Corresponding values for the Sun's ultra violet color maps?

In my laboratory, we have an antenna to get data from the GOES-16 satellite and I want to reproduce NASA's nice visualization of ultraviolet images from the sensor SUVI.

I can read the data without any problem and thanks to the project sunpy I got the color tables corresponding to each band. But I have not found a reference for the exact correspondence between values and color indexes, so my version is not remotely as nice.

Where can I find a reference to know how to use this color map with my own software? I will appreciate any hint.

• Comparing the two images, it is apparent that the bright areas in the upper image are over-saturated while they are not in yours. Thus the bigger contrast at medium levels is gained by loosing information at the brightest end. You might also try to scale brightness logarithmically, or generally not linear. – planetmaker Aug 1 at 11:33

It’s hard to tell for sure without seeing the data and playing around, but looking at your image, I would suggest trying to subtract off a constant background level to get the sky as close to black as possible. You could sample the edges of the image to find the average background level. Then subtract that value from the whole image array and try plotting it. Even simpler would be just to subtract the minimum value, but that’s prone to being skewed by just a single pixel.

If you try it, post an image back here and let’s see how it looks.

Based on @ELNJ's answer I did a quick check of your posted image https://i.stack.imgur.com/Ky5Rl.png using the script below. Separating out the color channels we see the following:

channel   lowest value present

red           4
green        33
blue         90
alpha       255


So I think you can get dramatic results by subtracting an RGB value of [4, 33, 90]

which looks like this:

If that helps, or something along those lines does, please post an answer to your question, it is always okay to answer your own questions in Stack Exchange!

Python script for plot:

import numpy as np
import matplotlib.pyplot as plt

plt.imshow(img)
plt.show()

rgba = (255*np.moveaxis(img, 2, 0)).astype(int)
names = ['red', 'green', 'blue', 'alpha']
colors = names[:3] + ['black']
bins = np.arange(0, 257)
plt.figure()
plt.subplot(2, 1, 1)
plt.imshow(img)
plt.subplot(2, 1, 2)
for thing, name, color in zip(rgba, names, colors):
a, b = np.histogram(thing.flatten(), bins=bins)
plt.plot(b[:-1], a, color=color)
x = np.argmax(a)
y = a[x]
plt.annotate(name, (x, 1.01*y))
print('first nonzero value for ', name, ' is at ', np.nonzero(a)[0][0])
plt.xlabel('value')
plt.ylabel('frequency')
plt.show()