Changeset c9a4377 in sasview
- Timestamp:
- Mar 30, 2009 4:26:12 PM (16 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:
- d16e396
- Parents:
- 6355f4d
- Location:
- sansview/perspectives/fitting
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage.py
r6355f4d rc9a4377 371 371 return the fitting range 372 372 """ 373 return self.qmin_x , self.qmax_x373 return float(self.qmin_x) , float(self.qmax_x) 374 374 375 375 def get_param_list(self): -
sansview/perspectives/fitting/fitpanel.py
r6f023e8 rc9a4377 62 62 """ 63 63 page_info=self.get_current_page().page_info.clone() 64 self.manager._add_page_onmenu("Model", page_info) 64 page_info.page_name= self.get_current_page().page_info.page_name 65 66 self.manager._add_page_onmenu(page_info.page_name, page_info) 65 67 66 68 selected_page = self.GetPage(self.GetSelection()) … … 152 154 153 155 if not name in self.fit_page_name : 156 154 157 from fitpage import FitPage 155 158 panel = FitPage(parent= self, page_info=myinfo, name=name ) 156 panel.name =name159 panel.name = name 157 160 panel.window_name= "fitpage" 158 161 panel.set_manager(self.manager) … … 167 170 return None 168 171 169 def _help_add_model_page(self,model, description,page_title, qmin=0, qmax=0.1, npts=50):172 def _help_add_model_page(self,model,page_title, qmin=0, qmax=0.1, npts=50): 170 173 """ 171 174 #TODO: fill in description … … 205 208 206 209 207 def add_model_page(self,model, description,page_title, qmin=0, qmax=0.1, npts=50, topmenu=False):210 def add_model_page(self,model,page_title, qmin=0, qmax=0.1, npts=50, topmenu=False): 208 211 """ 209 212 Add a model page only one to display any model selected from the menu or the page combo box. … … 212 215 @param model: the model for which paramters will be changed 213 216 @param page_title: the name of the page 214 @param description: [Coder: fill your description!]215 217 @param page_title: [Coder: fill your description!] 216 218 @param qmin: mimimum Q … … 220 222 if topmenu==True: 221 223 if self.draw_model_name ==None: 222 self._help_add_model_page(model, description,page_title, qmin=qmin, qmax=qmax, npts=npts)224 self._help_add_model_page(model,page_title, qmin=qmin, qmax=qmax, npts=npts) 223 225 else: 224 226 self.model_page.select_model(model, page_title) -
sansview/perspectives/fitting/fitting.py
r6f023e8 rc9a4377 383 383 ## if simultaneous fit change automatically the engine to park 384 384 if fitproblem_count >1: 385 self.menu1.FindItemByPosition(1).Check(True) 386 self.menu1.FindItemByPosition(0).Check(False) 385 387 self._on_change_engine(engine='park') 388 386 389 from sans.fit.Fitting import Fit 387 390 self.fitter= Fit(self._fit_engine) 388 391 389 392 if self._fit_engine=="park": 390 engineType="Simu taneous Fit"393 engineType="Simultaneous Fit" 391 394 else: 392 395 engineType="Single Fit" … … 459 462 reopen a closed page 460 463 """ 461 print "reopen" 464 if event.GetId() in self.closed_page_dict.keys(): 465 page_info= self.closed_page_dict[ event.GetId() ] 466 if page_info.page_name !="Model Page": 467 page = self.fit_panel.add_fit_page(page_info.data) 468 else: 469 model= page_info.model 470 self.fit_panel.add_model_page(model,model.name,topmenu=True) 462 471 463 472 def _reset_schedule_problem(self, value=0): … … 740 749 # save the name containing the data name with the appropriate model 741 750 self.page_finder[current_pg].set_model(model) 751 qmin, qmax= current_pg.get_range() 752 self.page_finder[current_pg].set_range(qmin=qmin, qmax=qmax) 753 742 754 # save model name 743 self.draw_model( model=model, data= metadata )755 self.draw_model( model=model, data= metadata, qmin=qmin, qmax=qmax) 744 756 745 757 if self.sim_page!=None: … … 756 768 if hasattr(evt.model, "name"): 757 769 name = evt.model.name 758 model=evt.model 759 description=model.description 760 770 model = evt.model 771 761 772 # Create a model page. If a new page is created, the model 762 773 # will be plotted automatically. If a page already exists, 763 774 # the content will be updated and the plot refreshed 764 self.fit_panel.add_model_page(model, description,name,topmenu=True)775 self.fit_panel.add_model_page(model,name,topmenu=True) 765 776 766 777 -
sansview/perspectives/fitting/model_thread.py
ra8ced02 rc9a4377 109 109 y = self.y 110 110 output = numpy.zeros((len(x),len(y))) 111 112 111 if self.qmin==None: 113 112 self.qmin = 0 -
sansview/perspectives/fitting/modelpage.py
r6f023e8 rc9a4377 30 30 """ 31 31 self.name ="Model" 32 page_info.page_name= "Model Page" 32 33 self._fill_model_sizer( self.sizer1) 33 34 self._fill_range_sizer() -
sansview/perspectives/fitting/pageInfo.py
r6f023e8 rc9a4377 30 30 # Event_owner is the owner of model event 31 31 self.event_owner = None 32 32 ##page name 33 self.page_name="" 33 34 # Contains link between model ,all its parameters, and panel organization 34 35 self.parameters=[] … … 54 55 self.qmax=None 55 56 self.npts=None 56 ##page name 57 self.page_name="" 57 58 58 59 59
Note: See TracChangeset
for help on using the changeset viewer.