ImageNormalize¶
-
class
astropy.visualization.mpl_normalize.ImageNormalize(data=None, interval=None, vmin=None, vmax=None, stretch=<astropy.visualization.stretch.LinearStretch object>, clip=False)[source]¶ Bases:
matplotlib.colors.NormalizeNormalization class to be used with Matplotlib.
- Parameters
- data
ndarray, optional The image array. This input is used only if
intervalis also input.dataandintervalare used to compute the vmin and/or vmax values only ifvminorvmaxare not input.- interval
BaseIntervalsubclass instance, optional The interval object to apply to the input
datato determine thevminandvmaxvalues. This input is used only ifdatais also input.dataandintervalare used to compute the vmin and/or vmax values only ifvminorvmaxare not input.- vmin, vmaxfloat, optional
The minimum and maximum levels to show for the data. The
vminandvmaxinputs override any calculated values from theintervalanddatainputs.- stretch
BaseStretchsubclass instance The stretch object to apply to the data. The default is
LinearStretch.- clipbool, optional
If
True, data values outside the [0:1] range are clipped to the [0:1] range.
- data
- Parameters
- vmin, vmaxfloat or None
If vmin and/or vmax is not given, they are initialized from the minimum and maximum value, respectively, of the first input processed; i.e.,
__call__(A)callsautoscale_None(A).- clipbool, default: False
If
Truevalues falling outside the range[vmin, vmax], are mapped to 0 or 1, whichever is closer, and masked values are set to 1. IfFalsemasked values remain masked.Clipping silently defeats the purpose of setting the over, under, and masked colors in a colormap, so it is likely to lead to surprises; therefore the default is
clip=False.
Notes
Returns 0 if
vmin == vmax.Methods Summary
__call__(values[, clip])Normalize value data in the
[vmin, vmax]interval into the[0.0, 1.0]interval and return it.inverse(values)Methods Documentation
-
__call__(values, clip=None)[source]¶ Normalize value data in the
[vmin, vmax]interval into the[0.0, 1.0]interval and return it.- Parameters
- value
Data to normalize.
- clipbool
If
None, defaults toself.clip(which defaults toFalse).
Notes
If not already initialized,
self.vminandself.vmaxare initialized usingself.autoscale_None(value).