Changeset 00353b4 in sasview
- Timestamp:
- Oct 15, 2008 4:16:05 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:
- 7764b41
- Parents:
- 8809e48
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage.py
r6f73a08 r00353b4 343 343 self.text4_2.Show() 344 344 self.text4_3.Show() 345 if not dataset.data.__class__.__name__=='Data2D':345 if not hasattr(dataset.data,'image'): 346 346 self.xmin.SetValue(format_number(min(dataset.data.x))) 347 347 self.xmin.Show() … … 505 505 name=str(item[0].GetLabelText()) 506 506 value= float(item[1].GetValue()) 507 self.model.setParam(name,value) 508 self.manager.redraw_model(float(self.xmin.GetValue())\ 509 ,float(self.xmax.GetValue())) 507 self.model.setParam(name,value) 510 508 except: 511 509 wx.PostEvent(self.parent.GrandParent, StatusEvent(status=\ 512 510 "Drawing Error:wrong value entered : %s"% sys.exc_value)) 513 511 self.manager.redraw_model(float(self.xmin.GetValue())\ 512 ,float(self.xmax.GetValue())) 514 513 515 514 def select_all_param(self,event): … … 521 520 if self.cb1.GetValue()==True: 522 521 for item in self.parameters: 523 524 522 item[0].SetValue(True) 525 523 list= [item[0],item[1],item[2],item[3]] -
sansview/perspectives/fitting/fitting.py
r6f73a08 r00353b4 4 4 5 5 from copy import deepcopy 6 #from sans.guitools.plottables import Data1D, Theory1D7 #from sans.guitools.PlotPanel import PlotPanel8 6 from danse.common.plottools.plottables import Data1D, Theory1D, Data2D 7 8 from sans.guiframe.data_loader import MetaData1D, MetaTheory1D, MetaData2D 9 9 from danse.common.plottools.PlotPanel import PlotPanel 10 10 from sans.guicomm.events import NewPlotEvent, StatusEvent … … 84 84 self.graph=graph 85 85 for item in graph.plottables: 86 if item.__class__.__name__ is " Data2D":86 if item.__class__.__name__ is "MetaData2D": 87 87 return [["Fit Data2D", "Dialog with fitting parameters ", self._onSelect]] 88 88 else: 89 if item.name==graph.selected_plottable and item.__class__.__name__ is not "Theory1D": 90 return [["Select Data", "Dialog with fitting parameters ", self._onSelect]] 89 if item.name==graph.selected_plottable and (item.__class__.__name__ is "MetaData1D"or \ 90 item.__class__.__name__ is "Data1D" ): 91 return [["Fit Data1D", "Dialog with fitting parameters ", self._onSelect]] 91 92 return [] 92 93 … … 143 144 self.panel = event.GetEventObject() 144 145 for item in self.panel.graph.plottables: 145 if item.name == self.panel.graph.selected_plottable or item.__class__.__name__ is " Data2D":146 if item.name == self.panel.graph.selected_plottable or item.__class__.__name__ is "MetaData2D": 146 147 #find a name for the page created for notebook 147 148 try: … … 152 153 page = self.fit_panel.add_fit_page(name) 153 154 # add data associated to the page created 154 if item.__class__.__name__==' Data1D':155 if item.__class__.__name__=='MetaData1D' or item.__class__.__name__=='Data1D' : 155 156 new_item=FitData1D(item) 156 157 else: … … 484 485 data=fitdata.data 485 486 486 if data!=None and data.__class__.__name__ != ' Data2D':487 if data!=None and data.__class__.__name__ != 'MetaData2D': 487 488 theory = Theory1D(x=[], y=[]) 488 489 theory.name = "Model"
Note: See TracChangeset
for help on using the changeset viewer.