- Timestamp:
- Apr 9, 2017 6:08:43 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:
- 7432acb
- Parents:
- 235f514
- Location:
- src/sas
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/fit/Loader.py
r235f514 rac07a3a 34 34 def set_values(self): 35 35 """ Store the values loaded from file in local variables""" 36 if not self.filename isNone:36 if self.filename is not None: 37 37 input_f = open(self.filename, 'r') 38 38 buff = input_f.read() -
src/sas/sascalc/pr/fit/Loader.py
r235f514 rac07a3a 34 34 def set_values(self): 35 35 """ Store the values loaded from file in local variables""" 36 if not self.filename isNone:36 if self.filename is not None: 37 37 input_f = open(self.filename, 'r') 38 38 buff = input_f.read() -
src/sas/sascalc/pr/invertor.py
r235f514 rac07a3a 395 395 Check q-value against user-defined range 396 396 """ 397 if not self.q_min isNone and q < self.q_min:397 if self.q_min is not None and q < self.q_min: 398 398 return False 399 if not self.q_max isNone and q > self.q_max:399 if self.q_max is not None and q > self.q_max: 400 400 return False 401 401 return True -
src/sas/sascalc/pr/num_term.py
r235f514 rac07a3a 159 159 scale = None 160 160 min_err = 0.0 161 if not path isNone:161 if path is not None: 162 162 input_f = open(path, 'r') 163 163 buff = input_f.read() -
src/sas/sasgui/guiframe/data_processor.py
r235f514 rac07a3a 1017 1017 if index - 1 >= 0: 1018 1018 new_row, _ = temp_list[index - 1] 1019 if n ot new_row isNone and new_row != ' ':1019 if new_row is not None and new_row != ' ': 1020 1020 label += create_label(col_name, None, 1021 1021 int(new_row) + 1) … … 1025 1025 if index + 1 < len(temp_list): 1026 1026 new_row, _ = temp_list[index + 1] 1027 if n ot new_row isNone:1027 if new_row is not None: 1028 1028 label += create_label(col_name, 1029 1029 int(new_row) + 1, None) -
src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py
r235f514 rac07a3a 618 618 # add menu of other plugins 619 619 item_list = self.parent.get_current_context_menu(self) 620 if ( not item_list is None) and (not len(item_list) == 0):620 if (item_list is not None) and (len(item_list)): 621 621 for item, wx_id in zip(item_list, [ids.next() for i in range(len(item_list))]): 622 623 622 try: 624 623 plot_menu.Append(wx_id, item[0], name) -
src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py
r235f514 rac07a3a 320 320 if len(self.data2D.detector) <= 1: 321 321 item_list = self.parent.get_current_context_menu(self) 322 if ( not item_list is None) and (not len(item_list) == 0) and\323 self.data2D.name.split(" ")[0] != 'Residuals' :322 if ((item_list is not None) and len(item_list) and 323 self.data2D.name.split(" ")[0] != 'Residuals'): 324 324 for item, wx_id in zip(item_list, [ids.next() for i in range(len(item_list))]): 325 325 try: … … 533 533 """ 534 534 ## Clear current slicer 535 if not self.slicer isNone:535 if self.slicer is not None: 536 536 self.slicer.clear() 537 537 ## Create a new slicer … … 719 719 Clear the slicer on the plot 720 720 """ 721 if not self.slicer isNone:721 if self.slicer is not None: 722 722 self.slicer.clear() 723 723 self.subplot.figure.canvas.draw() -
src/sas/sasgui/guiframe/local_perspectives/plotting/masking.py
r235f514 rac07a3a 249 249 Add new mask to old mask 250 250 """ 251 if not self.slicer isNone:251 if self.slicer is not None: 252 252 data = Data2D() 253 253 data = self.data -
src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py
r235f514 rac07a3a 1914 1914 return 1915 1915 self.sld_data = data 1916 enable = ( not data isNone)1916 enable = (data is not None) 1917 1917 self._set_omfpanel_sld_data(self.sld_data) 1918 1918 self.omfpanel.bt_save.Enable(enable) -
src/sas/sasgui/perspectives/pr/pr.py
r235f514 rac07a3a 291 291 """ 292 292 qtemp = pr.x 293 if not q isNone:293 if q is not None: 294 294 qtemp = q 295 295 … … 303 303 304 304 # Check for user min/max 305 if not pr.q_min isNone:305 if pr.q_min is not None: 306 306 minq = pr.q_min 307 if not pr.q_max isNone:307 if pr.q_max is not None: 308 308 maxq = pr.q_max 309 309 … … 487 487 scale = None 488 488 min_err = 0.0 489 if not path isNone:489 if path is not None: 490 490 input_f = open(path, 'r') 491 491 buff = input_f.read() … … 512 512 logger.error(sys.exc_value) 513 513 514 if not scale isNone:514 if scale is not None: 515 515 message = "The loaded file had no error bars, statistical errors are assumed." 516 516 wx.PostEvent(self.parent, StatusEvent(status=message)) … … 537 537 538 538 data_started = False 539 if not path isNone:539 if path is not None: 540 540 input_f = open(path, 'r') 541 541 buff = input_f.read() … … 565 565 data_started = True 566 566 567 if not scale isNone:567 if scale is not None: 568 568 message = "The loaded file had no error bars, statistical errors are assumed." 569 569 wx.PostEvent(self.parent, StatusEvent(status=message)) … … 761 761 self.elapsed = elapsed 762 762 self.control_panel.alpha_estimate = alpha 763 if not message isNone:763 if message is not None: 764 764 wx.PostEvent(self.parent, StatusEvent(status=str(message))) 765 765 self.perform_estimateNT() … … 779 779 self.control_panel.nterms_estimate = nterms 780 780 self.control_panel.alpha_estimate = alpha 781 if not message isNone:781 if message is not None: 782 782 wx.PostEvent(self.parent, StatusEvent(status=str(message))) 783 783 … … 921 921 try: 922 922 pr = self._create_plot_pr() 923 if not pr isNone:923 if pr is not None: 924 924 self.pr = pr 925 925 self.perform_inversion() … … 944 944 try: 945 945 pr = self._create_plot_pr() 946 if not pr isNone:946 if pr is not None: 947 947 self.pr = pr 948 948 self.perform_estimate() … … 1024 1024 try: 1025 1025 pr = self._create_file_pr(data) 1026 if not pr isNone:1026 if pr is not None: 1027 1027 self.pr = pr 1028 1028 self.perform_inversion() -
src/sas/sasgui/perspectives/pr/pr_thread.py
r235f514 rac07a3a 42 42 pass 43 43 except: 44 if not self.error_func isNone:44 if self.error_func is not None: 45 45 self.error_func("CalcPr.compute: %s" % sys.exc_value) 46 46 … … 70 70 pass 71 71 except: 72 if not self.error_func isNone:72 if self.error_func is not None: 73 73 self.error_func("EstimatePr.compute: %s" % sys.exc_value) 74 74 … … 110 110 pass 111 111 except: 112 if not self.error_func isNone:112 if self.error_func is not None: 113 113 self.error_func("EstimatePr2.compute: %s" % sys.exc_value) -
src/sas/sasgui/plottools/fittings.py
r235f514 rac07a3a 25 25 self.model = model 26 26 self.name = name 27 if not value isNone:27 if value is not None: 28 28 self.model.setParam(self.name, value) 29 29 -
src/sas/sasgui/plottools/plottable_interactor.py
r235f514 rac07a3a 50 50 l_width = markersize * 0.4 51 51 return self.step(x=x, y=y, color=color, label=label, width=l_width) 52 if not self.marker isNone:53 self.base.connect.clear([self.marker]) 54 self.color = self._color(color) 55 if self.markersize !=None:52 if self.marker is not None: 53 self.base.connect.clear([self.marker]) 54 self.color = self._color(color) 55 if self.markersize is not None: 56 56 markersize = self.markersize 57 57 # Convert tuple (lo,hi) to array [(x-lo),(hi-x)] -
src/sas/sasgui/plottools/plottables.py
r235f514 rac07a3a 229 229 if p.hidden == True: 230 230 continue 231 if not p.x isNone:231 if p.x is not None: 232 232 for x_i in p.x: 233 233 if min_value is None or x_i < min_value:
Note: See TracChangeset
for help on using the changeset viewer.