add#

PhaseList.add(value: Phase | list[Phase] | PhaseList) None[source]#

Add phases to the end of a phase list in-place, incrementing the phase IDs.

Parameters:
value

Phase(s) to add. If a PhaseList is added, the phase IDs in the old list are lost.

Examples

>>> from orix.crystal_map import Phase, PhaseList
>>> pl = PhaseList(names=["a", "b"], space_groups=[10, 20])
>>> pl.add(Phase("c", space_group=30))
>>> pl.add([Phase("d", space_group=40), Phase("e")])
>>> pl.add(PhaseList(names=["f", "g"], space_groups=[60, 70]))
>>> pl
Id  Name  Space group  Point group  Proper point group       Color
 0     a         P2/m          2/m                 112    tab:blue
 1     b        C2221          222                 222  tab:orange
 2     c         Pnc2          mm2                 211   tab:green
 3     d         Ama2          mm2                 211     tab:red
 4     e         None         None                None  tab:purple
 5     f         Pbcn          mmm                 222   tab:brown
 6     g         Fddd          mmm                 222    tab:pink