simple_norm¶
-
astropy.visualization.mpl_normalize.simple_norm(data, stretch='linear', power=1.0, asinh_a=0.1, min_cut=None, max_cut=None, min_percent=None, max_percent=None, percent=None, clip=True, log_a=1000)[source]¶ Return a Normalization class that can be used for displaying images with Matplotlib.
This function enables only a subset of image stretching functions available in
ImageNormalize.This function is used by the
astropy.visualization.scripts.fits2bitmapscript.Parameters: - data :
ndarray The image array.
- stretch : {‘linear’, ‘sqrt’, ‘power’, log’, ‘asinh’}, optional
The stretch function to apply to the image. The default is ‘linear’.
- power : float, optional
The power index for
stretch='power'. The default is 1.0.- log : float, optional
The log index for
stretch='log'. The default is 1000.- asinh_a : float, optional
For
stretch='asinh', the value where the asinh curve transitions from linear to logarithmic behavior, expressed as a fraction of the normalized image. Must be in the range between 0 and 1. The default is 0.1.- min_cut : float, optional
The pixel value of the minimum cut level. Data values less than
min_cutwill set tomin_cutbefore stretching the image. The default is the image minimum.min_cutoverridesmin_percent.- max_cut : float, optional
The pixel value of the maximum cut level. Data values greater than
min_cutwill set tomin_cutbefore stretching the image. The default is the image maximum.max_cutoverridesmax_percent.- min_percent : float, optional
The percentile value used to determine the pixel value of minimum cut level. The default is 0.0.
min_percentoverridespercent.- max_percent : float, optional
The percentile value used to determine the pixel value of maximum cut level. The default is 100.0.
max_percentoverridespercent.- percent : float, optional
The percentage of the image values used to determine the pixel values of the minimum and maximum cut levels. The lower cut level will set at the
(100 - percent) / 2percentile, while the upper cut level will be set at the(100 + percent) / 2percentile. The default is 100.0.percentis ignored if eithermin_percentormax_percentis input.- clip : bool, optional
If
True(default), data values outside the [0:1] range are clipped to the [0:1] range.
Returns: - result :
ImageNormalizeinstance An
ImageNormalizeinstance that can be used for displaying images with Matplotlib.
- data :