Add EBSD.static_background property storing static background pattern #475
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
Part of the effort to remove custom metadata from
EBSD.metadata
(#466).EBSD.static_background
property that is None by default, unless a static background could be successfully read from file. This is only the case for Bruker and kikuchipy h5ebsd files and the NORDIF binary file (when background pattern is stored in the same directory as Pattern.dat with the standard name as .bmp file). The property is settable, and a warning (not an error) is raised if the NumPy or Dask array's shape or data type is different from the signal's shape or data type.xmap
,detector
andstatic_background
EBSD
properties aren't updated whenever a HyperSpy inherited method that changes the pattern shape and/or data type is called (likeinav
,isig
,rebin
etc.). This addresses issues raised in EBSD.xmap property needs vast improvements #227 and Rethinking the EBSD.detector attribute #277 by letting it be up to the user to update the properties...Progress of the PR
Minimal example of the bug fix or new feature
For reviewers
__init__.py
.section in
CHANGELOG.rst
.