normalize_intensity#
- kikuchipy.pattern.normalize_intensity(pattern: ndarray, num_std: int = 1, divide_by_square_root: bool = False, dtype_out: Optional[type] = None) ndarray [source]#
Normalize image intensities to a mean of zero and a given standard deviation.
Data type is preserved.
- Parameters:
- pattern
EBSD pattern.
- num_std
Number of standard deviations of the output intensities (default is
1
).- divide_by_square_root
Whether to divide output intensities by the square root of the image size (default is
False
).- dtype_out
Data type of the normalized pattern. If not given, it is set to the same data type as the input pattern.
- Returns:
normalized_pattern
Normalized pattern.
Notes
Data type should always be changed to floating point, e.g.
float32
withnumpy.ndarray.astype()
, before normalizing the intensities.