Changeset a4b9b7a in sasview
- Timestamp:
- Oct 5, 2018 5:16:46 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 00a40bd
- Parents:
- 3ab2105
- Location:
- src/sas/qtgui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py
r712db9e ra4b9b7a 120 120 fittingWindow.SASModelToQModel("cylinder") 121 121 mag_index = fittingWindow.lstMagnetic.model().index(0,0) 122 self.assertEqual(mag_index.data(), "up :frac_i")122 self.assertEqual(mag_index.data(), "up_frac_i") 123 123 mag_index = fittingWindow.lstMagnetic.model().index(1,0) 124 self.assertEqual(mag_index.data(), "up :frac_f")124 self.assertEqual(mag_index.data(), "up_frac_f") 125 125 mag_index = fittingWindow.lstMagnetic.model().index(2,0) 126 self.assertEqual(mag_index.data(), "up :angle")126 self.assertEqual(mag_index.data(), "up_angle") 127 127 mag_index = fittingWindow.lstMagnetic.model().index(3,0) 128 self.assertEqual(mag_index.data(), " M0:sld")128 self.assertEqual(mag_index.data(), "sld_M0") 129 129 mag_index = fittingWindow.lstMagnetic.model().index(4,0) 130 self.assertEqual(mag_index.data(), " mtheta:sld")130 self.assertEqual(mag_index.data(), "sld_mtheta") 131 131 mag_index = fittingWindow.lstMagnetic.model().index(5,0) 132 self.assertEqual(mag_index.data(), " mphi:sld")132 self.assertEqual(mag_index.data(), "sld_mphi") 133 133 mag_index = fittingWindow.lstMagnetic.model().index(6,0) 134 self.assertEqual(mag_index.data(), " M0:sld_solvent")134 self.assertEqual(mag_index.data(), "sld_solvent_M0") 135 135 mag_index = fittingWindow.lstMagnetic.model().index(7,0) 136 self.assertEqual(mag_index.data(), " mtheta:sld_solvent")136 self.assertEqual(mag_index.data(), "sld_solvent_mtheta") 137 137 mag_index = fittingWindow.lstMagnetic.model().index(8,0) 138 self.assertEqual(mag_index.data(), " mphi:sld_solvent")138 self.assertEqual(mag_index.data(), "sld_solvent_mphi") 139 139 140 140 # test the delegate a bit … … 581 581 for row in range(self.widget._magnet_model.rowCount()): 582 582 func_index = self.widget._magnet_model.index(row, 0) 583 self.assertIn(' :', self.widget._magnet_model.item(row, 0).text())583 self.assertIn('_', self.widget._magnet_model.item(row, 0).text()) 584 584 585 585 -
src/sas/qtgui/Utilities/GridPanel.py
rfa762f4 ra4b9b7a 307 307 model = data[0][0] 308 308 309 # TODO: add a conditional for magnetic models 310 param_list = [m for m in model.model.params.keys() if ":" not in m] 309 disperse_params = list(model.model.dispersion.keys()) 310 magnetic_params = model.model.magnetic_params 311 optimized_params = model.param_list 312 # Create the main parameter list 313 param_list = [m for m in model.model.params.keys() if (m not in model.model.magnetic_params and ".width" not in m)] 314 315 # add fitted polydisp parameters 316 param_list += [m+".width" for m in disperse_params if m+".width" in optimized_params] 317 318 # add fitted magnetic params 319 param_list += [m for m in magnetic_params if m in optimized_params] 311 320 312 321 # Check if 2D model. If not, remove theta/phi
Note: See TracChangeset
for help on using the changeset viewer.