Ejemplo n.º 1
0
  def absence_detected(self,hkllist):
    self.hkl = hkllist
    self.N   = self.hkl.size()
    self.flag = None

    for test in R:
        cum = cpp_absence_test(self.hkl,test['mod'],test['vec'])
        for counter in xrange(test['mod']):
          #print test['vec'],test['mod'],float(cum[counter])/self.N
          if float(cum[counter])/self.N > 0.8 and counter==0:
            # (if counter != 0 there is no obvious way to correct this)
            #print "Detected exclusive presence of %dH %dK %dL = %dn, remainder %d"%(
            #         test['vec'][0],test['vec'][1],test['vec'][2],test['mod'],counter)
            self.flag = {'vec':test['vec'],'mod':test['mod'],
                         'remainder':counter, 'trans':test['trans'].elems}
            return 1
    return 0
Ejemplo n.º 2
0
Archivo: tools.py Proyecto: dials/cctbx
    def absence_detected(self, hkllist):
        self.hkl = hkllist
        self.N = self.hkl.size()
        self.flag = None

        for test in R:
            cum = cpp_absence_test(self.hkl, test['mod'], test['vec'])
            for counter in range(test['mod']):
                #print test['vec'],test['mod'],float(cum[counter])/self.N
                if float(cum[counter]) / self.N > 0.8 and counter == 0:
                    # (if counter != 0 there is no obvious way to correct this)
                    #print "Detected exclusive presence of %dH %dK %dL = %dn, remainder %d"%(
                    #         test['vec'][0],test['vec'][1],test['vec'][2],test['mod'],counter)
                    self.flag = {
                        'vec': test['vec'],
                        'mod': test['mod'],
                        'remainder': counter,
                        'trans': test['trans'].elems
                    }
                    return 1
        return 0