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

Reader for EBSD patterns in EDAX TSL's binary UP1/2 files #570

Closed hakonanes closed 1 year ago

hakonanes commented 1 year ago

Description of the change

Add reader for EBSD patterns in EDAX TSL's binary UP1/2 files, based on the reader in PyEBSDIndex written by @drowenhorst-nrl.

Closes #385.

Progress of the PR

Minimal example of the bug fix or new feature

>>> import kikuchipy as kp
>>> s = kp.load("data.up1")
>>> s
<EBSD, title: edax_binary, dimensions: (9|60, 60)>

# Supply navigation shape

>>> s = kp.load("data.up1", nav_shape=(3, 3))
>>> s
<EBSD, title: edax_binary, dimensions: (3, 3|60, 60)>

# Read patterns acquired in an hexagonal grid

>>> s = kp.load("data.up2")
/home/hakon/kode/kikuchipy/kikuchipy/io/plugins/edax_binary.py:154: UserWarning: Returned signal has one navigation dimension since an hexagonal grid is not supported
  warnings.warn(
>>> s
<EBSD, title: edax_binary, dimensions: (10|60, 60)>

For reviewers

hakonanes commented 1 year ago

@IMBalENce, you might find this reader useful in your lab.

IMBalENce commented 1 year ago

Thank you very much @hakonanes, I'll give it a test if I have any questions.

hakonanes commented 1 year ago

That would be great, thanks! I haven't found many EDAX UP1/2 files available on the internet, so I've only tested the reader on a couple of datasets, one of them a hexagonal grid UP2 file you sent me last summer (thanks again!).