Changes in src/sas/sasgui/perspectives/calculator/resolution_calculator_panel.py [959eb01:7432acb] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/calculator/resolution_calculator_panel.py
r959eb01 r7432acb 656 656 event.Skip() 657 657 # Clear the plot 658 if self.image !=None:658 if self.image is not None: 659 659 self.image.clf() 660 660 # reset image … … 674 674 """ 675 675 # Skip event for next event 676 if event !=None:676 if event is not None: 677 677 event.Skip() 678 678 msg = "Please Check your input values " … … 708 708 # Validate the wave inputs 709 709 wave_input = self._validate_q_input(wavelength, wavelength_spread) 710 if wave_input !=None:710 if wave_input is not None: 711 711 wavelength, wavelength_spread = wave_input 712 712 … … 757 757 # Validate the q inputs 758 758 q_input = self._validate_q_input(self.qx, self.qy) 759 if q_input !=None:759 if q_input is not None: 760 760 self.qx, self.qy = q_input 761 761 … … 769 769 770 770 # Compute the resolution 771 if self.image !=None:771 if self.image is not None: 772 772 #_pylab_helpers.Gcf.set_active(self.fm) 773 773 _pylab_helpers.Gcf.figs = {} … … 839 839 : Param image: pylab object 840 840 """ 841 if image ==None:841 if image is None: 842 842 return 843 843 if color == 'g': … … 973 973 if len(qx) != len(qy): 974 974 return None 975 if qx == None or qy ==None:975 if qx is None or qy is None: 976 976 return None 977 977 return qx, qy … … 982 982 """ 983 983 # skip for another event 984 if event !=None:984 if event is not None: 985 985 event.Skip() 986 986 # init resolution_calculator … … 1148 1148 Set the detector coordinate for sigmas to x-y coordinate 1149 1149 """ 1150 if event !=None:1150 if event is not None: 1151 1151 event.Skip() 1152 1152 # Set the coordinate in Cartesian … … 1160 1160 Set the detector coordinate for sigmas to polar coordinate 1161 1161 """ 1162 if event !=None:1162 if event is not None: 1163 1163 event.Skip() 1164 1164 # Set the coordinate in polar … … 1181 1181 self.compute_button.SetLabel(label) 1182 1182 self.compute_button.SetToolTipString(label) 1183 if self.parent.parent !=None:1183 if self.parent.parent is not None: 1184 1184 wx.PostEvent(self.parent.parent, 1185 1185 StatusEvent(status=msg, type=type)) … … 1196 1196 On source combobox selection 1197 1197 """ 1198 if event !=None:1198 if event is not None: 1199 1199 combo = event.GetEventObject() 1200 1200 event.Skip() … … 1215 1215 On source color combobox selection 1216 1216 """ 1217 if event !=None:1217 if event is not None: 1218 1218 #combo = event.GetEventObject() 1219 1219 event.Skip() … … 1253 1253 On spectrum ComboBox event 1254 1254 """ 1255 if event !=None:1255 if event is not None: 1256 1256 #combo = event.GetEventObject() 1257 1257 event.Skip() … … 1261 1261 if selection == 'Add new': 1262 1262 path = self._selectDlg() 1263 if path ==None:1263 if path is None: 1264 1264 self.spectrum_cb.SetValue('Flat') 1265 1265 self.resolution.set_spectrum(self.spectrum_dic['Flat']) … … 1301 1301 """ 1302 1302 try: 1303 if path ==None:1303 if path is None: 1304 1304 wx.PostEvent(self.parent.parent, StatusEvent(status=\ 1305 1305 " Selected Distribution was not loaded: %s" % path)) … … 1348 1348 """ 1349 1349 _pylab_helpers.Gcf.figs = {} 1350 if self.manager !=None:1350 if self.manager is not None: 1351 1351 self.manager.cal_res_frame = None 1352 1352 self.Destroy()
Note: See TracChangeset
for help on using the changeset viewer.