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 interval is also input. data and interval are used to compute the vmin and/or vmax values only if vmin or vmax are not input.

interval~astropy.visualization.BaseInterval subclass instance, optional

The interval object to apply to the input data to determine the vmin and vmax values. This input is used only if data is also input. data and interval are used to compute the vmin and/or vmax values only if vmin or vmax are not input.

vmin, vmaxfloat, optional

The minimum and maximum levels to show for the data. The vmin and vmax inputs override any calculated values from the interval and data inputs.

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 data array are not changed. For matplotlib normalization, the invalid value 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 if clip=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) calls autoscale_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