In the first post of this series I argued that we should not build colormaps for azimuth (or phase) data by interpolating linearly between fully saturated hues in RGB or HSL space.
A first step towards the ideal colormap for azimuth data would be to interpolate between isoluminant colours instead. Kindlmann et al. (2002) published isoluminant RGB values for red, yellow, green, cyan, blue, and magenta based on a user study. The code in the next block show how to interpolate between those published colours to get 256-sample R, G, and B arrays (with magenta repeated at both ends), which can then be combined into a isoluminant colormap for azimuth data.
01 r = np.array([0.718, 0.847, 0.527, 0.000, 0.000, 0.316, 0.718]) 02 g = np.array([0.000, 0.057, 0.527, 0.592, 0.559, 0.316, 0.000]) 03 b = np.array([0.718, 0.057, 0.000, 0.000, 0.559, 0.991, 0.718]) 04 x = np.linspace(0,256,7) 05 xnew = np.arange(256) 06 r256 = np.interp(xnew, x, r) 07 g256 = np.interp(xnew, x, g) 08 b256 = np.interp(xnew, x, b)
This is a good example in general of how to interpolate to a finer sampling one or more sequence of values using the interp function from the Numpy library. In line 04 we define 7 evenly spaced points between 0 and 255; this will be the sample coordinate for the r, g, and b colours created in lines 01-03. In line 05 we create the new coordinates we will be interpolating r, g, and b values at in lines 06-08 (all integers between 0 and 256). The full code will come in the Notebook accompanying the last post in this series.
This new colormap is used in the bottom map of the figure below, whereas in the top map we used a conventional HSV azimuth colormap (both maps show the dip azimuth calculated on the Penobscot horizon). The differences are subtle, but with the isoluminant colormap we are guaranteed there are no perceptual artifacts due to the random variations in lightness of the fully saturated HSV colors.
Another possible strategy to create a perceptual colormap for azimuth data would be to set lightness and chroma to constant values in LCH space and interpolate between hues. This is the Matlab colormap I previously created, and shown in Figure 4 of New Matlab isoluminant colormap for azimuth data. In the next post, I will show how to do this in Python.
Read more on colors and seismic data
The last two posts on Agile show you how to corender seismic amplitude and continuity from a time slice using a 2D colormap, and then how to corender 3 attributes from a horizon slice.
Kindlmann, E. et al. (2002). Face-based Luminance Matching for Perceptual Colour map Generation – Proceedings of the IEEE conference on Visualization.