Dear Developers,
In the field of Astronomy (and in science in general) we often make
images that represent the intensity of some source.
However the color schemes used to display images are not perceived as
increasing monotonically in brightness.
D.A. Green developed a color scheme that does increase monotonically
in brightness and this scheme is already in use in several data
display packages (e.g. CASA and AIPS, two software packages used to
analyze radio astronomy data).
The paper describing this algorithm can be found here
http://arxiv.org/abs/1108.5083
The main advantage of this color map is that images will look
monotonically increasing in brightness to the eye both on color screen
and when printed in black and white (as is often needed for scientific
papers).
Attached is a patch for _cm.py to add this colormap (named cubehelix
as it is named in CASA) to the list of matplotlib colormaps.
Complicating this a bit is the fact that the algorithm takes several
parameters as specified in the paper referred to (start color, number
of rotations, hugh parameter and gamma factor).
These parameters are now set to the values they have in the default
CASA color map but ideally they could be changed by the user.
I could not find any other colormap that has this option so I don't
know what the preffered way of doing this is, therefore I left the
values hardcoded which should be ok for most applications anyway.
Please let me know what you think.
Kind regards,
Pim Schellart
0001-Added-cubehelix-monotonically-increasing-colorscheme.patch (1.82 KB)