Exemple #1
0
class TestGaussLorentzGel(unittest.TestCase):
    """
    Unit tests for GuinierPorod Model function
    """
    def setUp(self):
        from sas.models.GaussLorentzGelModel import GaussLorentzGelModel
        self.model = GaussLorentzGelModel()

    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), 149.481, 3)
        self.assertAlmostEqual(self.model.run(0.105363), 9.1903, 4)
        self.assertAlmostEqual(self.model.runXY(0.441623), 0.632811, 5)
class TestGaussLorentzGel(unittest.TestCase):
    """
    Unit tests for GuinierPorod Model function
    """
    def setUp(self):
        from sas.models.GaussLorentzGelModel import GaussLorentzGelModel
        self.model= GaussLorentzGelModel()
        
    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), 149.481, 3)
        self.assertAlmostEqual(self.model.run(0.105363), 9.1903, 4)
        self.assertAlmostEqual(self.model.runXY(0.441623), 0.632811, 5)
Exemple #3
0
 def setUp(self):
     from sas.models.GaussLorentzGelModel import GaussLorentzGelModel
     self.model = GaussLorentzGelModel()
 def setUp(self):
     from sas.models.GaussLorentzGelModel import GaussLorentzGelModel
     self.model= GaussLorentzGelModel()