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 `detector` attribute in `EBSD` signals from NORDIF calibration patter reader #569

Closed hakonanes closed 1 year ago

hakonanes commented 1 year ago

Description of the change

This PR makes sure the EBSD.detector attribute in signals returned from the NORDIF calibration pattern reader is an EBSDDetector with the correct shape and not just a dictionary to create a detector with, as is the case in 0.6.1. It is a minor bug, so I consider it unnecessary to make a patch release.

Other things:

Progress of the PR

Minimal example of the bug fix or new feature

>>> import kikuchipy as kp
>>> s = kp.load("Setting.txt")

# Before

>>> s.detector
{'shape': (60, 60), 'sample_tilt': 70.0, 'tilt': 0.0, 'azimuthal': 0.0}

# Now

>>> s.detector
EBSDDetector (60, 60), px_size 1 um, binning 1, tilt 0.0, azimuthal 0.0, pc (0.5, 0.5, 0.5)

For reviewers