Changeset 0d8ee36 in sasview for src/sas/sasgui/guiframe
- Timestamp:
- Apr 5, 2017 11:42:20 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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 3444492
- Parents:
- b697396b (diff), a2e980b (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. - Location:
- src/sas/sasgui/guiframe
- Files:
-
- 2 added
- 1 deleted
- 8 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/aboutbox.py
r49e000b r1779e72 118 118 self.bitmap_button_ansto = wx.BitmapButton(self, -1, wx.NullBitmap) 119 119 self.bitmap_button_tudelft = wx.BitmapButton(self, -1, wx.NullBitmap) 120 self.bitmap_button_dls = wx.BitmapButton(self, -1, wx.NullBitmap) 120 121 121 122 self.static_line_3 = wx.StaticLine(self, -1) … … 137 138 self.Bind(wx.EVT_BUTTON, self.onAnstoLogo, self.bitmap_button_ansto) 138 139 self.Bind(wx.EVT_BUTTON, self.onTudelftLogo, self.bitmap_button_tudelft) 140 self.Bind(wx.EVT_BUTTON, self.onDlsLogo, self.bitmap_button_dls) 139 141 # end wxGlade 140 142 # fill in acknowledgements … … 229 231 logo = wx.Bitmap(image) 230 232 self.bitmap_button_tudelft.SetBitmapLabel(logo) 233 234 image = file_dir + "/images/dls_logo.png" 235 if os.path.isfile(config._dls_logo): 236 image = config._dls_logo 237 logo = wx.Bitmap(image) 238 self.bitmap_button_dls.SetBitmapLabel(logo) 231 239 232 240 # resize dialog window to fit version number nicely … … 260 268 self.bitmap_button_ansto.SetSize(self.bitmap_button_ansto.GetBestSize()) 261 269 self.bitmap_button_tudelft.SetSize(self.bitmap_button_tudelft.GetBestSize()) 270 self.bitmap_button_dls.SetSize(self.bitmap_button_dls.GetBestSize()) 262 271 # end wxGlade 263 272 … … 325 334 sizer_logos.Add(self.bitmap_button_tudelft, 0, 326 335 wx.LEFT|wx.ADJUST_MINSIZE, 2) 336 sizer_logos.Add(self.bitmap_button_dls, 0, 337 wx.LEFT|wx.ADJUST_MINSIZE, 2) 327 338 328 339 sizer_logos.Add((10, 50), 0, wx.ADJUST_MINSIZE, 0) … … 423 434 event.Skip() 424 435 436 def onDlsLogo(self, event): 437 """ 438 """ 439 # wxGlade: DialogAbout.<event_handler> 440 launchBrowser(config._dls_url) 441 event.Skip() 442 425 443 # end of class DialogAbout 426 444 -
src/sas/sasgui/guiframe/config.py
rf9d1f60 r1779e72 46 46 47 47 _acknowledgement = \ 48 '''This work was originally developed as part of the DANSE project funded by the US NSF under Award DMR-0520547,\n but is currently maintained by a collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO and TU Delftand the scattering community.\n\n SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project (Grant No 654000).\nA list of individual contributors can be found at: https://github.com/orgs/SasView/people48 '''This work was originally developed as part of the DANSE project funded by the US NSF under Award DMR-0520547,\n but is currently maintained by a collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, DLS, and the scattering community.\n\n SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project (Grant No 654000).\nA list of individual contributors can be found at: https://github.com/orgs/SasView/people 49 49 ''' 50 50 … … 83 83 _ansto_url = "http://www.ansto.gov.au/" 84 84 _tudelft_url = "http://www.tnw.tudelft.nl/en/cooperation/facilities/reactor-instituut-delft/" 85 _dls_url = "http://www.diamond.ac.uk/" 85 86 _danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html" 86 87 _inst_url = "http://www.utk.edu" 87 88 _corner_image = os.path.join(icon_path, "angles_flat.png") 88 89 _welcome_image = os.path.join(icon_path, "SVwelcome.png") 89 _copyright = "(c) 2009 - 2017, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO and TU Delft"90 _copyright = "(c) 2009 - 2017, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, and DLS" 90 91 marketplace_url = "http://marketplace.sasview.org/" 91 92 -
src/sas/sasgui/guiframe/dataFitting.py
r68adf86 r9a5097c 3 3 """ 4 4 import copy 5 import numpy 5 import numpy as np 6 6 import math 7 7 from sas.sascalc.data_util.uncertainty import Uncertainty … … 81 81 result.dxw = None 82 82 else: 83 result.dxw = n umpy.zeros(len(self.x))83 result.dxw = np.zeros(len(self.x)) 84 84 if self.dxl == None: 85 85 result.dxl = None 86 86 else: 87 result.dxl = n umpy.zeros(len(self.x))87 result.dxl = np.zeros(len(self.x)) 88 88 89 89 for i in range(len(self.x)): … … 128 128 result.dlam = None 129 129 else: 130 result.dlam = n umpy.zeros(tot_length)130 result.dlam = np.zeros(tot_length) 131 131 if self.dy == None or other.dy is None: 132 132 result.dy = None 133 133 else: 134 result.dy = n umpy.zeros(tot_length)134 result.dy = np.zeros(tot_length) 135 135 if self.dx == None or other.dx is None: 136 136 result.dx = None 137 137 else: 138 result.dx = n umpy.zeros(tot_length)138 result.dx = np.zeros(tot_length) 139 139 if self.dxw == None or other.dxw is None: 140 140 result.dxw = None 141 141 else: 142 result.dxw = n umpy.zeros(tot_length)142 result.dxw = np.zeros(tot_length) 143 143 if self.dxl == None or other.dxl is None: 144 144 result.dxl = None 145 145 else: 146 result.dxl = n umpy.zeros(tot_length)147 148 result.x = n umpy.append(self.x, other.x)146 result.dxl = np.zeros(tot_length) 147 148 result.x = np.append(self.x, other.x) 149 149 #argsorting 150 ind = n umpy.argsort(result.x)150 ind = np.argsort(result.x) 151 151 result.x = result.x[ind] 152 result.y = n umpy.append(self.y, other.y)152 result.y = np.append(self.y, other.y) 153 153 result.y = result.y[ind] 154 result.lam = n umpy.append(self.lam, other.lam)154 result.lam = np.append(self.lam, other.lam) 155 155 result.lam = result.lam[ind] 156 156 if result.dlam != None: 157 result.dlam = n umpy.append(self.dlam, other.dlam)157 result.dlam = np.append(self.dlam, other.dlam) 158 158 result.dlam = result.dlam[ind] 159 159 if result.dy != None: 160 result.dy = n umpy.append(self.dy, other.dy)160 result.dy = np.append(self.dy, other.dy) 161 161 result.dy = result.dy[ind] 162 162 if result.dx is not None: 163 result.dx = n umpy.append(self.dx, other.dx)163 result.dx = np.append(self.dx, other.dx) 164 164 result.dx = result.dx[ind] 165 165 if result.dxw is not None: 166 result.dxw = n umpy.append(self.dxw, other.dxw)166 result.dxw = np.append(self.dxw, other.dxw) 167 167 result.dxw = result.dxw[ind] 168 168 if result.dxl is not None: 169 result.dxl = n umpy.append(self.dxl, other.dxl)169 result.dxl = np.append(self.dxl, other.dxl) 170 170 result.dxl = result.dxl[ind] 171 171 return result … … 230 230 result.dxw = None 231 231 else: 232 result.dxw = n umpy.zeros(len(self.x))232 result.dxw = np.zeros(len(self.x)) 233 233 if self.dxl == None: 234 234 result.dxl = None 235 235 else: 236 result.dxl = n umpy.zeros(len(self.x))237 238 for i in range(n umpy.size(self.x)):236 result.dxl = np.zeros(len(self.x)) 237 238 for i in range(np.size(self.x)): 239 239 result.x[i] = self.x[i] 240 240 if self.dx is not None and len(self.x) == len(self.dx): … … 282 282 result.dlam = None 283 283 else: 284 result.dlam = n umpy.zeros(tot_length)284 result.dlam = np.zeros(tot_length) 285 285 if self.dy == None or other.dy is None: 286 286 result.dy = None 287 287 else: 288 result.dy = n umpy.zeros(tot_length)288 result.dy = np.zeros(tot_length) 289 289 if self.dx == None or other.dx is None: 290 290 result.dx = None 291 291 else: 292 result.dx = n umpy.zeros(tot_length)292 result.dx = np.zeros(tot_length) 293 293 if self.dxw == None or other.dxw is None: 294 294 result.dxw = None 295 295 else: 296 result.dxw = n umpy.zeros(tot_length)296 result.dxw = np.zeros(tot_length) 297 297 if self.dxl == None or other.dxl is None: 298 298 result.dxl = None 299 299 else: 300 result.dxl = n umpy.zeros(tot_length)301 result.x = n umpy.append(self.x, other.x)300 result.dxl = np.zeros(tot_length) 301 result.x = np.append(self.x, other.x) 302 302 #argsorting 303 ind = n umpy.argsort(result.x)303 ind = np.argsort(result.x) 304 304 result.x = result.x[ind] 305 result.y = n umpy.append(self.y, other.y)305 result.y = np.append(self.y, other.y) 306 306 result.y = result.y[ind] 307 result.lam = n umpy.append(self.lam, other.lam)307 result.lam = np.append(self.lam, other.lam) 308 308 result.lam = result.lam[ind] 309 309 if result.dy != None: 310 result.dy = n umpy.append(self.dy, other.dy)310 result.dy = np.append(self.dy, other.dy) 311 311 result.dy = result.dy[ind] 312 312 if result.dx is not None: 313 result.dx = n umpy.append(self.dx, other.dx)313 result.dx = np.append(self.dx, other.dx) 314 314 result.dx = result.dx[ind] 315 315 if result.dxw is not None: 316 result.dxw = n umpy.append(self.dxw, other.dxw)316 result.dxw = np.append(self.dxw, other.dxw) 317 317 result.dxw = result.dxw[ind] 318 318 if result.dxl is not None: 319 result.dxl = n umpy.append(self.dxl, other.dxl)319 result.dxl = np.append(self.dxl, other.dxl) 320 320 result.dxl = result.dxl[ind] 321 321 return result … … 409 409 result.dqy_data = None 410 410 else: 411 result.dqx_data = n umpy.zeros(len(self.data))412 result.dqy_data = n umpy.zeros(len(self.data))413 for i in range(n umpy.size(self.data)):411 result.dqx_data = np.zeros(len(self.data)) 412 result.dqy_data = np.zeros(len(self.data)) 413 for i in range(np.size(self.data)): 414 414 result.data[i] = self.data[i] 415 415 if self.err_data is not None and \ 416 numpy.size(self.data) == numpy.size(self.err_data):416 np.size(self.data) == np.size(self.err_data): 417 417 result.err_data[i] = self.err_data[i] 418 418 if self.dqx_data is not None: … … 473 473 result.dqy_data = None 474 474 else: 475 result.dqx_data = n umpy.zeros(len(self.data) + \476 numpy.size(other.data))477 result.dqy_data = n umpy.zeros(len(self.data) + \478 numpy.size(other.data))479 480 result.data = n umpy.append(self.data, other.data)481 result.qx_data = n umpy.append(self.qx_data, other.qx_data)482 result.qy_data = n umpy.append(self.qy_data, other.qy_data)483 result.q_data = n umpy.append(self.q_data, other.q_data)484 result.mask = n umpy.append(self.mask, other.mask)475 result.dqx_data = np.zeros(len(self.data) + \ 476 np.size(other.data)) 477 result.dqy_data = np.zeros(len(self.data) + \ 478 np.size(other.data)) 479 480 result.data = np.append(self.data, other.data) 481 result.qx_data = np.append(self.qx_data, other.qx_data) 482 result.qy_data = np.append(self.qy_data, other.qy_data) 483 result.q_data = np.append(self.q_data, other.q_data) 484 result.mask = np.append(self.mask, other.mask) 485 485 if result.err_data is not None: 486 result.err_data = n umpy.append(self.err_data, other.err_data)486 result.err_data = np.append(self.err_data, other.err_data) 487 487 if self.dqx_data is not None: 488 result.dqx_data = n umpy.append(self.dqx_data, other.dqx_data)488 result.dqx_data = np.append(self.dqx_data, other.dqx_data) 489 489 if self.dqy_data is not None: 490 result.dqy_data = n umpy.append(self.dqy_data, other.dqy_data)490 result.dqy_data = np.append(self.dqy_data, other.dqy_data) 491 491 492 492 return result -
src/sas/sasgui/guiframe/data_processor.py
r468c253 r9a5097c 1091 1091 # When inputs are from an external file 1092 1092 return inputs, outputs 1093 inds = n umpy.lexsort((to_be_sort, to_be_sort))1093 inds = np.lexsort((to_be_sort, to_be_sort)) 1094 1094 for key in outputs.keys(): 1095 1095 key_list = outputs[key] … … 1379 1379 return 1380 1380 if dy == None: 1381 dy = n umpy.zeros(len(y))1381 dy = np.zeros(len(y)) 1382 1382 #plotting 1383 1383 new_plot = Data1D(x=x, y=y, dy=dy) -
src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py
r29e872e r9a5097c 14 14 import sys 15 15 import math 16 import numpy 16 import numpy as np 17 17 import logging 18 18 from sas.sasgui.plottools.PlotPanel import PlotPanel … … 288 288 :Param value: float 289 289 """ 290 idx = (n umpy.abs(array - value)).argmin()290 idx = (np.abs(array - value)).argmin() 291 291 return int(idx) # array.flat[idx] 292 292 -
src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py
rdfa1579 r0d8ee36 14 14 import sys 15 15 import math 16 import numpy 16 import numpy as np 17 17 import logging 18 18 from sas.sasgui.plottools.PlotPanel import PlotPanel … … 568 568 """ 569 569 # Find the best number of bins 570 npt = math.sqrt(len(self.data2D.data[n umpy.isfinite(self.data2D.data)]))570 npt = math.sqrt(len(self.data2D.data[np.isfinite(self.data2D.data)])) 571 571 npt = math.floor(npt) 572 572 from sas.sascalc.dataloader.manipulations import CircularAverage -
src/sas/sasgui/guiframe/local_perspectives/plotting/boxSlicer.py
rd85c194 r9a5097c 1 1 import wx 2 2 import math 3 import numpy 3 import numpy as np 4 4 from sas.sasgui.guiframe.events import NewPlotEvent 5 5 from sas.sasgui.guiframe.events import StatusEvent … … 358 358 # # Reset x, y- coordinates if send as parameters 359 359 if x != None: 360 self.x = n umpy.sign(self.x) * math.fabs(x)360 self.x = np.sign(self.x) * math.fabs(x) 361 361 if y != None: 362 self.y = n umpy.sign(self.y) * math.fabs(y)362 self.y = np.sign(self.y) * math.fabs(y) 363 363 # # Draw lines and markers 364 364 self.inner_marker.set(xdata=[0], ydata=[self.y]) … … 465 465 # # reset x, y -coordinates if given as parameters 466 466 if x != None: 467 self.x = n umpy.sign(self.x) * math.fabs(x)467 self.x = np.sign(self.x) * math.fabs(x) 468 468 if y != None: 469 self.y = n umpy.sign(self.y) * math.fabs(y)469 self.y = np.sign(self.y) * math.fabs(y) 470 470 # # draw lines and markers 471 471 self.inner_marker.set(xdata=[self.x], ydata=[0]) -
src/sas/sasgui/guiframe/local_perspectives/plotting/masking.py
rd85c194 r9a5097c 24 24 import math 25 25 import copy 26 import numpy 26 import numpy as np 27 27 from sas.sasgui.plottools.PlotPanel import PlotPanel 28 28 from sas.sasgui.plottools.plottables import Graph … … 298 298 self.subplot.set_ylim(self.data.ymin, self.data.ymax) 299 299 self.subplot.set_xlim(self.data.xmin, self.data.xmax) 300 mask = n umpy.ones(len(self.data.mask), dtype=bool)300 mask = np.ones(len(self.data.mask), dtype=bool) 301 301 self.data.mask = mask 302 302 # update mask plot … … 343 343 self.mask = mask 344 344 # make temperary data to plot 345 temp_mask = n umpy.zeros(len(mask))345 temp_mask = np.zeros(len(mask)) 346 346 temp_data = copy.deepcopy(self.data) 347 347 # temp_data default is None
Note: See TracChangeset
for help on using the changeset viewer.