Attempt to crop and update EBSD class attributes xmap (an orixCrystalMap), static_background and detector (an EBSDDetector) upon calls to the following inherited methods from HyperSpy'sSignal2D methods:
inav (crop xmap and EBSDDetector.pc)
isig (crop EBSDDetector.shape and static_background)
crop() (crop attributes)
crop_image() (crop EBSDDetector.shape and static_background)
rebin() (if nav dimensions change, the xmap and EBSDDetector.pc values are lost; if only sig dimensions change, EBSDDetector.pc values are lost while the static_background is binned similarly to the signal)
Handling of attributes in inav and isig is done by overwriting the private BaseSignal._slicer() method. This is dangerous, however most handling is done via try/except, falling back to old behavior if this doesn't work. Tests, my own testing and building the docs' tutorials and examples runs as desired.
Other changes:
Added crystal map and refined PC values to the nickel_ebsd_small() dataset HDF5 file. Indexing and PC refinement was done first with PyEBSDIndex, then using refine_orientation_projection_center().
Improved handling of detector PC values in the kikuchipy h5ebsd file reader
Description of the change
Attempt to crop and update
EBSD
class attributesxmap
(an orixCrystalMap
),static_background
anddetector
(anEBSDDetector
) upon calls to the following inherited methods from HyperSpy'sSignal2D
methods:inav
(cropxmap
andEBSDDetector.pc
)isig
(cropEBSDDetector.shape
andstatic_background
)crop()
(crop attributes)crop_image()
(cropEBSDDetector.shape
andstatic_background
)rebin()
(if nav dimensions change, thexmap
andEBSDDetector.pc
values are lost; if only sig dimensions change,EBSDDetector.pc
values are lost while thestatic_background
is binned similarly to the signal)Handling of attributes in
inav
andisig
is done by overwriting the privateBaseSignal._slicer()
method. This is dangerous, however most handling is done via try/except, falling back to old behavior if this doesn't work. Tests, my own testing and building the docs' tutorials and examples runs as desired.Other changes:
nickel_ebsd_small()
dataset HDF5 file. Indexing and PC refinement was done first with PyEBSDIndex, then usingrefine_orientation_projection_center()
.Closes #227.
Progress of the PR
rebin()
Minimal example of the bug fix or new feature
For reviewers
__init__.py
.CHANGELOG.rst
.release.py
,.zenodo.json
and.all-contributorsrc
with the table regenerated.