- Timestamp:
- Mar 31, 2009 3:49:02 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:
- db1dcef
- Parents:
- 9853ad0
- Location:
- sansview/perspectives/fitting
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r9853ad0 r59a7f2d 17 17 ## Title to appear on top of the window 18 18 window_caption = "Fit Page" 19 19 20 name="" 21 20 22 def __init__(self,parent, pageinfo, name): 21 23 wx.ScrolledWindow.__init__(self, parent) … … 68 70 self.data = self.page_info.data 69 71 self.event_owner = self.page_info.event_owner 72 70 73 if self.model !=None: 71 74 self.disp_list= self.model.getDispParamList() … … 573 576 if self.model!=None: 574 577 self.formfactorbox.SetValue(self.model.name) 575 578 579 576 580 self.structurebox = wx.ComboBox(self, -1,style=wx.CB_READONLY) 577 581 wx.EVT_COMBOBOX(self.formfactorbox,-1, self._on_select_model) … … 587 591 self.model_list_box["Structure Factors"]) 588 592 589 593 ## check model type to show sizer 590 594 if self.model !=None: 591 595 self._set_model_sizer_selection( self.model ) … … 698 702 try: 699 703 combobox.SetSelection(0) 704 700 705 except: 701 706 pass … … 704 709 705 710 706 def _on_select_model_helper(self ,event):711 def _on_select_model_helper(self): 707 712 """ 708 713 call back for model selection … … 817 822 TO IMPLEMENT 818 823 """ 819 820 824 return 821 from sans.models.dispersion_models import GaussianDispersion822 825 if self.model==None: 823 826 return 824 list= self.model.dispersion.keys() 827 from sans.models.dispersion_models import GaussianDispersion 828 list = self.model.dispersion.keys() 829 825 830 for key in list: 826 827 831 ## The parameter was un-selected. Go back to Gaussian model (with 0 pts) 828 832 disp_model = GaussianDispersion() -
sansview/perspectives/fitting/fitpage.py
rc9a4377 r59a7f2d 31 31 self.name= self.data.name 32 32 page_info.page_name= self.data.name 33 33 34 ## fit page does not content npts txtcrtl 34 35 self.npts=None … … 39 40 self._fill_model_sizer( self.sizer1) 40 41 self._fill_range_sizer() 41 if hasattr(self.page_info,"model"): 42 self.set_model_param_sizer(self.model) 42 self.model = self.formfactorbox.GetClientData(0)() 43 self.page_info.model= self.model 44 self._on_select_model(event=None) 43 45 44 46 … … 345 347 call back for model selection 346 348 """ 347 self._on_select_model_helper( event)349 self._on_select_model_helper() 348 350 self.set_model_param_sizer(self.model) 349 351 self._set_sizer_gaussian() … … 358 360 ## error occured on chisqr computation 359 361 pass 360 362 361 363 def _onparamEnter(self,event): 362 364 """ -
sansview/perspectives/fitting/modelpage.py
rc9a4377 r59a7f2d 97 97 call back for model selection 98 98 """ 99 self._on_select_model_helper( event)99 self._on_select_model_helper() 100 100 self.set_model_param_sizer(self.model) 101 101 self._set_sizer_gaussian() … … 150 150 nsigmas = wx.StaticText(self, -1, 'Nsigmas') 151 151 self.sizer4_4.Add(nsigmas,( iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 152 152 153 153 154 for item in self.model.dispersion.keys(): 154 155 name1=item+".width" … … 191 192 192 193 elif p=="nsigmas": 194 193 195 ix =3 194 196 value= self.model.getParam(name3) -
sansview/perspectives/fitting/pageInfo.py
rc9a4377 r59a7f2d 70 70 self.list_of_radiobox[label]=[label, id, state] 71 71 72 72 73 def clone(self): 73 74 model=None
Note: See TracChangeset
for help on using the changeset viewer.