DefDAP icon indicating copy to clipboard operation
DefDAP copied to clipboard

Matching DIC and EBSD after finding grains in a DIC map

Open mikesmic opened this issue 7 years ago • 1 comments

The process of matching grains in a DIC to EBSD map needs to be made more robust or some error handling added so the process does not completely fail if match is not found. A typical error that can occur (noted by @dtfullwood, thank you):


IndexError Traceback (most recent call last) in () 66 ### Detect grains in the DIC map 67 ---> 68 DicMap.findGrains(minGrainSize=100) 69 DicMap.buildNeighbourNetwork() 70 # **************************************************

~/Documents/GitHub/DefDAP/defdap/hrdic.py in findGrains(self, minGrainSize) 743 modeId, _ = mode(self.ebsdMap.grains[warpedDicGrains == i + 1]) 744 --> 745 self.ebsdGrainIds.append(modeId[0] - 1) 746 self.grainList[i].ebsdGrainId = modeId[0] - 1 747 self.grainList[i].ebsdGrain = self.ebsdMap.grainList[modeId[0] - 1]

IndexError: index 0 is out of bounds for axis 0 with size 0

mikesmic avatar Jan 18 '19 13:01 mikesmic

The DIC min grain size should correspond approximately to the EBSD min grain size. There should be a check of this. The EBSD step size is taken from the file and the DIC step size is defined manually, so should be easy to check.

rhysgt avatar Feb 07 '20 11:02 rhysgt