Changeset 7988501 in sasview for src/sas/sasgui
- 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
- Location:
- src/sas/sasgui
- Files:
-
- 4 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) -
src/sas/sasgui/perspectives/fitting/basepage.py
r6df015de r7988501 282 282 num=self.npts_x, endpoint=True) 283 283 self.data = Data1D(x=x) 284 self.data.xaxis('\\rm{Q}', "A^{-1}") 285 self.data.yaxis('\\rm{Intensity}', "cm^{-1}") 284 #self.data.xaxis('\\rm{Q}', "A^{-1}") 285 self.data.xaxis('\\rm{X}', "") 286 #self.data.yaxis('\\rm{Intensity}', "cm^{-1}") 287 self.data.yaxis('\\rm{Y}', "") 286 288 self.data.is_data = False 287 289 self.data.id = str(self.uid) + " data" … … 308 310 num=self.npts_x, endpoint=True, base=10.0) 309 311 self.data = Data1D(x=x) 310 self.data.xaxis('\\rm{Q}', "A^{-1}") 311 self.data.yaxis('\\rm{Intensity}', "cm^{-1}") 312 #self.data.xaxis('\\rm{Q}', "A^{-1}") 313 #self.data.yaxis('\\rm{Intensity}', "cm^{-1}") 314 self.data.xaxis('\\rm{X}', "") 315 self.data.yaxis('\\rm{Y}', "") 312 316 self.data.is_data = False 313 317 self.data.id = str(self.uid) + " data" -
src/sas/sasgui/perspectives/fitting/fitpage.py
r6df015de r7988501 98 98 def onTrafo(self, event): 99 99 """ 100 On Weighting radio button event, sets the weightbt_string100 On Trafo radio button event, sets the Trafobt_string 101 101 """ 102 102 self.Trafobt_string = event.GetEventObject().GetLabelText() … … 120 120 self.no_transform = wx.RadioButton(self, wx.ID_ANY, 121 121 'None', style=wx.RB_GROUP) 122 self.Bind(wx.EVT_RADIOBUTTON, self.onTrafo, 123 id=self.no_transform.GetId()) 122 123 #self.Bind(wx.EVT_RADIOBUTTON, self.onTrafo, 124 # id=self.no_transform.GetId()) 124 125 self.hankel = wx.RadioButton(self, wx.ID_ANY, 125 126 'Hankel') 126 self.Bind(wx.EVT_RADIOBUTTON, self.onTrafo,127 id=self.hankel.GetId())127 #self.Bind(wx.EVT_RADIOBUTTON, self.onTrafo, 128 # id=self.hankel.GetId()) 128 129 self.cosine = wx.RadioButton(self, wx.ID_ANY, 129 130 'Cosine') 130 self.Bind(wx.EVT_RADIOBUTTON, self.onTrafo,131 id=self.cosine.GetId())131 #self.Bind(wx.EVT_RADIOBUTTON, self.onTrafo, 132 # id=self.cosine.GetId()) 132 133 133 134 #Not sure about this (only once though) -
src/sas/sasgui/plottools/plottables.py
r8abd96d r7988501 1022 1022 """ 1023 1023 1024 def __init__(self, x, y, dx=None, dy=None):1024 def __init__(self, x, y, lam=None, dx=None, dy=None, dlam=None): 1025 1025 """ 1026 1026 Draw points specified by x[i],y[i] in the current color/symbol. … … 1036 1036 self.x = x 1037 1037 self.y = y 1038 self.lam = lam 1038 1039 self.dx = dx 1039 1040 self.dy = dy 1041 self.dlam = dlam 1040 1042 self.source = None 1041 1043 self.detector = None
Note: See TracChangeset
for help on using the changeset viewer.