Phase#

class orix.crystal_map.Phase(name: = None, space_group: = None, point_group: = None, structure: = None, color: = None)[source]#

Bases: object

Name, symmetry, and color of a phase in a crystallographic map.

Parameters:
name

Phase name. Overwrites the name in the structure object.

space_group

Space group describing the symmetry operations resulting from associating the point group with a Bravais lattice, according to the International Tables of Crystallography. If not given, it is set to None.

point_group

Point group describing the symmetry operations of the phase’s crystal structure, according to the International Tables of Crystallography. If not given and space_group is not given, it set to None. If None is passed but space_group is not None, it is derived from the space group. If both point_group and space_group is not None, the space group needs to be derived from the point group.

structure

Unit cell with atoms and a lattice. If not given, a default Structure object is created.

color

Phase color. If not given, it is set to "tab:blue" (first among the default Matplotlib colors).

Examples

>>> from diffpy.structure import Atom, Lattice, Structure
>>> from orix.crystal_map import Phase
>>> p = Phase(
...     name="al",
...     space_group=225,
...     structure=Structure(
...         atoms=[Atom("al", [0, 0, 0])],
...         lattice=Lattice(0.405, 0.405, 0.405, 90, 90, 90)
...     )
... )
>>> p
<name: al. space group: Fm-3m. point group: m-3m. proper point group: 432. color: tab:blue>
>>> p.structure
[al   0.000000 0.000000 0.000000 1.0000]
>>> p.structure.lattice
Lattice(a=0.405, b=0.405, c=0.405, alpha=90, beta=90, gamma=90)


Attributes

 Phase.a_axis Return the direct lattice vector $$a$$ in the cartesian reference frame of the crystal lattice $$e_i$$. Phase.ar_axis Return the reciprocal lattice vector $$a^{*}$$ in the cartesian reference frame of the crystal lattice $$e_i$$. Phase.b_axis Return the direct lattice vector $$b$$ in the cartesian reference frame of the crystal lattice $$e_i$$. Phase.br_axis Return the reciprocal lattice vector $$b^{*}$$ in the cartesian reference frame of the crystal lattice $$e_i$$. Phase.c_axis Return the direct lattice vector $$c$$ in the cartesian reference frame of the crystal lattice $$e_i$$. Phase.color Return or set the name of phase color. Phase.color_rgb Return the phase color as RGB tuple. Phase.cr_axis Return the reciprocal lattice vector $$c^{*}$$ in the cartesian reference frame of the crystal lattice $$e_i$$. Phase.is_hexagonal Return whether the crystal structure is hexagonal/trigonal or not. Phase.name Return or set the phase name. Phase.point_group Return or set the point group. Phase.space_group Return or set the space group. Phase.structure Return or set the crystal structure containing a lattice (Lattice) and possibly many atoms (Atom).

Methods

 Return a deep copy using deepcopy() function. Phase.from_cif(filename) Return a new phase from a CIF file using diffpy.structure's CIF file parser.

Examples using Phase#

Select and modify data

Select and modify data

Misorientation from aligning directions

Misorientation from aligning directions

Orientation from aligning directions

Orientation from aligning directions

Rotating z-vector to high-symmetry crystal directions

Rotating z-vector to high-symmetry crystal directions

Restrict to fundamental sector

Restrict to fundamental sector