Here is the original:
https://github.com/mtex-toolbox/mtex/blob/develop/EBSDAnalysis/%40EBSD/calcGrains.m
and here is the MTEX page dercibing how to use that function:
https://mtex-toolbox.github.io/EBSD.calcGrains.html
We need a pythonic function that takes in an orix crystalmap structure and outputs a map of the grains.
This output COULD be the same style as the matlab one, but probably the easier solution is to just make it output a numpy integer map, with hte integr corresponding to the grain number
Also, stuff like this already exists in scipy for pulling objects out of images. if you can do that, but with orientations (NOT IPF COLORING), that would be a perfectly adequate (and probably superior) solution.
Here is the original:
https://github.com/mtex-toolbox/mtex/blob/develop/EBSDAnalysis/%40EBSD/calcGrains.m
and here is the MTEX page dercibing how to use that function:
https://mtex-toolbox.github.io/EBSD.calcGrains.html
We need a pythonic function that takes in an orix crystalmap structure and outputs a map of the grains.
This output COULD be the same style as the matlab one, but probably the easier solution is to just make it output a numpy integer map, with hte integr corresponding to the grain number
Also, stuff like this already exists in scipy for pulling objects out of images. if you can do that, but with orientations (NOT IPF COLORING), that would be a perfectly adequate (and probably superior) solution.