Beispiel #1
0
    def test_dimer_constrained(self):
        hard_radius = 1.
        constraints = dimer(2*np.array(self.size)*hard_radius, self.ndim)

        devs = self.refine_cluster(2, hard_radius=hard_radius, noise=0,
                                   param_mode=dict(signal='var',
                                                   size='const'),
                                   signal_dev=self.signal_dev, size_dev=0,
                                   constraints=constraints)
        self.assertLess(devs['parr_mean'], self.accuracy_constrained * max(self.size))
        self.assertLess(devs['perp_rms'], self.precision_perfect)
Beispiel #2
0
    def test_dimer_constrained(self):
        hard_radius = 1.
        constraints = dimer(2*np.array(self.size)*hard_radius, self.ndim)

        devs = self.refine_cluster(2, hard_radius=hard_radius, noise=0,
                                   param_mode=dict(signal='var',
                                                   size='const'),
                                   signal_dev=self.signal_dev, size_dev=0,
                                   constraints=constraints)
        self.assertLess(devs['parr_mean'], self.accuracy_constrained * max(self.size))
        self.assertLess(devs['perp_rms'], self.precision_perfect)