Matching DIC and EBSD after finding grains in a DIC map
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)
~/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
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.