Ignore:
Timestamp:
Sep 6, 2018 9:03:25 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
9d23e4c, 40975f8, 73665a8
Parents:
dda8f16
git-author:
Piotr Rozyczko <rozyczko@…> (09/06/18 09:01:55)
git-committer:
Piotr Rozyczko <rozyczko@…> (09/06/18 09:03:25)
Message:

Separate kernel parameters so they can be selectively added during fitting and calculation. SASVIEW-1008, SASVIEW-1013

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py

    r605d944 r66d4370  
    445445        self.assertEqual(self.widget.kernel_module.details['radius_bell'][1], 1.0) 
    446446 
     447        #self.widget.show() 
     448        #QtWidgets.QApplication.exec_() 
     449 
    447450        # Change the number of points 
    448         self.assertEqual(self.widget.kernel_module.getParam('radius_bell.npts'), 35) 
     451        self.assertEqual(self.widget.poly_params['radius_bell.npts'], 35) 
    449452        self.widget._poly_model.item(0,4).setText("22") 
    450         self.assertEqual(self.widget.kernel_module.getParam('radius_bell.npts'), 22) 
     453        self.assertEqual(self.widget.poly_params['radius_bell.npts'], 22) 
    451454        # try something stupid 
    452455        self.widget._poly_model.item(0,4).setText("butt") 
    453456        # see that this didn't annoy the control at all 
    454         self.assertEqual(self.widget.kernel_module.getParam('radius_bell.npts'), 22) 
     457        self.assertEqual(self.widget.poly_params['radius_bell.npts'], 22) 
    455458 
    456459        # Change the number of sigmas 
    457         self.assertEqual(self.widget.kernel_module.getParam('radius_bell.nsigmas'), 3) 
     460        self.assertEqual(self.widget.poly_params['radius_bell.nsigmas'], 3) 
    458461        self.widget._poly_model.item(0,5).setText("222") 
    459         self.assertEqual(self.widget.kernel_module.getParam('radius_bell.nsigmas'), 222) 
     462        self.assertEqual(self.widget.poly_params['radius_bell.nsigmas'], 222) 
    460463        # try something stupid again 
    461464        self.widget._poly_model.item(0,4).setText("beer") 
    462465        # no efect 
    463         self.assertEqual(self.widget.kernel_module.getParam('radius_bell.nsigmas'), 222) 
     466        self.assertEqual(self.widget.poly_params['radius_bell.nsigmas'], 222) 
    464467 
    465468    def testOnPolyComboIndexChange(self): 
     
    482485        self.widget.onPolyComboIndexChange('rectangle', 0) 
    483486        # check values 
    484         self.assertEqual(self.widget.kernel_module.getParam('radius_bell.npts'), 35) 
    485         self.assertAlmostEqual(self.widget.kernel_module.getParam('radius_bell.nsigmas'), 1.73205, 5) 
     487        self.assertEqual(self.widget.poly_params['radius_bell.npts'], 35) 
     488        self.assertAlmostEqual(self.widget.poly_params['radius_bell.nsigmas'], 1.73205, 5) 
    486489        # Change the index 
    487490        self.widget.onPolyComboIndexChange('lognormal', 0) 
    488491        # check values 
    489         self.assertEqual(self.widget.kernel_module.getParam('radius_bell.npts'), 80) 
    490         self.assertEqual(self.widget.kernel_module.getParam('radius_bell.nsigmas'), 8) 
     492        self.assertEqual(self.widget.poly_params['radius_bell.npts'], 80) 
     493        self.assertEqual(self.widget.poly_params['radius_bell.nsigmas'], 8) 
    491494        # Change the index 
    492495        self.widget.onPolyComboIndexChange('schulz', 0) 
    493496        # check values 
    494         self.assertEqual(self.widget.kernel_module.getParam('radius_bell.npts'), 80) 
    495         self.assertEqual(self.widget.kernel_module.getParam('radius_bell.nsigmas'), 8) 
     497        self.assertEqual(self.widget.poly_params['radius_bell.npts'], 80) 
     498        self.assertEqual(self.widget.poly_params['radius_bell.nsigmas'], 8) 
    496499 
    497500        # mock up file load 
Note: See TracChangeset for help on using the changeset viewer.