to_crystal_map#

de_ebsd.index.io.to_crystal_map(rotations, quality, shape, phase, step=1.0)[source]#

Assemble indexed orientations + a quality metric into an orix CrystalMap.

Parameters:
rotationsorix.quaternion.Rotation

A flat orix Rotation of length rows * cols in row-major scan order (point (r, c) is at flat index r * cols + c), e.g. the concatenated output of SphericalIndexer.index() over the scan.

quality

A length-rows * cols real array or torch tensor of the per-point peak score, stored under prop["quality"] as a plain numpy array.

shapetuple of int

(rows, cols) of the scan.

phase

An orix.crystal_map.Phase, or a de_ebsd Crystal (converted via phase_from_crystal()). This carries the crystal symmetry of the returned map.

stepfloat, optional

Scan step size (same value for both axes). Default 1.0.

Returns:
orix.crystal_map.CrystalMap

A single-phase map: x = column index * step, y = row index * step following orix conventions, so xmap.plot()/get_map_data reshape to the correct (rows, cols) 2-D layout and xmap[r, c] selects the row-major flat index r * cols + c. Every point has phase_id == 0.

Notes

The scan is single-phase here (phase_id all zero). Multi-phase scans (a phase list plus a per-point phase assignment) are a future extension.