Esempio 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)
Esempio 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)
Esempio n. 3
0
 def setUp(self):
     from sas.models.BroadPeakModel import BroadPeakModel
     self.model = BroadPeakModel()
Esempio n. 4
0
 def setUp(self):
     from sas.models.BroadPeakModel import BroadPeakModel
     self.model= BroadPeakModel()