Changeset f71c2de in sasview
- Timestamp:
- Apr 9, 2010 10:45:12 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:
- ba535a6
- Parents:
- e0e873b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitting.py
re0e873b rf71c2de 197 197 return [[fit_option, fit_hint, self._onSelect]] 198 198 else: 199 if item.name==graph.selected_plottable : 200 if item.name !="$I_{obs}(q)$" and item.name !="$P_{fit}(r)$": 201 if hasattr(item, "group_id"): 202 # if is_data is true , this in an actual data loaded 203 #else it is a data created from a theory model 204 if hasattr(item,"is_data"): 205 if item.is_data: 206 return [[fit_option, fit_hint, 207 self._onSelect]] 208 else: 209 return [] 199 if item.name == graph.selected_plottable : 200 if item.name in ["$I_{obs}(q)$","$I_{fit}(q)$","$P_{fit}(r)$"]: 201 return [] 202 if hasattr(item, "group_id"): 203 # if is_data is true , this in an actual data loaded 204 #else it is a data created from a theory model 205 if hasattr(item,"is_data"): 206 if item.is_data: 207 return [[fit_option, fit_hint, 208 self._onSelect]] 210 209 else: 211 return [[fit_option, fit_hint, self._onSelect]] 210 return [] 211 else: 212 return [[fit_option, fit_hint, self._onSelect]] 212 213 return [] 213 214 … … 566 567 if not class_name in ["Data1D", "Theory1D"]: 567 568 raise ValueError, "create_fittable_data1D expects Data1D" 568 #For prview the theory is not a subclass of DataLoader.Data1D 569 #if not issubclass(data.__class__, LoaderData1D): must be used 570 #for checking 571 if not hasattr(data, "is_data"): 572 if class_name == 'Theory1D': 573 temp_data = Theory1D(x=data.x, y=data.y, dy=data.y) 574 temp_data.copy_from_datainfo(data1d=data) 575 temp_data.name = data.name 576 data = temp_data 577 if class_name == 'Data1D': 578 temp_data = Data1D(x=data.x, y=data.y, dx=data.dx, dy=data.y) 579 temp_data.copy_from_datainfo(data1d=data) 580 temp_data.name = data.name 581 data = temp_data 582 569 583 570 #get the appropriate dy 584 571 dy = deepcopy(data.dy) … … 597 584 reset=True)) 598 585 else: 599 new_data = self.copy_data(data, dy) 586 new_data = self.copy_data(data, dy) 587 new_data.id = data.id 600 588 new_data.is_data = True 601 589 return new_data
Note: See TracChangeset
for help on using the changeset viewer.