- class craftutils.observation.image.ImageNormalize(matplotlib.colors.Normalize)
Normalization class to be used with Matplotlib.
Parameters¶
- datandarray, 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~astropy.visualization.BaseInterval subclass 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~astropy.visualization.BaseStretch subclass instance
The stretch object to apply to the data. The default is ~astropy.visualization.LinearStretch.
- clipbool, optional
If True, data values outside the [0:1] range are clipped to the [0:1] range.
- invalidNone or float, optional
Value to assign NaN values generated by this class. NaNs in the input
dataarray are not changed. For matplotlib normalization, theinvalidvalue should map to the matplotlib colormap “under” value (i.e., any finite value < 0). If None, then NaN values are not replaced. This keyword has no effect ifclip=True.
Public members¶
- ImageNormalize(data=None, interval=None, vmin=None, vmax=None, ...)
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).
-
__call__(values, clip=
None, invalid=None) Transform values using this normalization.
-
inverse(values, invalid=
None)
- static process_value(value)
Homogenize the input value for easy and efficient normalization.
- autoscale(A)
Set vmin, vmax to min, max of A.
- autoscale_None(A)
If vmin or vmax are not set, use the min/max of A to set them.
- scaled()
Return whether vmin and vmax are set.
Properties¶
- property vmin
- property vmax
- property clip