Changeset bfe4644 in sasview for sansview/perspectives/fitting/fitting.py
- Timestamp:
- Sep 17, 2009 8:21:56 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:
- 104f3da
- Parents:
- c5cd3b9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitting.py
r7ad6ff5 rbfe4644 277 277 @param return 278 278 """ 279 detector=None 280 source=None 279 281 280 info = None 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) 282 294 283 if hasattr(item ,"info"): 295 284 info= copy.deepcopy(item.info) 296 285 if hasattr(item,"id"): 297 286 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 287 288 data= Data1D(x=item.x, y=item.y,dx=None, dy=None) 289 data.copy_from_datainfo(item) 290 item.clone_without_data(clone=data) 291 data.dy= dy 306 292 data.name = item.name 307 data.detector = detector 308 data.source = source 293 309 294 ## allow to highlight data when plotted 310 295 data.interactive = copy.deepcopy(item.interactive) … … 314 299 ## to save data 1D as cansas xml file 315 300 data.info= info 316 ## If the data file does not tell us what the axes are, just assume...317 data.xaxis(copy.deepcopy(item._xaxis),copy.deepcopy(item._xunit))318 data.yaxis(copy.deepcopy(item._yaxis),copy.deepcopy(item._yunit))319 ##group_id specify on which panel to plot this data320 301 data.group_id = item.group_id 321 302 return data 322 303 323 304 def set_fit_range(self, page, qmin, qmax): 324 305 """ … … 409 390 410 391 smear =self.page_finder[current_pg].get_smearer() 411 self.draw_model( model=model, data= data, smearer= smear, 392 if model!= None: 393 self.draw_model( model=model, data= data, smearer= smear, 412 394 qmin= qmin, qmax= qmax) 413 395
Note: See TracChangeset
for help on using the changeset viewer.