phase_from_crystal#

de_ebsd.index.io.phase_from_crystal(crystal)[source]#

Bridge a de_ebsd Crystal to an orix Phase.

The returned orix.crystal_map.Phase is what gives a CrystalMap its crystal symmetry: orix derives the point group (hence the symmetry operations used for disorientation, IPF coloring, fundamental-zone reduction, …) from the space-group number. The lattice + space group is therefore the load-bearing part; the atom sites are added for completeness when present.

Parameters:
crystal

A de_ebsd.sim.Crystal. Its space_group (int), lattice (a, b, c in nm and alpha, beta, gamma in degrees) and asymmetric unit (sites) are read off.

Returns:
orix.crystal_map.Phase

A phase carrying the space group (and the point group orix derives from it) plus a diffpy Structure with the lattice and the asymmetric-unit atoms.

Notes

The Crystal.origin setting (origin choice 1 vs 2 for the two-origin space groups) shifts the atom positions but not the point group, so it does not change the symmetry the CrystalMap carries; it is recorded on the diffpy lattice only through the fractional coordinates already stored on the crystal. Lattice lengths are passed through in nm (the crystal’s own unit).