コード例 #1
0
class TestStackedDisksModel(unittest.TestCase):
    """ Unit tests for calculate_ER (StackedDisks model) """
    def setUp(self):
        from sas.models.StackedDisksModel import StackedDisksModel
        from sas.models.DiamCylFunc import DiamCylFunc
        self.comp = StackedDisksModel()
        self.diam = DiamCylFunc()

    def test(self):
        """ Test 1D model for a StackedDisks """
        self.comp.setParam("radius", 3000)
        self.comp.setParam("n_stacking", 2)
        self.comp.setParam("core_thick", 10)
        self.comp.setParam("layer_thick", 15)
        self.diam.setParam("radius", 3000)
        self.diam.setParam("length", 80)
        self.assertAlmostEqual(self.comp.calculate_ER(),
                               self.diam.run(0.1) / 2)
コード例 #2
0
class TestStackedDisksModel(unittest.TestCase):
    """ Unit tests for calculate_ER (StackedDisks model) """
    
    def setUp(self):
        from sas.models.StackedDisksModel import StackedDisksModel
        from sas.models.DiamCylFunc import DiamCylFunc
        self.comp = StackedDisksModel()
        self.diam = DiamCylFunc()
        
    def test(self):
        """ Test 1D model for a StackedDisks """
        self.comp.setParam("radius", 3000)
        self.comp.setParam("n_stacking", 2)
        self.comp.setParam("core_thick",10)
        self.comp.setParam("layer_thick", 15)
        self.diam.setParam("radius", 3000)
        self.diam.setParam("length",80)       
        self.assertAlmostEqual(self.comp.calculate_ER(), self.diam.run(0.1)/2)  
コード例 #3
0
 def setUp(self):
     from sas.models.StackedDisksModel import StackedDisksModel
     from sas.models.DiamCylFunc import DiamCylFunc
     self.comp = StackedDisksModel()
     self.diam = DiamCylFunc()
コード例 #4
0
 def setUp(self):
     from sas.models.StackedDisksModel import StackedDisksModel
     from sas.models.DiamCylFunc import DiamCylFunc
     self.comp = StackedDisksModel()
     self.diam = DiamCylFunc()