pyxem / kikuchipy

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

Fix default EBSD.detector attribute shape when detector is not passed upon initialization #603

Closed hakonanes closed 1 year ago

hakonanes commented 1 year ago

Description of the change

Fix default EBSD.detector attribute shape when detector is not passed upon initialization.

Progress of the PR

Minimal example of the bug fix or new feature

>>> import numpy as np
>>> import kikuchipy as kp
>>> s = kp.signals.EBSD(np.ones((1, 2, 3, 4))
>>> s.detector.shape
(3, 4)  # (4, 3) before this fix (ouch!)

For reviewers