Changeset 5156918 in sasview for src/sas/sasgui/perspectives/fitting/basepage.py
- Timestamp:
- Mar 31, 2017 5:20:15 AM (8 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 7b15990
- Parents:
- 1a8e13f0 (diff), 7cbbacd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
r1a8e13f0 r5156918 53 53 ON_MAC = True 54 54 55 CUSTOM_MODEL = 'Plugin Models' 56 55 57 class BasicPage(ScrolledPanel, PanelBase): 56 58 """ 57 This class provide general structure of fitpanel page59 This class provide general structure of the fitpanel page 58 60 """ 59 61 # Internal name for the AUI manager … … 118 120 self.dxw = None 119 121 # pinhole smear 120 self.dx_min = None 121 self.dx_max = None 122 self.dx_percent = None 122 123 # smear attrbs 123 124 self.enable_smearer = None … … 677 678 def _copy_info(self, flag): 678 679 """ 679 Send event d pemding on flag680 681 : Param flag: flag that distinguish event680 Send event depending on flag 681 682 : Param flag: flag that distinguishes the event 682 683 """ 683 684 # messages depending on the flag … … 847 848 self.state.pinhole_smearer = \ 848 849 copy.deepcopy(self.pinhole_smearer.GetValue()) 849 self.state.dx_max = copy.deepcopy(self.dx_max) 850 self.state.dx_min = copy.deepcopy(self.dx_min) 850 self.state.dx_percent = copy.deepcopy(self.dx_percent) 851 851 self.state.dxl = copy.deepcopy(self.dxl) 852 852 self.state.dxw = copy.deepcopy(self.dxw) … … 1119 1119 :precondition: the page is already drawn or created 1120 1120 1121 :postcondition: the state of the underlying data change as well as the1121 :postcondition: the state of the underlying data changes as well as the 1122 1122 state of the graphic interface 1123 1123 """ … … 1167 1167 self._show_combox(None) 1168 1168 from models import PLUGIN_NAME_BASE 1169 if self.categorybox.GetValue() == 'Customized Models'\1169 if self.categorybox.GetValue() == CUSTOM_MODEL \ 1170 1170 and PLUGIN_NAME_BASE not in state.formfactorcombobox: 1171 1171 state.formfactorcombobox = \ … … 1245 1245 # we have two more options for smearing 1246 1246 if self.pinhole_smearer.GetValue(): 1247 self.dx_min = state.dx_min 1248 self.dx_max = state.dx_max 1249 if self.dx_min is not None: 1250 self.smear_pinhole_min.SetValue(str(self.dx_min)) 1251 if self.dx_max is not None: 1252 self.smear_pinhole_max.SetValue(str(self.dx_max)) 1247 self.dx_percent = state.dx_percent 1248 if self.dx_percent is not None: 1249 if state.dx_old: 1250 self.dx_percent = 100 * (self.dx_percent / self.data.x[0]) 1251 self.smear_pinhole_percent.SetValue("%.2f" % self.dx_percent) 1253 1252 self.onPinholeSmear(event=None) 1254 1253 elif self.slit_smearer.GetValue(): … … 1335 1334 def _selectDlg(self): 1336 1335 """ 1337 open a dialog file to select ed the customized dispersity1336 open a dialog file to select the customized polydispersity function 1338 1337 """ 1339 1338 if self.parent is not None: … … 1747 1746 def _set_multfactor_combobox(self, multiplicity=10): 1748 1747 """ 1749 Set comboBox for mu itfactor of CoreMultiShellModel1748 Set comboBox for multitfactor of CoreMultiShellModel 1750 1749 :param multiplicit: no. of multi-functionality 1751 1750 """ … … 1785 1784 Fill panel's combo box according to the type of model selected 1786 1785 """ 1787 custom_model = 'Customized Models' 1786 1788 1787 mod_cat = self.categorybox.GetStringSelection() 1789 1788 self.structurebox.SetSelection(0) … … 1794 1793 m_list = [] 1795 1794 try: 1796 if mod_cat == custom_model:1795 if mod_cat == CUSTOM_MODEL: 1797 1796 for model in self.model_list_box[mod_cat]: 1798 1797 m_list.append(self.model_dict[model.name]) … … 3430 3429 fills out the category list box 3431 3430 """ 3432 uncat_str = ' CustomizedModels'3431 uncat_str = 'Plugin Models' 3433 3432 self._read_category_info() 3434 3433 … … 3459 3458 self.model_box.Clear() 3460 3459 3461 if category == ' CustomizedModels':3460 if category == 'Plugin Models': 3462 3461 for model in self.model_list_box[category]: 3463 3462 str_m = str(model).split(".")[0]
Note: See TracChangeset
for help on using the changeset viewer.