Changeset 131791e in sasview for src/sas/sasgui
- Timestamp:
- Apr 7, 2017 9:47:34 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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 503eb52
- Parents:
- 4b402a1 (diff), 861f1880 (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
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/gui_manager.py
r64ca561 r49165488 2122 2122 """ 2123 2123 if custom_config is not None: 2124 sas_opencl = os.environ.get("SAS_OPENCL" ,None)2124 sas_opencl = os.environ.get("SAS_OPENCL") 2125 2125 new_config_lines = [] 2126 2126 config_file = open(custom_config.__file__) -
src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py
r463e7ffc rc1d5aea 92 92 if dlg.ShowModal() == wx.ID_OK: 93 93 file_list = dlg.GetPaths() 94 if len(file_list) >= 0 and not file_list[0] isNone:94 if len(file_list) >= 0 and file_list[0] is not None: 95 95 self._default_save_location = os.path.dirname(file_list[0]) 96 96 path = self._default_save_location -
src/sas/sasgui/guiframe/media/data_formats_help.rst
r98c44f3 r76c4469 86 86 87 87 - Spin echo length (z, in Angstroms) 88 - depolarization (:math:`log(P/P_0)/(lambda^2 * thickness)`, in Angstrom ^-1 cm^-1)88 - depolarization (:math:`log(P/P_0)/(lambda^2 * thickness)`, in Angstrom :sup:`-1` cm :sup:`-1`\ ) 89 89 - depolarization error in the same unit) (measurement error) 90 90 - Spin echo length error (:math:`\Delta`\ z, in Angstroms) (experimental resolution) -
src/sas/sasgui/perspectives/calculator/image_viewer.py
r25b9707a rc1d5aea 42 42 """ 43 43 parent = self.parent 44 if parent ==None:44 if parent is None: 45 45 location = os.getcwd() 46 46 else: 47 47 location = parent._default_save_location 48 48 path_list = self.choose_data_file(location=location) 49 if path_list ==None:49 if path_list is None: 50 50 return 51 if len(path_list) >= 0 and not(path_list[0]is None):52 if parent !=None:51 if len(path_list) >= 0 and path_list[0] is not None: 52 if parent is not None: 53 53 parent._default_save_location = os.path.dirname(path_list[0]) 54 54 err_msg = '' -
src/sas/sasgui/perspectives/pr/explore_dialog.py
r9c0f3c17 rf3bf622 269 269 # Note: by design, the output type should always be part of the 270 270 # results object. 271 if self.results.outputs.has_key(output_type):271 if output_type in self.results.outputs: 272 272 self.plotpanel.plot.x = self.results.d_max 273 273 self.plotpanel.plot.y = self.results.outputs[output_type][2] -
src/sas/sasgui/perspectives/pr/inversion_panel.py
r463e7ffc rc1d5aea 940 940 Choose a new input file for I(q) 941 941 """ 942 if not self._manager isNone:942 if self._manager is not None: 943 943 self.plot_data.SetValue(str(data.name)) 944 944 try: -
src/sas/sasgui/perspectives/pr/pr.py
r9c0f3c17 r861f1880 329 329 330 330 # If we have a group ID, use it 331 if pr.info.has_key("plot_group_id"):331 if 'plot_group_id' in pr.info: 332 332 new_plot.group_id = pr.info["plot_group_id"] 333 333 new_plot.id = IQ_FIT_LABEL … … 348 348 except: 349 349 err[i] = 1.0 350 print "Error getting error", value, x[i]350 print("Error getting error", value, x[i]) 351 351 352 352 new_plot = Data1D(x, y) … … 356 356 new_plot.yaxis("\\rm{Intensity} ", "cm^{-1}") 357 357 # If we have a group ID, use it 358 if pr.info.has_key("plot_group_id"):358 if 'plot_group_id' in pr.info: 359 359 new_plot.group_id = pr.info["plot_group_id"] 360 360 new_plot.id = IQ_SMEARED_LABEL … … 1047 1047 try: 1048 1048 pr = self._create_file_pr(data) 1049 if not pr isNone:1049 if pr is not None: 1050 1050 self.pr = pr 1051 1051 self.perform_estimate() -
src/sas/sasgui/plottools/LineModel.py
rdd5bf63 rec8886e 8 8 function should disappear in a future iteration (see notes in fitDialog) 9 9 10 -PDB July 10, 2016 10 PDB July 10, 2016 11 11 12 """ 12 13 … … 70 71 runXY is when the if statement is true. I however cannot see what that 71 72 function is for. It needs to be documented here or removed. 72 -PDB 7/10/1673 PDB 7/10/16 73 74 74 75 :param x: simple value … … 92 93 but the only difference between this and run is when the if 93 94 statement is true. I however cannot see what that function 94 is for. It needs to be documented here or removed. -PDB 7/10/1695 is for. It needs to be documented here or removed. PDB 7/10/16 95 96 96 97 :param x: simple value -
src/sas/sasgui/plottools/PlotPanel.py
r9c0f3c17 rc1d5aea 1403 1403 if self.scale == 'log_{10}': 1404 1404 self.scale = 'linear' 1405 if not self.zmin_2D isNone:1405 if self.zmin_2D is not None: 1406 1406 zmin_2D_temp = math.pow(10, self.zmin_2D) 1407 if not self.zmax_2D isNone:1407 if self.zmax_2D is not None: 1408 1408 zmax_2D_temp = math.pow(10, self.zmax_2D) 1409 1409 else: 1410 1410 self.scale = 'log_{10}' 1411 if not self.zmin_2D isNone:1411 if self.zmin_2D is not None: 1412 1412 # min log value: no log(negative) 1413 1413 if self.zmin_2D <= 0: … … 1415 1415 else: 1416 1416 zmin_2D_temp = math.log10(self.zmin_2D) 1417 if not self.zmax_2D isNone:1417 if self.zmax_2D is not None: 1418 1418 zmax_2D_temp = math.log10(self.zmax_2D) 1419 1419 -
src/sas/sasgui/perspectives/fitting/basepage.py
r9c0f3c17 r4b402a1 13 13 import traceback 14 14 15 from time import time 16 from Queue import Queue 17 from threading import Thread 15 18 from collections import defaultdict 16 19 from wx.lib.scrolledpanel import ScrolledPanel … … 239 242 self.set_layout() 240 243 244 # Setting up a thread for the fitting 245 self.threadedDrawQueue = Queue() 246 247 self.threadedDrawWorker = Thread(target = self._threaded_draw_worker, 248 args = (self.threadedDrawQueue,)) 249 self.threadedDrawWorker.setDaemon(True) 250 self.threadedDrawWorker.start() 251 252 # And a home for the thread submission times 253 self.lastTimeFitSubmitted = 0.00 254 241 255 def set_index_model(self, index): 242 256 """ … … 1691 1705 :param chisqr: update chisqr value [bool] 1692 1706 """ 1693 wx.CallAfter(self._draw_model_after, update_chisqr, source) 1707 # Get the time 1708 currentTime = time() 1709 1710 # When loading we slam a number of fits through here 1711 # let's filter these out to start with 1712 if currentTime > (self.lastTimeFitSubmitted + 0.1): 1713 # Submitting the rest 1714 self.threadedDrawQueue.put([update_chisqr, source]) 1715 print 'submitted!' 1716 else: 1717 pass 1718 1719 self.lastTimeFitSubmitted = currentTime 1720 1721 def _threaded_draw_worker(self, threadedDrawQueue): 1722 while True: 1723 # Check to see is a manager is running and a calc is running 1724 if ((self._manager.calc_1D is not None) and (self._manager.calc_1D.\ 1725 isrunning() == True)) or ((self._manager.calc_2D is not None)\ 1726 and (self._manager.calc_2D.isrunning() == True)): 1727 # If a manager is running a calculation 1728 # then trim the queue 1729 if self.threadedDrawQueue.qsize() > 1: 1730 print '2' 1731 for loopIter in range(threadedDrawQueue.qsize() - 1): 1732 dump = self.threadedDrawQueue.get() 1733 self.threadedDrawQueue.task_done() 1734 print 'bounced' 1735 print 'one element left' 1736 else: 1737 # Otherwise, just run 1738 inputVariables = threadedDrawQueue.get() 1739 self._draw_model_after(inputVariables[0], inputVariables[1]) 1740 wx.PostEvent(self._manager.parent, StatusEvent(status = 1741 "Computation is in progress...", type = "progress")) 1742 threadedDrawQueue.task_done() 1743 print 'run' 1694 1744 1695 1745 def _draw_model_after(self, update_chisqr=True, source='model'): … … 1714 1764 toggle_mode_on = self.model_view.IsEnabled() 1715 1765 is_2d = self._is_2D() 1766 1716 1767 self._manager.draw_model(self.model, 1717 1768 data=self.data,
Note: See TracChangeset
for help on using the changeset viewer.