Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/calculator/resolution_calculator_panel.py

    r959eb01 r7432acb  
    656656            event.Skip() 
    657657        # Clear the plot 
    658         if self.image != None: 
     658        if self.image is not None: 
    659659            self.image.clf() 
    660660            # reset image 
     
    674674        """ 
    675675        # Skip event for next event 
    676         if event != None: 
     676        if event is not None: 
    677677            event.Skip() 
    678678            msg = "Please Check your input values " 
     
    708708            # Validate the wave inputs 
    709709            wave_input = self._validate_q_input(wavelength, wavelength_spread) 
    710             if wave_input != None: 
     710            if wave_input is not None: 
    711711                wavelength, wavelength_spread = wave_input 
    712712 
     
    757757        # Validate the q inputs 
    758758        q_input = self._validate_q_input(self.qx, self.qy) 
    759         if q_input != None: 
     759        if q_input is not None: 
    760760            self.qx, self.qy = q_input 
    761761 
     
    769769 
    770770        # Compute the resolution 
    771         if self.image != None: 
     771        if self.image is not None: 
    772772            #_pylab_helpers.Gcf.set_active(self.fm) 
    773773            _pylab_helpers.Gcf.figs = {} 
     
    839839        : Param image: pylab object 
    840840        """ 
    841         if image == None: 
     841        if image is None: 
    842842            return 
    843843        if color == 'g': 
     
    973973        if len(qx) != len(qy): 
    974974            return None 
    975         if qx == None or qy == None: 
     975        if qx is None or qy is None: 
    976976            return None 
    977977        return qx, qy 
     
    982982        """ 
    983983        # skip for another event 
    984         if event != None: 
     984        if event is not None: 
    985985            event.Skip() 
    986986        # init resolution_calculator 
     
    11481148        Set the detector coordinate for sigmas to x-y coordinate 
    11491149        """ 
    1150         if event != None: 
     1150        if event is not None: 
    11511151            event.Skip() 
    11521152        # Set the coordinate in Cartesian 
     
    11601160        Set the detector coordinate for sigmas to polar coordinate 
    11611161        """ 
    1162         if event != None: 
     1162        if event is not None: 
    11631163            event.Skip() 
    11641164        # Set the coordinate in polar 
     
    11811181        self.compute_button.SetLabel(label) 
    11821182        self.compute_button.SetToolTipString(label) 
    1183         if self.parent.parent != None: 
     1183        if self.parent.parent is not None: 
    11841184            wx.PostEvent(self.parent.parent, 
    11851185                         StatusEvent(status=msg, type=type)) 
     
    11961196        On source combobox selection 
    11971197        """ 
    1198         if event != None: 
     1198        if event is not None: 
    11991199            combo = event.GetEventObject() 
    12001200            event.Skip() 
     
    12151215        On source color combobox selection 
    12161216        """ 
    1217         if event != None: 
     1217        if event is not None: 
    12181218            #combo = event.GetEventObject() 
    12191219            event.Skip() 
     
    12531253        On spectrum ComboBox event 
    12541254        """ 
    1255         if event != None: 
     1255        if event is not None: 
    12561256            #combo = event.GetEventObject() 
    12571257            event.Skip() 
     
    12611261        if selection == 'Add new': 
    12621262            path = self._selectDlg() 
    1263             if path == None: 
     1263            if path is None: 
    12641264                self.spectrum_cb.SetValue('Flat') 
    12651265                self.resolution.set_spectrum(self.spectrum_dic['Flat']) 
     
    13011301        """ 
    13021302        try: 
    1303             if path == None: 
     1303            if path is None: 
    13041304                wx.PostEvent(self.parent.parent, StatusEvent(status=\ 
    13051305                            " Selected Distribution was not loaded: %s" % path)) 
     
    13481348        """ 
    13491349        _pylab_helpers.Gcf.figs = {} 
    1350         if self.manager != None: 
     1350        if self.manager is not None: 
    13511351            self.manager.cal_res_frame = None 
    13521352        self.Destroy() 
Note: See TracChangeset for help on using the changeset viewer.