colormap

Hi

What is the color map in terms of a matrix for Texture Scaling/Gadient, that you use in molflow+?

I assume it is a nx3 matrix, rgb, but I want to have the exact one, so that I can generate identical plots in matlab by myself in some cases.

Thanks,
Chao

I paste below the source code for the "rainbow" colormap.

It has 65535 colors, the scale has 9 fixed points from black to purple 2 (so divided into 8 regions of 8192 interpolated colors each), and in between the fixed points each RGB component is linearly interpolated.

For the 9 fixed points you find below the colors in RRGGBB format (hexadecimal)

 

// Rainbow
unsigned long rainbowCol[] = { 0x000000,   //Black
							0xFF0000,   //Red
							0xFF8030,   //Orange
						  0xF8F800,   //Yellow
						  0x28FF28,   //Green
						0x0040FF,   //Light Blue
						0x0000B0,   //Dark Blue
						  0x800090,   //Purple 1
						  0xF00080 };  //Purple 2

I wonder what the general stance on the rainbow colormap is.

The trend goes towards more pleasant color schemes like Matlab's "parula" or various schemes according to Moreland (see Colorbrewer).

Rainbow has quite the history though, so I suppose a lot of people using Molflow are used to it.

For reference (from R's pal package):

Various schemes

 

  • Add to Phrasebook
     
    <ul class="iw-contextMenu iw-created iw-cm-menu" id="iw-contextMenu174" menuid="56344">
    	<li class="iw-mDisable" title="">No word lists for English -&gt; English...
    	<div class="iw-mOverlay">&nbsp;</div>
    	</li>
    	<li class="t-1" title="">Create a new word list...</li>
    </ul>
    </li>
    <li class="t-1" title="">Copy</li>
    
  • Add to Phrasebook
     
    <ul class="iw-contextMenu iw-created iw-cm-menu" id="iw-contextMenu8759" menuid="9869">
    	<li class="iw-mDisable" title="">No word lists for English -&gt; English...
    	<div class="iw-mOverlay">&nbsp;</div>
    	</li>
    	<li class="t-2" title="">Create a new word list...</li>
    </ul>
    </li>
    <li class="t-2" title="">Copy</li>
    
  • Add to Phrasebook
     
    <ul class="iw-contextMenu iw-created iw-cm-menu" id="iw-contextMenu352" menuid="40896">
    	<li class="iw-mDisable" title="">No word lists for English -&gt; English...
    	<div class="iw-mOverlay">&nbsp;</div>
    	</li>
    	<li class="t-3" title="">Create a new word list...</li>
    </ul>
    </li>
    <li class="t-3" title="">Copy</li>
    

I'm not sure to understand the question above.

Rainbow colormap represents the visible light spectrum, from 700 to 400nm, as the colors appear in a rainbow.

Molflow/Synrad color scale:

There were a lot of discussions in the past about suitable colorschemes for scientific visualisations, with the publication from Moreland (see paper) being one of the most well known ones that give a good overview of the subject and why good color schemes matter (besides just being more pleasant for the eyes).

Quick summary: Rainbow colormap does it's job, that's why it usually is a standard choice, but it has some problems (e.g. if you account for color-deficient vision).

So my question would be, if different colormaps would be something people are interested in at all?

 

EDIT: Another good read regarding that matter from the ROOT team (see here)

  • Add to Phrasebook
     
    <ul class="iw-contextMenu iw-created iw-cm-menu" id="iw-contextMenu439" menuid="3536">
    	<li class="iw-mDisable" title="">No word lists for English -&gt; English...
    	<div class="iw-mOverlay">&nbsp;</div>
    	</li>
    	<li class="t-2" title="">Create a new word list...</li>
    </ul>
    </li>
    <li class="t-2" title="">Copy</li>
    

Thank you for the clarification and the paper!

Just so you understand, I interpreted the "what the stance on rainbow colormap is" question as if you were asking what the definition of "rainbow" is, hence my previous answer.

Reading the paper, one remark is that the 5% of users with impaired color vision might put up with the grayscale scale already in Molflow, but it is indeed worthwhile to experiment with the cold-hot color scale, for example. So far only one user (from NASA!) mentioned that it would be nice to have control over the color scale, to match it to other software.

My suggestion:

  • It's a very quick change (in GLGradient.cpp and in the Facet::BuildTexture) to switch to cold-hot scale.
  • One can also check what "standard" scientific software use (i.e. "jet" scale in Matlab)
  • One has to see whether the cold-hot is visible on Molflow's blue and Synrad's red background!
  • If these tests pass, the "color scale" checkbox can be replaced by a combobox offering new options, not forgetting to update the config file and other references

It can be a nice programming task, I suggest to check with Roberto!

Cheers, Marton