Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greatly improve reading of EBSD patterns from Oxford Instruments' binary .ebsp file format #391

Merged
merged 6 commits into from
Jul 7, 2021

Conversation

hakonanes
Copy link
Member

@hakonanes hakonanes commented Jul 7, 2021

Signed-off-by: Håkon Wiik Ånes hwaanes@gmail.com

Description of the change

This PR greatly improves reading of EBSD patterns from Oxford Instruments' binary .ebsp file format.

With this addition, kikuchipy should be able to read .ebsp files with these contents:

  • Pattern bit depth of either 8 (0-255) or 16 (0-65535) unsigned integers (determined from pattern header information).
  • Only non-indexed patterns are stored in the file (determined from non-zero "pattern starts" in the file header). In this case the navigation shape will always be 1D.

As long as beam positions are stored in the pattern footer information (not the case for all .ebsp file versions), the navigation/map shape is automatically determined. Otherwise, the navigation shape can be provided. The signal/detector shape is always available in the file (pattern header).

This reader will be released as part of v0.4. There will surely be some bugs that will need to be sorted out, which can be done in patch releases.

Progress of the PR

Minimal example of the bug fix or new feature

>>> import hyperspy.api as hs
>>> import kikuchipy as kp
>>> s = kp.load("patterns.ebsp")  # Can have uint8/uint16 patterns, or only non-indexed patterns
>>> iq = s.get_image_quality()
Calculating the image quality:
[########################################] | 100% Completed |  2.8s
>>> s.plot(navigator=hs.signals.BaseSignal(iq))

For reviewers

  • The PR title is short, concise, and will make sense 1 year later.
  • New functions are imported in corresponding __init__.py.
  • New features, API changes, and deprecations are mentioned in the
    unreleased section in doc/changelog.rst.

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes hakonanes added the enhancement New feature or request label Jul 7, 2021
@hakonanes hakonanes added this to the v0.4.0 milestone Jul 7, 2021
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes
Copy link
Member Author

This reader now works on files I received from @mikesmic, @CiosG (not the file with compressed patterns) and @IMBalENce, thanks a lot to you all!

I'll merge after checks pass, and then prepare a v0.4 release for tomorrow Thursday.

@hakonanes hakonanes merged commit d629c07 into pyxem:master Jul 7, 2021
@hakonanes hakonanes deleted the improve-oxford-binary-reader branch July 7, 2021 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant