orix icon indicating copy to clipboard operation
orix copied to clipboard

Compute orientation similarity map from the n best near matches per map pixel

Open hakonanes opened this issue 4 years ago • 11 comments

EMsoft provides the orientation similarity metric (OSM). From their wiki:

[...] a map for which the intensity in each pixel measures how many of the top N matches that pixel has in common with its nearest neighbors. For a well annealed material, neighbouring pixels have very similar top match lists, so the OSM value will be high; near grain boundaries, one or more of the neighbors will have a completely different top match list, so the OSM value will be substantially smaller. As a result, Orientation Similarity maps generally show a clear outline of the microstructural components (grains, phases, voids, etc.).

This should be implemented as a method in the CrystalMap class, I think.

EMsoft implementation: EBSDgetOrientationSimilarityMap (https://github.com/EMsoft-org/EMsoft/blob/f5e6c8a5cb186478f5d34597708d4962f245a794/Source/EMsoftHDFLib/commonmod.f90#L335).

I think it should be implemented as two tools, the second using the first:

  1. Compare the best n matches for one map position
  2. Compare the best n in one map position to the best n matches in the four nearest neighbours, or whatever number of neighbours you want

hakonanes avatar Mar 21 '20 15:03 hakonanes

Do you have a reference to the paper in which they described this? I only ask because I'm pretty sure I've read it but I can't find it right now...

dnjohnstone avatar Mar 21 '20 15:03 dnjohnstone

Of course: Marquardt, Katharina, De Graef, Marc, Singh, Saransh, Marquardt, Hauke, Rosenthal, Anja, Koizuimi, Sanae: Quantitative electron backscatter diffraction (EBSD) data analyses using the dictionary indexing (DI) approach: Overcoming indexing difficulties on geological materials , American Mineralogist 102(9), 1843–1855, 2017. DOI: https://doi.org/10.2138/am-2017-6062

hakonanes avatar Mar 21 '20 15:03 hakonanes

Ok right - I was running a microscope with Katharina last week... probably should have known that...

dnjohnstone avatar Mar 21 '20 16:03 dnjohnstone

Wow, there you go! I'm a big fan of that paper.

hakonanes avatar Mar 21 '20 16:03 hakonanes

I think that this remains on the roadmap with relatively high priority, but I also think there are enough other items in the 0.5.0 milestone that are higher priority, therefore assigning to v0.6.0

dnjohnstone avatar Aug 20 '20 15:08 dnjohnstone

Yeah, we want this for assessing pattern comparisons in kikuchipy. But not immediately, so happy to wait.

hakonanes avatar Aug 20 '20 17:08 hakonanes

The kikuchipy PR https://github.com/pyxem/kikuchipy/pull/234 contains calculation of the orientation similarity map from a 3D map with 2D navigation shape and n number of indices per navigation point, the indices pointing to triplets of Euler angles in a 1D Euler angle array.

It was decided (off GitHub yesterday) that this code would be merged into kikuchipy in the kikuchipy.indexing module for now, but should be considered ported to orix.crystal_map.CrystalMap in the future.

hakonanes avatar Oct 24 '20 10:10 hakonanes

To confirm, I think we will eventually want CrystalMap to do this.

pc494 avatar Oct 26 '20 10:10 pc494

To confirm, I think we will eventually want CrystalMap to do this.

Agree

dnjohnstone avatar Nov 22 '20 18:11 dnjohnstone

To confirm, I think we will eventually want CrystalMap to do this.

Agree

this is implemented in kikuchipy (kikuchipy.indexing.orientation_similarity_map) by @onatlandsmyr. either i or him and i will move it to orix after we have released a v0.3 of kikuchipy in december.

hakonanes avatar Nov 22 '20 19:11 hakonanes

We have computation of orientation similarity from indices into a simulation dictionary (as used by e.g. EMsoft) in kikuchipy: https://github.com/pyxem/kikuchipy/blob/master/kikuchipy/indexing/orientation_similarity_map.py. The plan is to move that functionality into a CrystalMap.add_orientation_similarity() method (or called something similar) for v0.7.

hakonanes avatar May 06 '21 11:05 hakonanes