- Timestamp:
- Jun 21, 2010 3:32:20 PM (15 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.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 3ad91de
- Parents:
- 43db4a8
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r0b12abb5 re3d1423 62 62 self.npts = None 63 63 ## default fitengine type 64 self.engine_type = None64 self.engine_type = 'scipy' 65 65 ## smear default 66 66 self.smearer = None … … 113 113 ## check that the fit range is correct to plot the model again 114 114 self.fitrange= True 115 116 117 118 119 115 ## Create memento to save the current state 120 116 self.state= PageState(parent= self.parent,model=self.model, data=self.data) … … 721 717 Store current state 722 718 """ 723 if hasattr(self, "engine_type"): 724 self.state.engine_type = copy.deepcopy(self.engine_type) 719 self.state.engine_type = copy.deepcopy(self.engine_type) 725 720 ## save model option 726 721 if self.model!= None: … … 919 914 self.disp_cb_dict = state.disp_cb_dict 920 915 self.disp_list = state.disp_list 921 916 922 917 ## set the state of the radio box 923 918 self.shape_rbutton.SetValue(state.shape_rbutton ) 924 919 self.shape_indep_rbutton.SetValue(state.shape_indep_rbutton) 925 self.struct_rbutton.SetValue(state.struct_rbutton 920 self.struct_rbutton.SetValue(state.struct_rbutton) 926 921 self.plugin_rbutton.SetValue(state.plugin_rbutton) 927 922 … … 929 924 self._show_combox_helper() 930 925 #select the current model 926 self.formfactorbox.Select(int(state.formfactorcombobox)) 931 927 self.structurebox.SetSelection(state.structurecombobox ) 932 self.formfactorbox.SetSelection(state.formfactorcombobox)928 933 929 #reset the fitting engine type 934 930 self.engine_type = state.engine_type 935 931 #draw the pnael according to the new model parameter 936 932 self._on_select_model(event=None) 937 933 938 934 if self.manager !=None: 939 935 self.manager._on_change_engine(engine=self.engine_type) … … 1795 1791 self.structurebox.Enable() 1796 1792 self.text2.Enable() 1797 #if self.data.__class__.__name__ =="Data2D":1798 #self.smear_description_2d.Show(True)1799 1800 1793 s_id = self.structurebox.GetCurrentSelection() 1801 1794 struct_factor = self.structurebox.GetClientData( s_id ) … … 1811 1804 self.model = None 1812 1805 return self.model 1813 1814 1806 ## post state to fit panel 1815 1807 self.state.parameters =[] -
sansview/perspectives/fitting/pagestate.py
r0b12abb5 re3d1423 37 37 ["name", "name", "string"], 38 38 ["data_name", "data_name", "string"]] 39 list_of_state_attributes = [["qmin", "qmin", "float"], 39 list_of_state_attributes = [["engine_type", "engine_type", "string"], 40 ["qmin", "qmin", "float"], 40 41 ["qmax", "qmax", "float"], 41 42 ["npts", "npts", "float"], … … 105 106 elif item[2] == "bool": 106 107 try: 107 exec "value = bool(node.get(item[0]).strip())"108 return value108 return node.get(item[0]).strip() == "True" 109 109 110 except: 110 111 return None
Note: See TracChangeset
for help on using the changeset viewer.