-
Notifications
You must be signed in to change notification settings - Fork 30
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
Use HyperSpy's map() to reduce time and memory use in some EBSD processing methods #527
Merged
hakonanes
merged 27 commits into
pyxem:develop
from
hakonanes:use-hs-map-static-background-corr
May 25, 2022
Merged
Use HyperSpy's map() to reduce time and memory use in some EBSD processing methods #527
hakonanes
merged 27 commits into
pyxem:develop
from
hakonanes:use-hs-map-static-background-corr
May 25, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>
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>
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>
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>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
hakonanes
added
enhancement
New feature or request
documentation
This relates to the documentation
maintenance
This relates to package maintenance
📋 tests
labels
May 25, 2022
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>
This was referenced May 25, 2022
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
documentation
This relates to the documentation
enhancement
New feature or request
maintenance
This relates to package maintenance
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
This PR introduces many internal changes and some external ones.
The improved
map()
method in HyperSpy v1.7 is used in some EBSD processing methods, reducing memory use and the processing time! HyperSpy's minimal version is set to 1.7. Themap()
method does not print a progressbar even though we ask for one (see hyperspy/hyperspy#2947), so for now we add this manually. This leads to two bars for some reason, but two are better than none.The above changes made the following
kikuchipy.pattern.chunk
functions unnecessary, and have hence been removed from the API (in v0.6):remove_static_background()
,remove_dynamic_background()
,get_image_quality()
.The
EBSD.remove_static_background()
parameterrelative
, to maintain relative intensities between patterns during background removal, has been removed. It can still be passed, but a deprecation warning is raised if it is. Passing it after v0.7 is released will raise an error. This was done because the (bad) implementation required that all patterns had to be queried for the minimum and maximum intensity value before background removal, effectively touching every pattern chunk twice. Dask could for some reason handle this well previously, but not later versions (don't know exactly which versions), and lead to large memory use for large datasets. I deem keeping relative intensities between patterns an unimportant feature in kikuchipy, and hence have dropped the functionality entirely in one go.I've added formatting of notebooks using
black
's Jupyter notebook extension (thanks to @harripj for mentioning it in orix!). This is also added to the CI workflow code style check.FFTs are computed using functions from
scipy.fft
instead ofnumpy.fft
.Progress of the PR
Minimal example of the bug fix or new feature
These operations are faster since they use
hyperspy.signals.BaseSignal.map()
:For reviewers
__init__.py
.section in
CHANGELOG.rst
.