Exemplo n.º 1
0
 def load_phases(self, filename, insert_index=None):
     """
     Loads all :class:`~pyxrd.phase.models.Phase` objects from the file
     'filename'. An optional index can be given where the phases need to be
     inserted at.
     """
     insert_index = not_none(insert_index, 0)
     for phase in Phase.load_phases(filename, parent=self):
         self.phases.insert(insert_index, phase)
         insert_index += 1