Changeset 52cac46 in sasview
- Timestamp:
- Oct 1, 2009 12:11:52 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:
- abf2d75
- Parents:
- 7d6b055
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
rcd57979a r52cac46 654 654 self._copy_parameters_state(self.fixed_param, self.state.fixed_param) 655 655 656 656 657 def save_current_state_fit(self): 658 """ 659 Store current state 660 """ 661 ## save model option 662 if self.model!= None: 663 self.disp_list= self.model.getDispParamList() 664 self.state.disp_list= copy.deepcopy(self.disp_list) 665 self.state.model = self.model.clone() 666 667 self.state.enable2D = copy.deepcopy(self.enable2D) 668 self.state.values= copy.deepcopy(self.values) 669 self.state.weights = copy.deepcopy( self.weights) 670 ## save data 671 self.state.data= copy.deepcopy(self.data) 672 try: 673 n = self.disp_box.GetCurrentSelection() 674 dispersity= self.disp_box.GetClientData(n) 675 name= dispersity.__name__ 676 self.disp_name = name 677 if name == "GaussianDispersion" : 678 if hasattr(self,"cb1"): 679 self.state.cb1= self.cb1.GetValue() 680 except: 681 pass 682 683 if hasattr(self,"enable_disp"): 684 self.state.enable_disp= self.enable_disp.GetValue() 685 self.state.disable_disp = self.disable_disp.GetValue() 686 687 self.state.smearer = copy.deepcopy(self.smearer) 688 if hasattr(self,"enable_smearer"): 689 self.state.enable_smearer = copy.deepcopy(self.enable_smearer.GetValue()) 690 self.state.disable_smearer = copy.deepcopy(self.disable_smearer.GetValue()) 691 692 if hasattr(self,"disp_box"): 693 self.state.disp_box = self.disp_box.GetCurrentSelection() 694 695 if len(self.disp_cb_dict)>0: 696 for k , v in self.disp_cb_dict.iteritems(): 697 698 if v ==None : 699 self.state.disp_cb_dict[k]= v 700 else: 701 try: 702 self.state.disp_cb_dict[k]=v.GetValue() 703 except: 704 self.state.disp_cb_dict[k]= None 705 706 if len(self._disp_obj_dict)>0: 707 for k , v in self._disp_obj_dict.iteritems(): 708 709 self.state._disp_obj_dict[k]= v 710 711 712 self.state.values = copy.deepcopy(self.values) 713 self.state.weights = copy.deepcopy(self.weights) 714 ## save plotting range 715 self._save_plotting_range() 716 717 #self.state.orientation_params =[] 718 #self.state.orientation_params_disp =[] 719 #self.state.parameters =[] 720 #self.state.fittable_param =[] 721 #self.state.fixed_param =[] 722 723 724 ## save checkbutton state and txtcrtl values 725 self._copy_parameters_state(self.orientation_params, 726 self.state.orientation_params) 727 self._copy_parameters_state(self.orientation_params_disp, 728 self.state.orientation_params_disp) 729 730 self._copy_parameters_state(self.parameters, self.state.parameters) 731 self._copy_parameters_state(self.fittable_param, self.state.fittable_param) 732 self._copy_parameters_state(self.fixed_param, self.state.fixed_param) 733 734 657 735 def reset_page_helper(self, state): 658 736 """ -
sansview/perspectives/fitting/fitpage.py
r4043c96 r52cac46 1080 1080 item[0].SetValue(False) 1081 1081 self.param_toFit=[] 1082 self._copy_parameters_state(self.orientation_params, 1083 self.state.orientation_params) 1084 self._copy_parameters_state(self.orientation_params_disp, 1085 self.state.orientation_params_disp) 1086 self._copy_parameters_state(self.parameters, self.state.parameters) 1087 self._copy_parameters_state(self.fittable_param, self.state.fittable_param) 1088 self._copy_parameters_state(self.fixed_param, self.state.fixed_param) 1082 1083 #self._copy_parameters_state(self.orientation_params, 1084 # self.state.orientation_params) 1085 #self._copy_parameters_state(self.orientation_params_disp, 1086 # self.state.orientation_params_disp) 1087 #self._copy_parameters_state(self.parameters, self.state.parameters) 1088 #self._copy_parameters_state(self.fittable_param, self.state.fittable_param) 1089 #self._copy_parameters_state(self.fixed_param, self.state.fixed_param) 1089 1090 1090 self.save_current_state ()1091 self.save_current_state_fit() 1091 1092 if event !=None: 1092 1093 #self._undo.Enable(True) … … 1127 1128 self.cb1.SetValue(False) 1128 1129 ## save current state of the page 1129 self.state.cb1 = self.cb1.GetValue()1130 self._copy_parameters_state(self.orientation_params,1131 self.state.orientation_params)1132 self._copy_parameters_state(self.orientation_params_disp,1133 self.state.orientation_params_disp)1134 self._copy_parameters_state(self.parameters, self.state.parameters)1135 self._copy_parameters_state(self.fittable_param, self.state.fittable_param)1136 self._copy_parameters_state(self.fixed_param, self.state.fixed_param)1137 1138 self.save_current_state ()1130 #self.state.cb1 = self.cb1.GetValue() 1131 #self._copy_parameters_state(self.orientation_params, 1132 # self.state.orientation_params) 1133 #self._copy_parameters_state(self.orientation_params_disp, 1134 # self.state.orientation_params_disp) 1135 #self._copy_parameters_state(self.parameters, self.state.parameters) 1136 #self._copy_parameters_state(self.fittable_param, self.state.fittable_param) 1137 #self._copy_parameters_state(self.fixed_param, self.state.fixed_param) 1138 1139 self.save_current_state_fit() 1139 1140 if event !=None: 1140 1141 #self._undo.Enable(True) … … 1427 1428 else: 1428 1429 self.text2_4.Hide() 1429 1430 self._copy_parameters_state(self.orientation_params,1431 self.state.orientation_params)1432 self._copy_parameters_state(self.orientation_params_disp,1433 self.state.orientation_params_disp)1434 self._copy_parameters_state(self.parameters, self.state.parameters)1435 self._copy_parameters_state(self.fittable_param, self.state.fittable_param)1436 self._copy_parameters_state(self.fixed_param, self.state.fixed_param)1437 1430 #self.state.cb1 = self.cb1.GetValue() 1431 #self._copy_parameters_state(self.orientation_params, 1432 # self.state.orientation_params) 1433 #self._copy_parameters_state(self.orientation_params_disp, 1434 # self.state.orientation_params_disp) 1435 #self._copy_parameters_state(self.parameters, self.state.parameters) 1436 #self._copy_parameters_state(self.fittable_param, self.state.fittable_param) 1437 #self._copy_parameters_state(self.fixed_param, self.state.fixed_param) 1438 self.save_current_state_fit() 1438 1439 boxsizer1.Add(sizer) 1439 1440 self.sizer3.Add(boxsizer1,0, wx.EXPAND | wx.ALL, 10) … … 1442 1443 self.Refresh() 1443 1444 self.SetScrollbars(20,20,25,65) 1444 1445 1446 1445 1447 1446 1448 class HelpWindow(wx.Frame):
Note: See TracChangeset
for help on using the changeset viewer.