Ignore:
Timestamp:
Apr 11, 2017 9:51:05 AM (7 years ago)
Author:
krzywon
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:
beba407
Parents:
7f75a3f (diff), 97c60f8 (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.
git-author:
Jeff Krzywon <krzywon@…> (04/11/17 09:51:05)
git-committer:
krzywon <krzywon@…> (04/11/17 09:51:05)
Message:

Merge branch 'master' into ticket-876

# Conflicts:
# src/sas/sascalc/dataloader/readers/ascii_reader.py
# src/sas/sascalc/dataloader/readers/xml_reader.py

Location:
src/sas/sasgui/guiframe/local_perspectives
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py

    r7f75a3f r278ddee  
    77import wx 
    88import logging 
     9 
     10logger = logging.getLogger(__name__) 
    911 
    1012from sas.sascalc.dataloader.loader import Loader 
     
    7375        path = None 
    7476        self._default_save_location = self.parent._default_save_location 
    75         if self._default_save_location == None: 
     77        if self._default_save_location is None: 
    7678            self._default_save_location = os.getcwd() 
    7779 
     
    9092        if dlg.ShowModal() == wx.ID_OK: 
    9193            file_list = dlg.GetPaths() 
    92             if len(file_list) >= 0 and not file_list[0] is None: 
     94            if len(file_list) >= 0 and file_list[0] is not None: 
    9395                self._default_save_location = os.path.dirname(file_list[0]) 
    9496                path = self._default_save_location 
     
    160162                message += "\tError: {0}\n".format(error_data) 
    161163        else: 
    162             logging.error("Loader returned an invalid object:\n %s" % str(item)) 
     164            logger.error("Loader returned an invalid object:\n %s" % str(item)) 
    163165            data_error = True 
    164166 
     
    191193                log_msg += "Please try to open that file from \"open project\"" 
    192194                log_msg += "or \"open analysis\" menu." 
    193                 logging.info(log_msg) 
     195                logger.info(log_msg) 
    194196                file_errors[basename] = [log_msg] 
    195197                continue 
     
    227229                                   info="warning") 
    228230            except: 
    229                 logging.error(sys.exc_value) 
     231                logger.error(sys.exc_value) 
    230232 
    231233                error_message = "The Data file you selected could not be " 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/AnnulusSlicer.py

    rd85c194 r7432acb  
    122122        data = self.base.data2D 
    123123        # If we have no data, just return 
    124         if data == None: 
     124        if data is None: 
    125125            return 
    126126 
     
    132132        # if the user does not specify the numbers of points to plot 
    133133        # the default number will be nbins= 36 
    134         if nbins == None: 
     134        if nbins is None: 
    135135            self.nbins = 36 
    136136        else: 
     
    498498        # Update locations 
    499499        self.outer_circle.update() 
    500         # if self.is_inside != None: 
     500        # if self.is_inside is not None: 
    501501        out = self._post_data() 
    502502        return out 
     
    521521 
    522522        # If we have no data, just return 
    523         if data == None: 
     523        if data is None: 
    524524            return 
    525525        mask = data.mask 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/Arc.py

    rd85c194 r7432acb  
    7171        x = [] 
    7272        y = [] 
    73         if theta1 != None: 
     73        if theta1 is not None: 
    7474            self.theta1 = theta1 
    75         if theta2 != None: 
     75        if theta2 is not None: 
    7676            self.theta2 = theta2 
    7777        while self.theta2 < self.theta1: 
     
    8181        npts = int((self.theta2 - self.theta1) / (math.pi / 120)) 
    8282 
    83         if r == None: 
     83        if r is None: 
    8484            self.radius = math.sqrt(math.pow(self._mouse_x, 2) + \ 
    8585                                     math.pow(self._mouse_y, 2)) 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/Edge.py

    rd85c194 r7432acb  
    6363        Draw the new roughness on the graph. 
    6464        """ 
    65         if r1 != None: 
     65        if r1 is not None: 
    6666            self.r1 = r1 
    67         if r2 != None: 
     67        if r2 is not None: 
    6868            self.r2 = r2 
    69         if theta != None: 
     69        if theta is not None: 
    7070            self.theta = theta 
    7171        x1 = self.r1 * math.cos(self.theta) 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py

    r9a5097c r7432acb  
    2424from appearanceDialog import appearanceDialog 
    2525from graphAppearance import graphAppearance 
     26 
     27logger = logging.getLogger(__name__) 
    2628 
    2729DEFAULT_QMAX = 0.05 
     
    181183        # So manually recode the size (=x_size) and compare here. 
    182184        # Massy code to work around:< 
    183         if self.parent._mgr != None: 
     185        if self.parent._mgr is not None: 
    184186            max_panel = self.parent._mgr.GetPane(self) 
    185187            if max_panel.IsMaximized(): 
    186188                self.parent._mgr.RestorePane(max_panel) 
    187189                max_panel.Maximize() 
    188         if self.x_size != None: 
     190        if self.x_size is not None: 
    189191            if self.x_size == self.GetSize(): 
    190192                self.resizing = False 
     
    210212        On Qmin Qmax vertical line event 
    211213        """ 
    212         if event == None: 
     214        if event is None: 
    213215            return 
    214216        event.Skip() 
    215217        active_ctrl = event.active 
    216         if active_ctrl == None: 
     218        if active_ctrl is None: 
    217219            return 
    218220        if hasattr(event, 'is_corfunc'): 
     
    229231                colors.append('purple') 
    230232                values.append(min(x_data.max(), float(ctrl[2].GetValue()))) 
    231             if self.ly == None: 
     233            if self.ly is None: 
    232234                self.ly = [] 
    233235                for c, v in zip(colors, values): 
     
    239241                xval = float(active_ctrl.GetValue()) 
    240242                position = self.get_data_xy_vals(xval) 
    241                 if position != None and not self.is_corfunc: 
     243                if position is not None and not self.is_corfunc: 
    242244                    wx.PostEvent(self.parent, StatusEvent(status=position)) 
    243245            except: 
    244                 logging.error(sys.exc_value) 
     246                logger.error(sys.exc_value) 
    245247            if not event.leftdown: 
    246248                # text event 
     
    255257                        self.canvas.draw() 
    256258                except: 
    257                     logging.error(sys.exc_value) 
     259                    logger.error(sys.exc_value) 
    258260                event.Skip() 
    259261                return 
     
    334336        if hasattr(event, "action"): 
    335337            dclick = event.action == 'dclick' 
    336             if ax == None or dclick: 
     338            if ax is None or dclick: 
    337339                # remove the vline 
    338340                self._check_zoom_plot() 
     
    340342                self.q_ctrl = None 
    341343                return 
    342         if self.ly != None and event.xdata != None: 
     344        if self.ly is not None and event.xdata is not None: 
    343345            # Selecting a new line if cursor lines are displayed already 
    344346            dqmin = math.fabs(event.xdata - self.ly[0].get_xdata()) 
     
    359361        Move the cursor line to write Q range 
    360362        """ 
    361         if self.q_ctrl == None: 
     363        if self.q_ctrl is None: 
    362364            return 
    363365        # release a q range vline 
    364         if self.ly != None and not self.leftdown: 
     366        if self.ly is not None and not self.leftdown: 
    365367            for ly in self.ly: 
    366368                ly.set_alpha(0.7) 
     
    368370            return 
    369371        ax = event.inaxes 
    370         if ax == None or not hasattr(event, 'action'): 
     372        if ax is None or not hasattr(event, 'action'): 
    371373            return 
    372         end_drag = event.action != 'drag' and event.xdata != None 
     374        end_drag = event.action != 'drag' and event.xdata is not None 
    373375        nop = len(self.plots) 
    374376        pos_x, _ = float(event.xdata), float(event.ydata) 
     
    409411            self.q_ctrl[vl_ind].SetValue(str(pos_x)) 
    410412        except: 
    411             logging.error(sys.exc_value) 
     413            logger.error(sys.exc_value) 
    412414 
    413415    def set_resizing(self, resizing=False): 
     
    512514        ax = event.inaxes 
    513515        PlotPanel.onLeftDown(self, event) 
    514         if ax != None: 
     516        if ax is not None: 
    515517            try: 
    516518                pos_x = float(event.xdata)  # / size_x 
     
    616618            # add menu of other plugins 
    617619            item_list = self.parent.get_current_context_menu(self) 
    618             if (not item_list == None) and (not len(item_list) == 0): 
     620            if (item_list is not None) and (len(item_list)): 
    619621                for item, wx_id in zip(item_list, [ids.next() for i in range(len(item_list))]): 
    620  
    621622                    try: 
    622623                        plot_menu.Append(wx_id, item[0], name) 
     
    682683 
    683684 
    684         if self.position != None: 
     685        if self.position is not None: 
    685686            wx_id = ids.next() 
    686687            self._slicerpop.Append(wx_id, '&Add Text') 
     
    759760            default_name = default_name.split('.')[0] 
    760761        default_name += "_out" 
    761         if self.parent != None: 
     762        if self.parent is not None: 
    762763            self.parent.save_data1d(data, default_name) 
    763764 
     
    777778            default_name = default_name.split('.')[0] 
    778779        # default_name += "_out" 
    779         if self.parent != None: 
     780        if self.parent is not None: 
    780781            self.parent.show_data1d(data, default_name) 
    781782 
     
    809810        curr_label = self.appearance_selected_plot.label 
    810811 
    811         if curr_color == None: 
     812        if curr_color is None: 
    812813            curr_color = self._color_labels['Blue'] 
    813814            curr_symbol = 13 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py

    r9a5097c r7432acb  
    3030from graphAppearance import graphAppearance 
    3131(InternalEvent, EVT_INTERNAL) = wx.lib.newevent.NewEvent() 
     32 
     33logger = logging.getLogger(__name__) 
    3234 
    3335DEFAULT_QMAX = 0.05 
     
    142144        """ 
    143145        # Not implemented 
    144         if event == None: 
     146        if event is None: 
    145147            return 
    146148        event.Skip() 
     
    154156        PlotPanel.onLeftDown(self, event) 
    155157        ax = event.inaxes 
    156         if ax != None: 
     158        if ax is not None: 
    157159            # data coordinate position 
    158160            pos_x = "%8.3g" % event.xdata 
     
    225227        if self._is_changed_legend_label: 
    226228            data.label = self.title_label 
    227         if data.label == None: 
     229        if data.label is None: 
    228230            data.label = data.name 
    229231        if not self.title_font: 
     
    262264        # control axis labels from the panel itself 
    263265        yname, yunits = data.get_yaxis() 
    264         if self.yaxis_label != None: 
     266        if self.yaxis_label is not None: 
    265267            yname = self.yaxis_label 
    266268            yunits = self.yaxis_unit 
     
    269271            self.yaxis_unit = yunits 
    270272        xname, xunits = data.get_xaxis() 
    271         if self.xaxis_label != None: 
     273        if self.xaxis_label is not None: 
    272274            xname = self.xaxis_label 
    273275            xunits = self.xaxis_unit 
     
    318320        if len(self.data2D.detector) <= 1: 
    319321            item_list = self.parent.get_current_context_menu(self) 
    320             if (not item_list == None) and (not len(item_list) == 0) and\ 
    321                 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'): 
    322324                for item, wx_id in zip(item_list, [ids.next() for i in range(len(item_list))]): 
    323325                    try: 
     
    353355            slicerpop.Append(wx_id, '&Box Averaging in Qy') 
    354356            wx.EVT_MENU(self, wx_id, self.onBoxavgY) 
    355             if self.slicer != None: 
     357            if self.slicer is not None: 
    356358                wx_id = ids.next() 
    357359                slicerpop.Append(wx_id, '&Clear Slicer') 
     
    432434            except: 
    433435                msg = "Add Text: Error. Check your property values..." 
    434                 logging.error(msg) 
    435                 if self.parent != None: 
     436                logger.error(msg) 
     437                if self.parent is not None: 
    436438                    wx.PostEvent(self.parent, StatusEvent(status=msg)) 
    437439        dial.Destroy() 
     
    531533        """ 
    532534        ## Clear current slicer 
    533         if not self.slicer == None: 
     535        if self.slicer is not None: 
    534536            self.slicer.clear() 
    535537        ## Create a new slicer 
     
    627629 
    628630        """ 
    629         if self.slicer != None: 
     631        if self.slicer is not None: 
    630632            from SlicerParameters import SlicerParameterPanel 
    631633            dialog = SlicerParameterPanel(self, -1, "Slicer Parameters") 
     
    717719        Clear the slicer on the plot 
    718720        """ 
    719         if not self.slicer == None: 
     721        if self.slicer is not None: 
    720722            self.slicer.clear() 
    721723            self.subplot.figure.canvas.draw() 
     
    733735        """ 
    734736        event_id = str(evt.GetId()) 
    735         if self.parent != None: 
     737        if self.parent is not None: 
    736738            self._default_save_location = self.parent._default_save_location 
    737739        default_name = self.plots[self.graph.selected_plottable].label 
     
    757759            default_name = default_name.split('.')[0] 
    758760        #default_name += "_out" 
    759         if self.parent != None: 
     761        if self.parent is not None: 
    760762            self.parent.show_data2d(data, default_name) 
    761763 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/SectorSlicer.py

    rd85c194 r7432acb  
    144144        data = self.base.data2D 
    145145        # If we have no data, just return 
    146         if data == None: 
     146        if data is None: 
    147147            return 
    148148        ## Averaging 
     
    151151        phimin = -self.left_line.phi + self.main_line.theta 
    152152        phimax = self.left_line.phi + self.main_line.theta 
    153         if nbins == None: 
     153        if nbins is None: 
    154154            nbins = 20 
    155155        sect = SectorQ(r_min=0.0, r_max=radius, 
     
    362362        self.left_moving = left 
    363363        theta3 = 0 
    364         if phi != None: 
     364        if phi is not None: 
    365365            self.phi = phi 
    366         if delta == None: 
     366        if delta is None: 
    367367            delta = 0 
    368368        if  right: 
     
    374374            self.theta = mline.theta + self.phi 
    375375 
    376         if mline != None: 
     376        if mline is not None: 
    377377            if delta != 0: 
    378378                self.theta2 = mline + delta 
     
    538538        """ 
    539539 
    540         if theta != None: 
     540        if theta is not None: 
    541541            self.theta = theta 
    542542        x1 = self.radius * math.cos(self.theta) 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/SimplePlot.py

    r25b9707a r7432acb  
    8787            pos = (pos_x, pos_y + 5) 
    8888        self.PopupMenu(slicerpop, pos) 
    89         if self.scale != None: 
     89        if self.scale is not None: 
    9090            self.parent.scale2d = self.scale 
    9191 
     
    106106            self.leftdown = True 
    107107            ax = event.inaxes 
    108             if ax != None: 
     108            if ax is not None: 
    109109                self.xInit, self.yInit = event.xdata, event.ydata 
    110110                try: 
     
    123123        """ 
    124124        self.resizing = False 
    125         if self.x_size != None: 
     125        if self.x_size is not None: 
    126126            if self.x_size == self.GetSize(): 
    127127                self.canvas.set_resizing(self.resizing) 
     
    161161        self.plots[plot.name] = plot 
    162162        # Axis scales 
    163         if plot.xtransform != None: 
     163        if plot.xtransform is not None: 
    164164            self.xLabel = plot.xtransform 
    165         if plot.ytransform != None: 
     165        if plot.ytransform is not None: 
    166166            self.yLabel = plot.ytransform 
    167167        # Init graph 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/SlicerParameters.py

    rd85c194 r235f514  
    4646        """ 
    4747        event.Skip() 
    48         if event.obj_class == None: 
     48        if event.obj_class is None: 
    4949            self.set_slicer(None, None) 
    5050        else: 
     
    5757        self.bck.Clear(True) 
    5858        self.type = type 
    59         if type == None: 
     59        if type is None: 
    6060            label = "Right-click on 2D plot for slicer options" 
    6161            title = wx.StaticText(self, -1, label, style=wx.ALIGN_LEFT) 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/binder.py

    rd85c194 r463e7ffc  
    44import logging 
    55import sys 
     6 
     7logger = logging.getLogger(__name__) 
    68 
    79class Selection(object): 
     
    7072            canvas.mpl_disconnect(canvas.scroll_pick_id) 
    7173        except: 
    72             logging.error(sys.exc_value) 
     74            logger.error(sys.exc_value) 
    7375        self.canvas = canvas 
    7476        self.figure = figure 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/boxMask.py

    rd85c194 r7432acb  
    123123                                         x2=self.vertical_lines.x2, 
    124124                                         width=self.vertical_lines.half_width) 
    125         # if self.is_inside != None: 
     125        # if self.is_inside is not None: 
    126126        out = self._post_data() 
    127127        return out 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/boxSlicer.py

    r9a5097c r7432acb  
    139139 
    140140        """ 
    141         if self.direction == None: 
     141        if self.direction is None: 
    142142            self.direction = direction 
    143143 
     
    147147        y_max = math.fabs(self.horizontal_lines.y) 
    148148 
    149         if nbins != None: 
     149        if nbins is not None: 
    150150            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: 
    153153                msg = "post data:cannot average , averager is empty" 
    154154                raise ValueError, msg 
     
    357357        """ 
    358358        # # Reset x, y- coordinates if send as parameters 
    359         if x != None: 
     359        if x is not None: 
    360360            self.x = np.sign(self.x) * math.fabs(x) 
    361         if y != None: 
     361        if y is not None: 
    362362            self.y = np.sign(self.y) * math.fabs(y) 
    363363        # # Draw lines and markers 
     
    464464        """ 
    465465        # # reset x, y -coordinates if given as parameters 
    466         if x != None: 
     466        if x is not None: 
    467467            self.x = np.sign(self.x) * math.fabs(x) 
    468         if y != None: 
     468        if y is not None: 
    469469            self.y = np.sign(self.y) * math.fabs(y) 
    470470        # # draw lines and markers 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/boxSum.py

    rd85c194 r7432acb  
    353353            Draw the new roughness on the graph. 
    354354        """ 
    355         if center_x != None: 
     355        if center_x is not None: 
    356356            self.x = center_x 
    357         if center_y != None: 
     357        if center_y is not None: 
    358358            self.y = center_y 
    359359        self.center_marker.set(xdata=[self.x], ydata=[self.y]) 
     
    490490        """ 
    491491        # # save the new height, witdh of the rectangle if given as a param 
    492         if width != None: 
     492        if width is not None: 
    493493            self.half_width = width 
    494         if height != None: 
     494        if height is not None: 
    495495            self.half_height = height 
    496496        # # If new  center coordinates are given draw the rectangle 
    497497        # #given these value 
    498         if center != None: 
     498        if center is not None: 
    499499            self.center_x = center.x 
    500500            self.center_y = center.y 
     
    511511            return 
    512512        # # if x1, y1, y2, y3 are given draw the rectangle with this value 
    513         if x1 != None: 
     513        if x1 is not None: 
    514514            self.x1 = x1 
    515         if x2 != None: 
     515        if x2 is not None: 
    516516            self.x2 = x2 
    517         if y1 != None: 
     517        if y1 is not None: 
    518518            self.y1 = y1 
    519         if y2 != None: 
     519        if y2 is not None: 
    520520            self.y2 = y2 
    521521        # # Draw 2 vertical lines and a marker 
     
    657657        """ 
    658658        # # save the new height, witdh of the rectangle if given as a param 
    659         if width != None: 
     659        if width is not None: 
    660660            self.half_width = width 
    661         if height != None: 
     661        if height is not None: 
    662662            self.half_height = height 
    663663        # # If new  center coordinates are given draw the rectangle 
    664664        # #given these value 
    665         if center != None: 
     665        if center is not None: 
    666666            self.center_x = center.x 
    667667            self.center_y = center.y 
     
    679679            return 
    680680        # # if x1, y1, y2, y3 are given draw the rectangle with this value 
    681         if x1 != None: 
     681        if x1 is not None: 
    682682            self.x1 = x1 
    683         if x2 != None: 
     683        if x2 is not None: 
    684684            self.x2 = x2 
    685         if y1 != None: 
     685        if y1 is not None: 
    686686            self.y1 = y1 
    687         if y2 != None: 
     687        if y2 is not None: 
    688688            self.y2 = y2 
    689689        # # Draw 2 vertical lines and a marker 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/detector_dialog.py

    r8416a02 r7432acb  
    9090            zmin = self.reset_zmin_ctl 
    9191            zmax = self.reset_zmax_ctl 
    92             if zmin == None: 
     92            if zmin is None: 
    9393                zmin = "" 
    94             if zmax == None: 
     94            if zmax is None: 
    9595                zmax = "" 
    9696            self.zmin_ctl.SetValue(str(zmin)) 
     
    155155        self.qmax_ctl.SetLabel(str(format_number(qmax))) 
    156156        self.beam_ctl.SetLabel(str(format_number(beam))) 
    157         if zmin != None: 
     157        if zmin is not None: 
    158158            self.zmin_ctl.SetValue(str(format_number(zmin))) 
    159         if zmax != None: 
     159        if zmax is not None: 
    160160            self.zmax_ctl.SetValue(str(format_number(zmax))) 
    161161 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/masking.py

    r9a5097c r45dffa69  
    100100        wx.Dialog.__init__(self, parent, id=id, *args, **kwds) 
    101101 
    102         if data != None: 
     102        if data is not None: 
    103103            # Font size 
    104104            kwds = [] 
     
    235235        event.Skip() 
    236236        # from boxMask import BoxMask 
    237         if event != None: 
     237        if event is not None: 
    238238            self._on_clear_slicer(event) 
    239239        self.slicer_z += 1 
     
    249249        Add new mask to old mask 
    250250        """ 
    251         if not self.slicer == None: 
     251        if self.slicer is not None: 
    252252            data = Data2D() 
    253253            data = self.data 
     
    269269        Erase new mask from old mask 
    270270        """ 
    271         if not self.slicer == None: 
     271        if self.slicer is not None: 
    272272            self.slicer_mask = self.slicer.update() 
    273273            mask = self.data.mask 
     
    307307        Clear the slicer on the plot 
    308308        """ 
    309         if not self.slicer == None: 
     309        if self.slicer is not None: 
    310310            self.slicer.clear() 
    311311            self.subplot.figure.canvas.draw() 
     
    336336        """ 
    337337        # the case of liitle numbers of True points 
    338         if len(mask[mask]) < 10 and self.data != None: 
     338        if len(mask[mask]) < 10 and self.data is not None: 
    339339            self.ShowMessage() 
    340340            mask = copy.deepcopy(self.mask) 
     
    355355        temp_data.data[mask == False] = temp_mask[mask == False] 
    356356        self.plotpanel.clear() 
    357         if self.slicer != None: 
     357        if self.slicer is not None: 
    358358            self.slicer.clear() 
    359359            self.slicer = None 
     
    460460        wx.Dialog.__init__(self, parent, id=id, *args, **kwds) 
    461461 
    462         if data != None: 
     462        if data is not None: 
    463463            # Font size 
    464464            kwds = [] 
     
    710710        Status msg 
    711711        """ 
    712         if self.parent.parent.parent != None: 
     712        if self.parent.parent.parent is not None: 
    713713            wx.PostEvent(self.parent.parent.parent, 
    714714                         StatusEvent(status=msg, type=type)) 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/plotting.py

    rca224b1 r235f514  
    8888        On Qmin Qmax vertical line event 
    8989        """ 
    90         if event == None: 
     90        if event is None: 
    9191            return 
    9292        if event.id in self.plot_panels.keys(): 
     
    9999 
    100100    def _on_plot_lim(self, event=None): 
    101         if event == None: 
     101        if event is None: 
    102102            return 
    103103        if event.id in self.plot_panels.keys(): 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/profile_dialog.py

    rd85c194 r7432acb  
    4444        wx.Dialog.__init__(self, parent, id=id, *args, **kwds) 
    4545 
    46         if data != None: 
     46        if data is not None: 
    4747            #Font size 
    4848            kwds = [] 
     
    284284            default_name = default_name.split('.')[0] 
    285285        default_name += "_out" 
    286         if self.parent != None: 
     286        if self.parent is not None: 
    287287            # What an ancestor! 
    288288            fit_panel = self.parent.parent.parent 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/sector_mask.py

    rd85c194 r7432acb  
    9696            self.left_line.update(phi=self.right_line.phi, delta=None, 
    9797                                  mline=self.main_line, side=True, left=False) 
    98         #if self.is_inside != None: 
     98        #if self.is_inside is not None: 
    9999        out = self._post_data() 
    100100        return out 
     
    117117        data = self.base.data 
    118118        # If we have no data, just return 
    119         if data == None: 
     119        if data is None: 
    120120            return 
    121121        ## Averaging 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/slicerpanel.py

    rd85c194 r7432acb  
    3737        self.bck = wx.GridBagSizer(5, 5) 
    3838        self.SetSizer(self.bck) 
    39         if type == None and params == None: 
     39        if type is None and params is None: 
    4040            label = "Right-click on 2D plot for slicer options" 
    4141            title = wx.StaticText(self, -1, label, style=wx.ALIGN_LEFT) 
     
    5757        """ 
    5858        event.Skip() 
    59         if event.obj_class == None: 
     59        if event.obj_class is None: 
    6060            self.set_slicer(None, None) 
    6161        else: 
     
    6868        self.bck.Clear(True) 
    6969        self.type = type 
    70         if type == None: 
     70        if type is None: 
    7171            label = "Right-click on 2D plot for slicer options" 
    7272            title = wx.StaticText(self, -1, label, style=wx.ALIGN_LEFT) 
     
    114114        self.Layout() 
    115115        psizer = self.parent.GetSizer() 
    116         if psizer != None: 
     116        if psizer is not None: 
    117117            psizer.Layout() 
    118118 
Note: See TracChangeset for help on using the changeset viewer.