Changeset cce33b3 in sasview
- Timestamp:
- Feb 24, 2009 11:47:22 AM (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:
- 9fca3ea
- Parents:
- 18eba35
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage1D.py
rd63ef2f rcce33b3 571 571 #print "in smearer",self.enable_smearer.GetValue() 572 572 smear =None 573 msg="" 573 574 if self.enable_smearer.GetValue(): 574 575 from DataLoader.qsmearing import smear_selection 575 576 smear =smear_selection( self.data ) 577 if hasattr(self.data,"dxl"): 578 msg= ": Resolution smearing parameters" 579 if hasattr(self.data,"dxw"): 580 msg= ": Slit smearing parameters" 576 581 if smear ==None: 577 582 wx.PostEvent(self.manager.parent, StatusEvent(status=\ … … 579 584 else: 580 585 wx.PostEvent(self.manager.parent, StatusEvent(status=\ 581 "Data contains smearing information "))586 "Data contains smearing information %s"%msg)) 582 587 self.manager.set_smearer(smear) 583 588 -
sansview/perspectives/fitting/fitting.py
r2a8fac1 rcce33b3 199 199 """ 200 200 self.parent.set_perspective(self.perspective) 201 202 201 202 def copy_data(self, item, dy): 203 detector=None 204 source=None 205 dxl=None 206 dxw=None 207 if hasattr(item, "dxl"): 208 dxl = item.dxl 209 if hasattr(item, "dxw"): 210 dxw = item.dxw 211 if hasattr(item, "detector"): 212 detector =item.detector 213 if hasattr(item, "source"): 214 source =item.source 215 from sans.guiframe import dataFitting 216 data= dataFitting.Data1D(x=item.x, y=item.y, dy=dy, dxl=dxl, dxw=dxw) 217 data.name=item.name 218 data.detector=detector 219 data.source= source 220 return data 221 203 222 def _onSelect(self,event): 204 223 """ … … 212 231 if item.name in self.err_dy.iterkeys(): 213 232 dy= self.err_dy[item.name] 214 data= Data1D(x=item.x, y=item.y, dy=dy) 215 data.name=item.name 233 data= self.copy_data(item, dy) 234 else: 235 data= self.copy_data(item, dy) 216 236 else: 217 237 if item.dy==None: 218 238 dy= numpy.zeros(len(item.y)) 219 239 dy[dy==0]=1 220 print "dy", dy 221 data= Data1D(x=item.x, y=item.y, dy=dy) 222 data.name=item.name 240 data= self.copy_data(item, dy) 223 241 else: 224 data= Data1D(x=item.x, y=item.y, dy=item.dy) 225 data.name=item.name 242 data= self.copy_data(item, dy) 243 244 226 245 if item.name == self.panel.graph.selected_plottable or\ 227 246 item.__class__.__name__ is "Data2D":
Note: See TracChangeset
for help on using the changeset viewer.