Draft
Conversation
Co-Authored-By: Håkon Wiik Ånes <hwaanes@gmail.com>
Post release 0.14.0
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Added Elasticipy project description to related projects.
updates: - [github.com/psf/black-pre-commit-mirror: 25.12.0 → 26.1.0](psf/black-pre-commit-mirror@25.12.0...26.1.0) - [github.com/pycqa/isort: 7.0.0 → 8.0.0](PyCQA/isort@7.0.0...8.0.0)
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
…ed-release-workflow Add manual trigger to build creating a tagged release
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
… later Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
[pre-commit.ci] pre-commit autoupdate
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Post release 0.14.2 update
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
for more information, see https://pre-commit.ci
Add Elasticipy to related projects list
updates: - [github.com/pycqa/isort: 8.0.0 → 8.0.1](PyCQA/isort@8.0.0...8.0.1)
[pre-commit.ci] pre-commit autoupdate
updates: - [github.com/psf/black-pre-commit-mirror: 26.1.0 → 26.3.0](psf/black-pre-commit-mirror@26.1.0...26.3.0)
[pre-commit.ci] pre-commit autoupdate
updates: - [github.com/psf/black-pre-commit-mirror: 26.3.0 → 26.3.1](psf/black-pre-commit-mirror@26.3.0...26.3.1)
[pre-commit.ci] pre-commit autoupdate
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Member
|
Thank you @Tagebh, the functionality in your comment will be very useful to have in orix! When adding your own commits, can you use the develop branch as the target branch here in the orix repo? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
I am currently working on hybrid indexing as part of my master at NTNU, and I also wrote a project thesis on hybrid indexing in the autumn of last year, where I used the hybrid indexing tutorial made på Håkon as a starting point. As part of this work I have made a Kernel Average Misorientation (KAM) tool based on the code from @argerlt in issue #531.
Progress of the PR
I have structured the code so it has the potential to be used for many things involving neighbors (not only KAM).
The Neighbors() function performs the general preperations to do neighbor-based calculations on a xmap or any 2d array really, and can be used on it's own to do whatever you want with neighbors.
The neighbor_misorientation() and KAM_calc() then uses Neighbors() to make a KAM map.
I have also included a slight variation of KAM which I am calling Number of Same Neighbors, which also uses the results from Neighbors() and neighbor_misorientation() but does a slightly different calculation. A user defines what degree of misorientation that counts as a "different" orientation, and then it counts how many neighbors has the same orientation as a central point, where each point in the dataset acts as a central point once.
Here is the functions as .py file
_neighbors.py
The reulting KAM and NDN (Number of different neigbors (NDN) = total neighbors - NSN) map using a 3x3 binary kernel (8 neighbors with equal weighting) could look something like this (using one of the nickel datasets already in kikuchipy):
I have also made a small jupyter notebook that I used to test the functions
test_neighbors.ipynb
Here is an example from that notebook where the amount of equal colored neighbors is counted in a small dummy dataset
The output with a 3x3 binary footprint

The output when the footprint is 3x3 and not binary (0.5 in the corners)

I do not have any experience with git hub, so I do not really know how to impliment it, but I hope this seems usefull and that someone wants to pick it up.
Kind regards
Tage
For reviewers
__init__.py.section in
CHANGELOG.rst.__credits__inorix/__init__.pyand in.zenodo.json.