Ejemplo 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 = Disperser(self.model, ["cyl_phi", "cyl_theta"], [sigma, sigma])
     val_c = d.run([q, phi])
     self.assertEqual(val_py, val_c)
Ejemplo n.º 2
0
 def testNoDisp(self):
     """ Test 1D model for a sphere """
     q = 0.005
     d = Disperser(self.model, [], [])
     value = d.run([q, 0])
     self.assertEqual(value, self.model.run([q, 0]))