rescale_intensity#
- kikuchipy.pattern.rescale_intensity(pattern: ndarray, in_range: tuple[int | float, ...] | None = None, out_range: tuple[int | float, ...] | None = None, dtype_out: str | dtype | type | None = None, percentiles: tuple[int, int] | tuple[float, float] | None = 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.