Changeset 7988501 in sasview for src/sas/sasgui/guiframe
- Timestamp:
- Oct 8, 2016 2:34:03 PM (8 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 51a4d78
- Parents:
- 6df015de
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/dataFitting.py
rd85c194 r7988501 17 17 """ 18 18 """ 19 def __init__(self, x=None, y=None, dx=None, dy=None ):19 def __init__(self, x=None, y=None, dx=None, dy=None, lam=None, dlam=None): 20 20 """ 21 21 """ … … 24 24 if y is None: 25 25 y = [] 26 PlotData1D.__init__(self, x, y, dx, dy)27 LoadData1D.__init__(self, x, y, dx, dy)26 PlotData1D.__init__(self, x, y, lam, dx, dy, dlam) 27 LoadData1D.__init__(self, x, y, lam, dx, dy, dlam) 28 28 self.id = None 29 29 self.list_group_id = [] … … 68 68 # First, check the data compatibility 69 69 dy, dy_other = self._validity_check(other) 70 result = Data1D(x=[], y=[], dx=None, dy=None)70 result = Data1D(x=[], y=[], lam=[], dx=None, dy=None, dlam=None) 71 71 result.clone_without_data(length=len(self.x), clone=self) 72 72 result.copy_from_datainfo(data1d=self) … … 115 115 # First, check the data compatibility 116 116 self._validity_check_union(other) 117 result = Data1D(x=[], y=[], dx=None, dy=None)117 result = Data1D(x=[], y=[], lam=[], dx=None, dy=None, dlam=None) 118 118 tot_length = len(self.x) + len(other.x) 119 119 result = self.clone_without_data(length=tot_length, clone=result) 120 if self.dlam == None or other.dlam is None: 121 result.dlam = None 122 else: 123 result.dlam = numpy.zeros(tot_length) 120 124 if self.dy == None or other.dy is None: 121 125 result.dy = None … … 141 145 result.y = numpy.append(self.y, other.y) 142 146 result.y = result.y[ind] 147 result.lam = numpy.append(self.lam, other.lam) 148 result.lam = result.lam[ind] 149 if result.dlam != None: 150 result.dlam = numpy.append(self.dlam, other.dlam) 151 result.dlam = result.dlam[ind] 143 152 if result.dy != None: 144 153 result.dy = numpy.append(self.dy, other.dy) … … 260 269 # First, check the data compatibility 261 270 self._validity_check_union(other) 262 result = Data1D(x=[], y=[], dx=None, dy=None)271 result = Data1D(x=[], y=[], lam=[], dx=None, dy=None, dlam=[]) 263 272 tot_length = len(self.x)+len(other.x) 264 273 result.clone_without_data(length=tot_length, clone=self) 274 if self.dlam == None or other.dlam is None: 275 result.dlam = None 276 else: 277 result.dlam = numpy.zeros(tot_length) 265 278 if self.dy == None or other.dy is None: 266 279 result.dy = None … … 285 298 result.y = numpy.append(self.y, other.y) 286 299 result.y = result.y[ind] 300 result.lam = numpy.append(self.lam, other.lam) 301 result.lam = result.lam[ind] 287 302 if result.dy != None: 288 303 result.dy = numpy.append(self.dy, other.dy)
Note: See TracChangeset
for help on using the changeset viewer.