示例#1
0
 def symmetryFactor(self):
     """
     :return: the symmetry factor used in the normalization of structure
              factors or intensities. It is equal to the number of
              space group symmetry operations that map a reflection
              to itself.
     :rtype: int
     """
     sg = self.crystal.space_group
     equivalents = sg.symmetryEquivalentMillerIndices(self.array)[0]
     return N.int_sum(N.alltrue(N.array(equivalents) == self.array, axis=1))
示例#2
0
 def isCentric(self, _equivalents=None):
     """
     :return: True if the reflection is centric (i.e. equivalent to
              the reflection (-h, -k, -l) by space group symmetry
              operations)
     :rtype: bool
     """
     sg = self.crystal.space_group
     if _equivalents is None:
         _equivalents = sg.symmetryEquivalentMillerIndices(self.array)[0]
     return N.int_sum(N.alltrue(N.array(_equivalents) == -self.array,
                                axis=1)) > 0