Esempio n. 1
0
    def test2Disp(self):
        q = 0.005
        phi = 0.10
        sigma = 0.3
        value_0 = self.model.run([q, phi])
        app = Smear(self.model, ['cyl_phi', 'cyl_theta'], [sigma, sigma])
        val_py = app.run([q, phi])

        # Check that the parameters were returned to original values
        self.assertEqual(value_0, self.model.run([q, phi]))
        d = DisperseModel(self.model, ["cyl_phi", "cyl_theta"], [sigma, sigma])
        val_c = d.run([q, phi])
        self.assertEqual(val_py, val_c)
Esempio n. 2
0
 def test2Disp(self):
     q = 0.005
     phi = 0.10
     sigma = 0.3
     value_0 = self.model.run([q, phi])
     app = Smear(self.model, ['cyl_phi', 'cyl_theta'], [sigma, sigma])
     val_py = app.run([q, phi])
     
     # Check that the parameters were returned to original values
     self.assertEqual(value_0, self.model.run([q, phi]))
     d = DisperseModel(self.model, ["cyl_phi", "cyl_theta"], [sigma, sigma])
     val_c = d.run([q, phi])
     self.assertEqual(val_py, val_c)