Ejemplo n.º 1
0
class TestBroadPeak(unittest.TestCase):
    """
    Unit tests for BroadPeak Model function
    """
    def setUp(self):
        from sas.models.BroadPeakModel import BroadPeakModel
        self.model = BroadPeakModel()

    def test1D(self):
        # the values are from Igor pro calculation
        # the different digits are due to precision of q values
        self.assertAlmostEqual(self.model.run(0.001), 10000.5, 1)
        self.assertAlmostEqual(self.model.run(0.1501412), 1.47557, 5)
        self.assertAlmostEqual(self.model.runXY(0.4425284), 0.134093, 6)
Ejemplo n.º 2
0
class TestBroadPeak(unittest.TestCase):
    """
    Unit tests for BroadPeak Model function
    """
    def setUp(self):
        from sas.models.BroadPeakModel import BroadPeakModel
        self.model= BroadPeakModel()
        
    def test1D(self):        
        # the values are from Igor pro calculation  
        # the different digits are due to precision of q values  
        self.assertAlmostEqual(self.model.run(0.001), 10000.5, 1)
        self.assertAlmostEqual(self.model.run(0.1501412), 1.47557, 5)
        self.assertAlmostEqual(self.model.runXY(0.4425284), 0.134093, 6)
Ejemplo n.º 3
0
 def setUp(self):
     from sas.models.BroadPeakModel import BroadPeakModel
     self.model = BroadPeakModel()
Ejemplo n.º 4
0
 def setUp(self):
     from sas.models.BroadPeakModel import BroadPeakModel
     self.model= BroadPeakModel()