Changeset 235f514 in sasview for src/sas/sasgui/guiframe/local_perspectives/plotting
- Timestamp:
- Apr 9, 2017 5:46:10 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:
- ac07a3a
- Parents:
- 5b2b04d
- Location:
- src/sas/sasgui/guiframe/local_perspectives/plotting
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/local_perspectives/plotting/AnnulusSlicer.py
rd85c194 r235f514 122 122 data = self.base.data2D 123 123 # If we have no data, just return 124 if data ==None:124 if data is None: 125 125 return 126 126 … … 132 132 # if the user does not specify the numbers of points to plot 133 133 # the default number will be nbins= 36 134 if nbins ==None:134 if nbins is None: 135 135 self.nbins = 36 136 136 else: … … 521 521 522 522 # If we have no data, just return 523 if data ==None:523 if data is None: 524 524 return 525 525 mask = data.mask -
src/sas/sasgui/guiframe/local_perspectives/plotting/Arc.py
r959eb01 r235f514 81 81 npts = int((self.theta2 - self.theta1) / (math.pi / 120)) 82 82 83 if r ==None:83 if r is None: 84 84 self.radius = math.sqrt(math.pow(self._mouse_x, 2) + \ 85 85 math.pow(self._mouse_y, 2)) -
src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py
r959eb01 r235f514 212 212 On Qmin Qmax vertical line event 213 213 """ 214 if event ==None:214 if event is None: 215 215 return 216 216 event.Skip() 217 217 active_ctrl = event.active 218 if active_ctrl ==None:218 if active_ctrl is None: 219 219 return 220 220 if hasattr(event, 'is_corfunc'): … … 231 231 colors.append('purple') 232 232 values.append(min(x_data.max(), float(ctrl[2].GetValue()))) 233 if self.ly ==None:233 if self.ly is None: 234 234 self.ly = [] 235 235 for c, v in zip(colors, values): … … 336 336 if hasattr(event, "action"): 337 337 dclick = event.action == 'dclick' 338 if ax ==None or dclick:338 if ax is None or dclick: 339 339 # remove the vline 340 340 self._check_zoom_plot() … … 361 361 Move the cursor line to write Q range 362 362 """ 363 if self.q_ctrl ==None:363 if self.q_ctrl is None: 364 364 return 365 365 # release a q range vline … … 370 370 return 371 371 ax = event.inaxes 372 if ax ==None or not hasattr(event, 'action'):372 if ax is None or not hasattr(event, 'action'): 373 373 return 374 374 end_drag = event.action != 'drag' and event.xdata != None … … 618 618 # add menu of other plugins 619 619 item_list = self.parent.get_current_context_menu(self) 620 if (not item_list ==None) and (not len(item_list) == 0):620 if (not item_list is None) and (not len(item_list) == 0): 621 621 for item, wx_id in zip(item_list, [ids.next() for i in range(len(item_list))]): 622 622 … … 811 811 curr_label = self.appearance_selected_plot.label 812 812 813 if curr_color ==None:813 if curr_color is None: 814 814 curr_color = self._color_labels['Blue'] 815 815 curr_symbol = 13 -
src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py
r959eb01 r235f514 144 144 """ 145 145 # Not implemented 146 if event ==None:146 if event is None: 147 147 return 148 148 event.Skip() … … 227 227 if self._is_changed_legend_label: 228 228 data.label = self.title_label 229 if data.label ==None:229 if data.label is None: 230 230 data.label = data.name 231 231 if not self.title_font: … … 320 320 if len(self.data2D.detector) <= 1: 321 321 item_list = self.parent.get_current_context_menu(self) 322 if (not item_list ==None) and (not len(item_list) == 0) and\322 if (not item_list is None) and (not len(item_list) == 0) and\ 323 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))]): … … 533 533 """ 534 534 ## Clear current slicer 535 if not self.slicer ==None:535 if not self.slicer is 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 ==None:721 if not self.slicer is None: 722 722 self.slicer.clear() 723 723 self.subplot.figure.canvas.draw() -
src/sas/sasgui/guiframe/local_perspectives/plotting/SectorSlicer.py
r959eb01 r235f514 144 144 data = self.base.data2D 145 145 # If we have no data, just return 146 if data ==None:146 if data is None: 147 147 return 148 148 ## Averaging … … 151 151 phimin = -self.left_line.phi + self.main_line.theta 152 152 phimax = self.left_line.phi + self.main_line.theta 153 if nbins ==None:153 if nbins is None: 154 154 nbins = 20 155 155 sect = SectorQ(r_min=0.0, r_max=radius, … … 364 364 if phi != None: 365 365 self.phi = phi 366 if delta ==None:366 if delta is None: 367 367 delta = 0 368 368 if right: -
src/sas/sasgui/guiframe/local_perspectives/plotting/SlicerParameters.py
rd85c194 r235f514 46 46 """ 47 47 event.Skip() 48 if event.obj_class ==None:48 if event.obj_class is None: 49 49 self.set_slicer(None, None) 50 50 else: … … 57 57 self.bck.Clear(True) 58 58 self.type = type 59 if type ==None:59 if type is None: 60 60 label = "Right-click on 2D plot for slicer options" 61 61 title = wx.StaticText(self, -1, label, style=wx.ALIGN_LEFT) -
src/sas/sasgui/guiframe/local_perspectives/plotting/boxSlicer.py
r959eb01 r235f514 139 139 140 140 """ 141 if self.direction ==None:141 if self.direction is None: 142 142 self.direction = direction 143 143 … … 149 149 if nbins != None: 150 150 self.nbins = nbins 151 if self.averager ==None:152 if new_slab ==None:151 if self.averager is None: 152 if new_slab is None: 153 153 msg = "post data:cannot average , averager is empty" 154 154 raise ValueError, msg -
src/sas/sasgui/guiframe/local_perspectives/plotting/detector_dialog.py
r959eb01 r235f514 90 90 zmin = self.reset_zmin_ctl 91 91 zmax = self.reset_zmax_ctl 92 if zmin ==None:92 if zmin is None: 93 93 zmin = "" 94 if zmax ==None:94 if zmax is None: 95 95 zmax = "" 96 96 self.zmin_ctl.SetValue(str(zmin)) -
src/sas/sasgui/guiframe/local_perspectives/plotting/masking.py
r959eb01 r235f514 249 249 Add new mask to old mask 250 250 """ 251 if not self.slicer ==None:251 if not self.slicer is None: 252 252 data = Data2D() 253 253 data = self.data … … 269 269 Erase new mask from old mask 270 270 """ 271 if not self.slicer ==None:271 if not self.slicer is None: 272 272 self.slicer_mask = self.slicer.update() 273 273 mask = self.data.mask … … 307 307 Clear the slicer on the plot 308 308 """ 309 if not self.slicer ==None:309 if not self.slicer is None: 310 310 self.slicer.clear() 311 311 self.subplot.figure.canvas.draw() -
src/sas/sasgui/guiframe/local_perspectives/plotting/plotting.py
r959eb01 r235f514 88 88 On Qmin Qmax vertical line event 89 89 """ 90 if event ==None:90 if event is None: 91 91 return 92 92 if event.id in self.plot_panels.keys(): … … 99 99 100 100 def _on_plot_lim(self, event=None): 101 if event ==None:101 if event is None: 102 102 return 103 103 if event.id in self.plot_panels.keys(): -
src/sas/sasgui/guiframe/local_perspectives/plotting/sector_mask.py
r959eb01 r235f514 117 117 data = self.base.data 118 118 # If we have no data, just return 119 if data ==None:119 if data is None: 120 120 return 121 121 ## Averaging -
src/sas/sasgui/guiframe/local_perspectives/plotting/slicerpanel.py
rd85c194 r235f514 37 37 self.bck = wx.GridBagSizer(5, 5) 38 38 self.SetSizer(self.bck) 39 if type == None and params ==None:39 if type is None and params is None: 40 40 label = "Right-click on 2D plot for slicer options" 41 41 title = wx.StaticText(self, -1, label, style=wx.ALIGN_LEFT) … … 57 57 """ 58 58 event.Skip() 59 if event.obj_class ==None:59 if event.obj_class is None: 60 60 self.set_slicer(None, None) 61 61 else: … … 68 68 self.bck.Clear(True) 69 69 self.type = type 70 if type ==None:70 if type is None: 71 71 label = "Right-click on 2D plot for slicer options" 72 72 title = wx.StaticText(self, -1, label, style=wx.ALIGN_LEFT)
Note: See TracChangeset
for help on using the changeset viewer.