pyxem / kikuchipy

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

New string representation for EBSDDetector #673

Closed hakonanes closed 4 months ago

hakonanes commented 4 months ago

Currently, the sample tilt is not shown in the EBSDDetector string representation:

>>> import kikuchipy as kp
>>> kp.detectors.EBSDDetector((60, 80), pc=[0.1, 0.2, 0.3], tilt=5.8, sample_tilt=0.)
EBSDDetector (60, 80), px_size 1 um, binning 1, tilt 5.8, azimuthal 0, pc (0.1, 0.2, 0.3)

The sample tilt is very important! It should therefore be part of the string representation.

I suggest a new string representation along the lines of:

EBSDDetector(shape=(60, 80), sample_tilt=0., tilt=5.8, pc=(0.1, 0.2, 0.3), azimuthal=0, binning=1, px_size=1)

The attributes are given according to importance (according to my experience).