MechMicroMan / DefDAP

A python library for correlating EBSD and HRDIC data
Apache License 2.0
32 stars 13 forks source link

Matching DIC and EBSD after finding grains in a DIC map #15

Open mikesmic opened 5 years ago

mikesmic commented 5 years ago

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
rhysgt commented 4 years ago

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.