Changeset c202d03 in sasview for sansview/perspectives/fitting
- Timestamp:
- Sep 17, 2009 11:31:05 AM (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:
- 904168e1
- Parents:
- e5664f2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitting.py
rb2f4f83 rc202d03 13 13 import time 14 14 import thread 15 from danse.common.plottools.plottables import Theory1D15 #from danse.common.plottools.plottables import Theory1D 16 16 from danse.common.plottools.PlotPanel import PlotPanel 17 17 18 18 from sans.guiframe.dataFitting import Data2D 19 19 from sans.guiframe.dataFitting import Data1D 20 from sans.guiframe.dataFitting import Theory1D 20 21 from sans.guiframe import dataFitting 21 22 … … 277 278 @param return 278 279 """ 279 detector=None 280 source=None 281 info = None 280 282 281 id=None 283 dxl=None 284 dxw=None 285 dx=None 286 if hasattr(item, "dxl"): 287 dxl = copy.deepcopy(item.dxl) 288 if hasattr(item, "dxw"): 289 dxw = copy.deepcopy(item.dxw) 290 if hasattr(item, "detector"): 291 detector = copy.deepcopy(item.detector) 292 if hasattr(item, "source"): 293 source = copy.deepcopy(item.source) 294 if hasattr(item ,"info"): 295 info= copy.deepcopy(item.info) 282 296 283 if hasattr(item,"id"): 297 284 id = copy.deepcopy(item.id) 298 if hasattr(item, "dx"): 299 dx= item.dx 300 301 302 data= Data1D(x=item.x, y=item.y,dx=dx, dy=dy) 303 data.dxl = dxl 304 data.dxw = dxw 305 285 286 287 data= Data1D(x=item.x, y=item.y,dx=None, dy=None) 288 data.copy_from_datainfo(item) 289 item.clone_without_data(clone=data) 290 data.dy=dy 306 291 data.name = item.name 307 if detector!=None: 308 data.detector = detector 309 if source!=None: 310 data.source = source 292 311 293 ## allow to highlight data when plotted 312 294 data.interactive = copy.deepcopy(item.interactive) 313 295 ## when 2 data have the same id override the 1 st plotted 314 296 data.id = id 315 ## info is a reference to output of dataloader that can be used316 ## to save data 1D as cansas xml file317 data.info= info318 ## If the data file does not tell us what the axes are, just assume...319 data.xaxis(copy.deepcopy(item._xaxis),copy.deepcopy(item._xunit))320 data.yaxis(copy.deepcopy(item._yaxis),copy.deepcopy(item._yunit))321 297 322 298 data.group_id = item.group_id … … 1099 1075 new_plot.is_data =False 1100 1076 1101 from DataLoader import data_info 1102 info= Data1D(x= new_plot.x, y=new_plot.y) 1103 info.title= new_plot.name 1104 title= my_info.title 1105 info.xaxis(new_plot._xaxis, new_plot._xunit) 1106 info.yaxis( new_plot._yaxis, new_plot._yunit) 1107 new_plot.info = info 1077 1078 title= new_plot.name 1079 1108 1080 # Pass the reset flag to let the plotting event handler 1109 1081 # know that we are replacing the whole plot
Note: See TracChangeset
for help on using the changeset viewer.