Changeset 0fd2f27 in sasview for sansview/perspectives/fitting
- Timestamp:
- Aug 1, 2011 10:45:45 AM (13 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:
- 75daa79
- Parents:
- 3f36675
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitting.py
rcc31608 r0fd2f27 348 348 def on_set_state_helper(self,event=None): 349 349 """ 350 Set_state_helper. This actually sets state after plotting data from state file. 351 352 : event: FitStateUpdateEvent called by dataloader.plot_data from guiframe 350 Set_state_helper. This actually sets state 351 after plotting data from state file. 352 353 : event: FitStateUpdateEvent called 354 by dataloader.plot_data from guiframe 353 355 """ 354 356 if len(self.temp_state) == 0: 355 if self.state_index==0 and len(self.mypanels) <= 0 and self.sfile_ext =='.svs': 357 if self.state_index==0 and len(self.mypanels) <= 0 \ 358 and self.sfile_ext =='.svs': 356 359 self.fit_panel.add_default_pages() 357 360 self.temp_state = [] … … 441 444 Used by simfitpage.py to reset a parameter given the string constrainst. 442 445 443 :param modelname: the name ot the model for with the parameter has to reset 446 :param modelname: the name ot the model for with the parameter 447 has to reset 444 448 :param value: can be a string in this case. 445 449 :param names: the paramter name … … 798 802 NewPlotEvent(group_id=group_id, 799 803 action="delete")) 800 self.parent.update_data(prev_data=theory_data, new_data=data) 804 self.parent.update_data(prev_data=theory_data, 805 new_data=data) 801 806 else: 802 807 if theory_data is not None: … … 806 811 NewPlotEvent(group_id=group_id, 807 812 action="delete")) 808 self.parent.update_data(prev_data=theory_data, new_data=data) 813 self.parent.update_data(prev_data=theory_data, 814 new_data=data) 809 815 810 816 self.store_data(uid=page.uid, data=page.get_data(), … … 824 830 """ 825 831 for item in self.parent.panels: 826 if self.parent.panels[item].window_caption.startswith(event.panel_name): 832 name = event.panel_name 833 if self.parent.panels[item].window_caption.startswith(name): 827 834 self.parent.panels[item].set_slicer(event.type, event.params) 828 835 … … 932 939 try: 933 940 if single_data.id in pointer_to_fitproblem: 934 new_value= self.page_finder[pointer_to_fitproblem[single_data.id]]935 self._fit_setter(data=single_data, value= new_value,941 v = self.page_finder[pointer_to_fitproblem[single_data.id]] 942 self._fit_setter(data=single_data, value=v, 936 943 fitter=fitter, 937 944 pars=pars, … … 973 980 print "update_fit result", result 974 981 975 def _batch_single_fit_complete_helper(self,result, pars, page_id, elapsed=None): 982 def _batch_single_fit_complete_helper(self,result, pars, page_id, 983 elapsed=None): 976 984 """ 977 985 Fit result are display in batch mode … … 990 998 for index in range(len(pars)): 991 999 batch_result[pars[index]].append(res.pvec[index]) 992 batch_result["error on %s" % pars[index]].append(res.stderr[index]) 1000 item = res.stderr[index] 1001 batch_result["error on %s" % pars[index]].append(item) 993 1002 994 1003 pid = page_id[0] 995 1004 self.page_finder[pid].set_result(result=batch_result) 996 self.parent.on_set_batch_result(data=batch_result, name=self.sub_menu) 1005 self.parent.on_set_batch_result(data=batch_result, 1006 name=self.sub_menu) 997 1007 998 1008 … … 1012 1022 del self.fit_thread_list[page_id[0]] 1013 1023 if self.batch_on: 1014 wx.CallAfter(self._batch_single_fit_complete_helper, result, pars, page_id, elapsed=None) 1024 wx.CallAfter(self._batch_single_fit_complete_helper, 1025 result, pars, page_id, elapsed=None) 1015 1026 return 1016 1027 else: … … 1046 1057 1047 1058 cpage = self.fit_panel.get_page_by_id(uid) 1048 # Make sure we got all results (CallAfter is important to MAC) 1059 # Make sure we got all results 1060 #(CallAfter is important to MAC) 1049 1061 wx.CallAfter(cpage.onsetValues, result.fitness, 1050 1062 param_name, result.pvec, result.stderr)
Note: See TracChangeset
for help on using the changeset viewer.