Colormap often used in H.E.S.S. collaboration publications.
This colormap goes black -> blue -> red -> yellow -> white.
A sharp blue -> red -> yellow transition is often used for significance images with a value of red at
transition ~ 5or
transition ~ 7so that the following effect is achieved:
black, blue: non-significant features, not well visible
red: features at the detection threshold
yellow, white: significant features, very well visible
The transition parameter is defined between 0 and 1. To calculate the value from data units an
ImageNormalizeinstance should be used (see example below).
- transitionfloat (default = 0.5)
Value of the transition to red (between 0 and 1).
- widthfloat (default = 0.5)
Width of the blue-red color transition (between 0 and 1).
>>> from gammapy.visualization import colormap_hess >>> from astropy.visualization.mpl_normalize import ImageNormalize >>> from astropy.visualization import LinearStretch >>> normalize = ImageNormalize(vmin=-5, vmax=15, stretch=LinearStretch()) >>> transition = normalize(5) >>> cmap = colormap_hess(transition=transition)