Skip to content

inconsistent grains from calcGrains(EBSD(ebsd)) and calcGrains(ebsd.gridify) #2295

@vtvivian

Description

@vtvivian

The current implementation of calcGrains produces different behaviour depending on whether ebsd isa @EBSDSquare/Hex vs @EBSD, which the user may not be expecting, esp if not keeping track of the EBSD map type.

It looks like because calcGrains calls spatialDecompositionAlpha for gridded EBSD data instead of spatialDecomposition (which doesn't use alpha shapes). Another related issue is that spatialDecompositionAlpha doesn't check for the 'unitcell' flag, so if you use gridified EBSD data it automatically goes to the voronoi method.

Can we change this so that alpha shapes are used only with an explicit flag?

What do you want to do?
reconstruct grains from ebsd map using calcGrains

What code do you use?
Please provide minimalist code with code in the following form

mtexdata twins
ebsd = ebsd.gridify;

grainsSquare = calcGrains(ebsd)
grainsScatter = calcGrains(EBSD(ebsd))


% plot a pole figure
plotPDF(ebsd,Miller(1,0,0,ebsd.CS)

What result do you get

grainsSquare = grain2d
 
 Phase  Grains  Pixels    Mineral  Symmetry  Crystal reference frame
     1     121   22833  Magnesium     6/mmm       X||a*, Y||b, Z||c*
 
 boundary segments: 3826 (1149 µm)
 inner boundary segments: 4 (1.2 µm)
 triple points: 114
 
 Properties: meanRotation, GOS
 
>> grainsScatter
 
grainsScatter = grain2d
 
 Phase  Grains  Pixels     Mineral  Symmetry  Crystal reference frame
     0       7      46  notIndexed                                   
     1     121   22833   Magnesium     6/mmm       X||a*, Y||b, Z||c*
 
 boundary segments: 4480 (1170 µm)
 inner boundary segments: 4 (1.2 µm)
 triple points: 125

What result do you expect
grainsScatter and grainsSquare should be identical

What MTEX version do you use?
MTEX 6.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions