pyxem / kikuchipy

Toolbox for analysis of electron backscatter diffraction (EBSD) patterns
https://kikuchipy.org
GNU General Public License v3.0
78 stars 30 forks source link

Incorrect detector shape for downsampled signal #668

Closed hakonanes closed 1 month ago

hakonanes commented 1 month ago

The detector attached to a downsampled EBSD signal is incorrectly set

>>> import numpy as np
>>> import kikuchipy as kp
>>> s = kp.signals.EBSD(np.ones((60, 50)))
>>> s.detector.shape
(60, 50)
>>> s.downsample(2, show_progressbar=False)
>>> s
<EBSD, title: , dimensions: (|25, 30)>
>>> s.detector.shape
(25, 30)

The reason is that we don't flip the shape obtained from EBSD.axes_manager.signal_shape in EBSD.downsample().

I'm fixing this in a small minor release 0.10.0.