Exemplo n.º 1
0
 def tst_kabsch_w_gain(self):
     from dials.algorithms.image.threshold import kabsch_w_gain
     nsig_b = 3
     nsig_s = 3
     result = kabsch_w_gain(self.image, self.mask, self.gain, self.size,
                            nsig_b, nsig_s, self.min_count)
     print 'OK'
Exemplo n.º 2
0
    def tst_kabsch_w_gain(self):
        from dials.algorithms.image.threshold import kabsch_w_gain

        nsig_b = 3
        nsig_s = 3
        result = kabsch_w_gain(self.image, self.mask, self.gain, self.size, nsig_b, nsig_s, self.min_count)
        print "OK"
Exemplo n.º 3
0
    def tst_dispersion_threshold(self):
        from dials.algorithms.image.threshold import kabsch, kabsch_w_gain
        from dials.algorithms.image.threshold import DispersionThreshold
        from dials.array_family import flex

        nsig_b = 3
        nsig_s = 3
        algorithm = DispersionThreshold(self.image.all(), self.size, nsig_b, nsig_s, 0, self.min_count)

        result1 = kabsch(self.image, self.mask, self.size, nsig_b, nsig_s, self.min_count)

        result2 = kabsch_w_gain(self.image, self.mask, self.gain, self.size, nsig_b, nsig_s, self.min_count)

        result3 = flex.bool(flex.grid(self.image.all()))
        result4 = flex.bool(flex.grid(self.image.all()))
        algorithm(self.image, self.mask, result3)
        algorithm(self.image, self.mask, self.gain, result4)
        assert result1 == result3
        assert result2 == result4

        print "OK"
Exemplo n.º 4
0
  def tst_dispersion_threshold(self):
    from dials.algorithms.image.threshold import kabsch, kabsch_w_gain
    from dials.algorithms.image.threshold import DispersionThreshold
    from dials.array_family import flex
    nsig_b = 3
    nsig_s = 3
    algorithm = DispersionThreshold(
      self.image.all(),
      self.size,
      nsig_b,
      nsig_s,
      0,
      self.min_count)

    result1 = kabsch(
      self.image,
      self.mask,
      self.size,
      nsig_b,
      nsig_s,
      self.min_count)

    result2 = kabsch_w_gain(
      self.image,
      self.mask,
      self.gain,
      self.size,
      nsig_b,
      nsig_s,
      self.min_count)

    result3 = flex.bool(flex.grid(self.image.all()))
    result4 = flex.bool(flex.grid(self.image.all()))
    algorithm(self.image, self.mask, result3)
    algorithm(self.image, self.mask, self.gain, result4)
    assert(result1 == result3)
    assert(result2 == result4)

    print 'OK'