Changeset 345e7e4 in sasview for src/sas/sasgui/guiframe/dataFitting.py
- Timestamp:
- Dec 19, 2016 7:23:36 AM (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:
- b61bd57
- Parents:
- f2724b6
- git-author:
- jhbakker <j.h.bakker@…> (12/19/16 07:23:36)
- git-committer:
- GitHub <noreply@…> (12/19/16 07:23:36)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/dataFitting.py
r1fac6c0 r345e7e4 17 17 """ 18 18 """ 19 def __init__(self, x=None, y=None, dx=None, dy=None , lam=None, dlam=None, isSesans=False):19 def __init__(self, x=None, y=None, dx=None, dy=None): 20 20 """ 21 21 """ … … 24 24 if y is None: 25 25 y = [] 26 self.isSesans = isSesans 27 PlotData1D.__init__(self, x, y, dx, dy, lam, dlam) 28 LoadData1D.__init__(self, x, y, dx, dy, lam, dlam, isSesans) 26 PlotData1D.__init__(self, x, y, dx, dy) 27 LoadData1D.__init__(self, x, y, dx, dy) 29 28 self.id = None 30 29 self.list_group_id = [] … … 69 68 # First, check the data compatibility 70 69 dy, dy_other = self._validity_check(other) 71 result = Data1D(x=[], y=[], lam=[], dx=None, dy=None, dlam=None)70 result = Data1D(x=[], y=[], dx=None, dy=None) 72 71 result.clone_without_data(length=len(self.x), clone=self) 73 72 result.copy_from_datainfo(data1d=self) … … 116 115 # First, check the data compatibility 117 116 self._validity_check_union(other) 118 result = Data1D(x=[], y=[], lam=[], dx=None, dy=None, dlam=None)117 result = Data1D(x=[], y=[], dx=None, dy=None) 119 118 tot_length = len(self.x) + len(other.x) 120 119 result = self.clone_without_data(length=tot_length, clone=result) 121 if self.dlam == None or other.dlam is None:122 result.dlam = None123 else:124 result.dlam = numpy.zeros(tot_length)125 120 if self.dy == None or other.dy is None: 126 121 result.dy = None … … 146 141 result.y = numpy.append(self.y, other.y) 147 142 result.y = result.y[ind] 148 result.lam = numpy.append(self.lam, other.lam)149 result.lam = result.lam[ind]150 if result.dlam != None:151 result.dlam = numpy.append(self.dlam, other.dlam)152 result.dlam = result.dlam[ind]153 143 if result.dy != None: 154 144 result.dy = numpy.append(self.dy, other.dy) … … 270 260 # First, check the data compatibility 271 261 self._validity_check_union(other) 272 result = Data1D(x=[], y=[], lam=[], dx=None, dy=None, dlam=[])262 result = Data1D(x=[], y=[], dx=None, dy=None) 273 263 tot_length = len(self.x)+len(other.x) 274 264 result.clone_without_data(length=tot_length, clone=self) 275 if self.dlam == None or other.dlam is None:276 result.dlam = None277 else:278 result.dlam = numpy.zeros(tot_length)279 265 if self.dy == None or other.dy is None: 280 266 result.dy = None … … 299 285 result.y = numpy.append(self.y, other.y) 300 286 result.y = result.y[ind] 301 result.lam = numpy.append(self.lam, other.lam)302 result.lam = result.lam[ind]303 287 if result.dy != None: 304 288 result.dy = numpy.append(self.dy, other.dy)
Note: See TracChangeset
for help on using the changeset viewer.