rescale_intensity#
- kikuchipy.pattern.rescale_intensity(pattern: ndarray, in_range: Optional[Tuple[Union[int, float], ...]] = None, out_range: Optional[Tuple[Union[int, float], ...]] = None, dtype_out: Optional[Union[str, dtype, type]] = None, percentiles: Union[None, Tuple[int, int], Tuple[float, float]] = None) ndarray [source]#
Rescale intensities in an EBSD pattern.
Pattern max./min. intensity is determined from out_range or the data type range of
numpy.dtype
passed to dtype_out.This method is based on
skimage.exposure.rescale_intensity()
.- Parameters:
- pattern
EBSD pattern.
- in_range
Min./max. intensity values of the input pattern. If not given, it is set to the pattern’s min./max intensity.
- out_range
Min./max. intensity values of the rescaled pattern. If not given, it is set to
dtype_out
min./max according toskimage.util.dtype.dtype_range
.- dtype_out
Data type of the rescaled pattern. If not given, it is set to the same data type as the input pattern.
- percentiles
Disregard intensities outside these percentiles. Calculated per pattern. Will overwrite
in_range
if given.
- Returns:
rescaled_pattern
Rescaled pattern.