Changeset 7caf3e5 in sasview for src/sas/sasgui/guiframe
- Timestamp:
- Feb 24, 2017 9:39:00 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:
- c221349
- Parents:
- 2ffe241 (diff), cb05bfd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Paul Kienzle <pkienzle@…> (02/24/17 09:39:00)
- git-committer:
- GitHub <noreply@…> (02/24/17 09:39:00)
- Location:
- src/sas/sasgui/guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/dataFitting.py
r345e7e4 r68adf86 17 17 """ 18 18 """ 19 def __init__(self, x=None, y=None, dx=None, dy=None): 19 20 def __init__(self, x=None, y=None, dx=None, dy=None, lam=None, dlam=None, isSesans=False): 20 21 """ 21 22 """ … … 24 25 if y is None: 25 26 y = [] 26 PlotData1D.__init__(self, x, y, dx, dy) 27 LoadData1D.__init__(self, x, y, dx, dy) 27 self.isSesans = isSesans 28 PlotData1D.__init__(self, x, y, dx, dy, lam, dlam) 29 LoadData1D.__init__(self, x, y, dx, dy, lam, dlam, isSesans) 30 28 31 self.id = None 29 32 self.list_group_id = [] … … 32 35 self.path = None 33 36 self.xtransform = None 37 if self.isSesans: 38 self.xtransform = "x" 34 39 self.ytransform = None 40 if self.isSesans: 41 self.ytransform = "y" 35 42 self.title = "" 36 43 self.scale = None … … 68 75 # First, check the data compatibility 69 76 dy, dy_other = self._validity_check(other) 70 result = Data1D(x=[], y=[], dx=None, dy=None)77 result = Data1D(x=[], y=[], lam=[], dx=None, dy=None, dlam=None) 71 78 result.clone_without_data(length=len(self.x), clone=self) 72 79 result.copy_from_datainfo(data1d=self) … … 115 122 # First, check the data compatibility 116 123 self._validity_check_union(other) 117 result = Data1D(x=[], y=[], dx=None, dy=None)124 result = Data1D(x=[], y=[], lam=[], dx=None, dy=None, dlam=None) 118 125 tot_length = len(self.x) + len(other.x) 119 126 result = self.clone_without_data(length=tot_length, clone=result) 127 if self.dlam == None or other.dlam is None: 128 result.dlam = None 129 else: 130 result.dlam = numpy.zeros(tot_length) 120 131 if self.dy == None or other.dy is None: 121 132 result.dy = None … … 141 152 result.y = numpy.append(self.y, other.y) 142 153 result.y = result.y[ind] 154 result.lam = numpy.append(self.lam, other.lam) 155 result.lam = result.lam[ind] 156 if result.dlam != None: 157 result.dlam = numpy.append(self.dlam, other.dlam) 158 result.dlam = result.dlam[ind] 143 159 if result.dy != None: 144 160 result.dy = numpy.append(self.dy, other.dy) … … 260 276 # First, check the data compatibility 261 277 self._validity_check_union(other) 262 result = Data1D(x=[], y=[], dx=None, dy=None)278 result = Data1D(x=[], y=[], lam=[], dx=None, dy=None, dlam=[]) 263 279 tot_length = len(self.x)+len(other.x) 264 280 result.clone_without_data(length=tot_length, clone=self) 281 if self.dlam == None or other.dlam is None: 282 result.dlam = None 283 else: 284 result.dlam = numpy.zeros(tot_length) 265 285 if self.dy == None or other.dy is None: 266 286 result.dy = None … … 285 305 result.y = numpy.append(self.y, other.y) 286 306 result.y = result.y[ind] 307 result.lam = numpy.append(self.lam, other.lam) 308 result.lam = result.lam[ind] 287 309 if result.dy != None: 288 310 result.dy = numpy.append(self.dy, other.dy) -
src/sas/sasgui/guiframe/data_manager.py
r345e7e4 r2ffe241 61 61 62 62 if issubclass(Data2D, data.__class__): 63 new_plot = Data2D(image=None, err_image=None) 64 else: 65 new_plot = Data1D(x=[], y=[], dx=None, dy=None) 66 63 new_plot = Data2D(image=None, err_image=None) # For now, isSesans for 2D data is always false 64 else: 65 new_plot = Data1D(x=[], y=[], dx=None, dy=None, lam=None, dlam=None, isSesans=data.isSesans) 66 67 68 #elif data.meta_data['loader'] == 'SESANS': 69 # new_plot = Data1D(x=[], y=[], dx=None, dy=None, lam=None, dlam=None, isSesans=True) 70 #else: 71 # new_plot = Data1D(x=[], y=[], dx=None, dy=None, lam=None, dlam=None) #SESANS check??? 72 67 73 new_plot.copy_from_datainfo(data) 68 74 data.clone_without_data(clone=new_plot)
Note: See TracChangeset
for help on using the changeset viewer.