scale_image¶
-
astropy.visualization.scale_image(*args, **kwargs)[source] [edit on github]¶ Deprecated since version 1.3: The scale_image function is deprecated and may be removed in a future version. Use
simple_norminstead.Perform scaling/stretching of an image between minimum and maximum cut levels.
Parameters: image : array-like
The array of values.
scale : {{‘linear’, ‘sqrt’, ‘power’, log’, ‘asinh’}}
The scaling/stretch function to apply to the image. The default is ‘linear’.
power : float, optional
The power index for
scale='power'image scaling. The default is 1.0.asinh_a : float, optional
For
scale='asinh'image scaling, 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.min_cut : float, optional
The pixel value of the minimum cut level. Data values less than
min_cutwill set tomin_cutbefore scaling 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 scaling 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
Whether to clip the result to the range [0:1].
Returns: image : ndarray
The array of the scaled/stretched image with a minimum of 0.0 and a maximum of 1.0.