Changeset 6747217 in sasview for sansview/perspectives
- Timestamp:
- Apr 9, 2010 2:39:34 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:
- 9abec44
- Parents:
- 4ed210f4
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage.py
r64017a8 r6747217 765 765 """ 766 766 call back for model selection 767 """ 767 """ 768 768 self._on_select_model_helper() 769 769 self.set_model_param_sizer(self.model) … … 775 775 except: 776 776 pass 777 self.btFit.SetFocus() 778 self.state.enable_disp = self.enable_disp.GetValue() 779 self.state.disable_disp = self.disable_disp.GetValue() 780 self.state.pinhole_smearer = self.pinhole_smearer.GetValue() 781 self.state.slit_smearer = self.slit_smearer.GetValue() 782 783 self.state.structurecombobox = self.structurebox.GetCurrentSelection() 784 self.state.formfactorcombobox = self.formfactorbox.GetCurrentSelection() 785 777 786 if self.model != None: 778 787 try: … … 786 795 if self.data is not None and self.data.__class__.__name__ !="Data2D": 787 796 ## set smearing value whether or not the data contain the smearing info 788 self.manager.set_smearer(smearer=temp_smear, qmin= float(self.qmin_x), 797 evt = ModelEventbox(model=self.model, 798 smearer=temp_smear, 799 qmin= float(self.qmin_x), 789 800 qmax= float(self.qmax_x)) 790 791 evt = ModelEventbox(model=self.model)801 else: 802 evt = ModelEventbox(model=self.model) 792 803 wx.PostEvent(self.event_owner, evt) 793 804 794 self.btFit.SetFocus()795 self.state.enable_disp = self.enable_disp.GetValue()796 self.state.disable_disp = self.disable_disp.GetValue()797 self.state.pinhole_smearer = self.pinhole_smearer.GetValue()798 self.state.slit_smearer = self.slit_smearer.GetValue()799 800 self.state.structurecombobox = self.structurebox.GetCurrentSelection()801 self.state.formfactorcombobox = self.formfactorbox.GetCurrentSelection()802 803 804 805 if event !=None: 805 806 #self._undo.Enable(True) -
sansview/perspectives/fitting/fitting.py
rf71c2de r6747217 932 932 """ 933 933 model = evt.model 934 935 934 if model == None: 936 935 return 937 model.origin_name = model.name 936 smearer = None 937 qmin = None 938 qmax = None 939 if hasattr(evt, "qmin"): 940 qmin = evt.qmin 941 if hasattr(evt, "qmax"): 942 qmax = evt.qmax 943 if hasattr(evt, "smearer"): 944 smearer = evt.smearer 945 #model.origin_name = model.name 938 946 self.current_pg = self.fit_panel.get_current_page() 939 947 ## make sure nothing is done on self.sim_page 940 948 ## example trying to call set_panel on self.sim_page 941 949 if self.current_pg != self.sim_page : 942 943 950 if self.page_finder[self.current_pg].get_model()== None : 944 951 … … 947 954 else: 948 955 model.name= self.page_finder[self.current_pg].get_model().name 949 956 950 957 data = self.page_finder[self.current_pg].get_fit_data() 951 958 … … 956 963 smearer= self.page_finder[self.current_pg].get_smearer() 957 964 # save model name 958 self.draw_model( model=model, smearer=smearer, 959 data=data, qmin=qmin, qmax=qmax) 965 self.set_smearer(smearer=smearer, qmin=qmin, qmax=qmax) 960 966 961 967 if self.sim_page!=None: … … 1124 1130 title=str(title), reset=True)) 1125 1131 else: 1126 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, 1127 title= str(title))) 1132 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot,title= str(title))) 1128 1133 msg = "Plot 1D complete !" 1129 1134 wx.PostEvent( self.parent, StatusEvent( status= msg , type="stop" )) … … 1189 1194 """ 1190 1195 self.err_dy = event.err_dy 1191 print "receiving error dy",self.err_dy1196 #print "receiving error dy",self.err_dy 1192 1197 1193 1198 def _draw_model2D(self,model,data=None,description=None, enable2D=False, … … 1299 1304 cProfile.runctx('call()', dict(call=call), {}, 'profile.out') 1300 1305 stats = pstats.Stats('profile.out') 1301 stats.sort_stats('time')1302 #stats.sort_stats('calls')1306 #stats.sort_stats('time') 1307 stats.sort_stats('calls') 1303 1308 stats.print_stats() 1304 1309 os.unlink('profile.out')
Note: See TracChangeset
for help on using the changeset viewer.