- gammapy.visualization.colormap_milagro(transition=0.5, width=0.0001, huestart=0.6)#
Colormap often used in Milagro collaboration publications.
This colormap is gray below
transitionand similar to the jet colormap above.
A sharp gray -> color transition is often used for significance images with a transition value of
transition ~ 5or
transition ~ 7, so that the following effect is achieved:
gray: non-significant features are not well visible
color: significant features at the detection threshold
Note that this colormap is often criticised for over-exaggerating small differences in significance below and above the gray - color transition threshold.
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)
Transition value (below: gray, above: color).
- widthfloat (default = 0.0001)
Width of the transition
- huestartfloat (default = 0.6)
Hue of the color at
>>> from gammapy.visualization import colormap_milagro >>> 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_milagro(transition=transition)