Changeset 8c61e14 in sasview


Ignore:
Timestamp:
Apr 13, 2012 1:59:38 PM (12 years ago)
Author:
Mathieu Doucet <doucetm@…>
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.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
14d2daa
Parents:
7a211030
Message:

Fixing code style problems and bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/local_perspectives/plotting/boxSum.py

    rdb7a82e r8c61e14  
    1  
    2  
    3  
     1""" 
     2    Boxsum Class: determine 2 rectangular area to compute  
     3    the sum of pixel of a Data.  
     4""" 
    45import math 
    56import wx 
    6 from copy import deepcopy 
    77from BaseInteractor import _BaseInteractor 
    88from sans.guiframe.events import SlicerParamUpdateEvent 
     
    5757        self.has_move = False 
    5858        ## Create Boxsum edges  
    59         self.horizontal_lines= HorizontalDoubleLine(self, 
     59        self.horizontal_lines = HorizontalDoubleLine(self, 
    6060                                                    self.base.subplot, 
    6161                                                    color='blue', 
     
    6767        self.horizontal_lines.qmax = self.qmax 
    6868         
    69         self.vertical_lines= VerticalDoubleLine(self, 
     69        self.vertical_lines = VerticalDoubleLine(self, 
    7070                                                self.base.subplot, 
    7171                                                color='black', 
     
    7777        self.vertical_lines.qmax = self.qmax 
    7878         
    79         self.center= PointInteractor(self, 
     79        self.center = PointInteractor(self, 
    8080                                     self.base.subplot,color='grey', 
    8181                                    zorder=zorder, 
     
    400400        self.move(x, y, None) 
    401401        self.update() 
    402      
    403     def get_params(self): 
    404         """ 
    405         """ 
    406         params = {} 
    407         params["x"] = self.x 
    408         params["y"] = self.y 
    409         return params 
    410      
    411     def set_params(self, params): 
    412         """ 
    413         """ 
    414         center_x = params["x"]  
    415         center_y = params["y"]  
    416         self.update(center_x=center_x, center_y=center_y) 
    417         
    418402         
    419403class VerticalDoubleLine(_BaseInteractor): 
     
    606590        self.update() 
    607591         
    608     def get_params(self): 
    609         """ 
    610             Store a copy of values of parameters of the slicer into a dictionary. 
    611             @return params: the dictionary created 
    612         """ 
    613         params = {} 
    614         params["x"] = self.x1 
    615         params["y"] = self.y1 
    616         return params 
    617      
    618     def set_params(self, params): 
    619         """ 
    620             Receive a dictionary and reset the slicer with values contained  
    621             in the values of the dictionary. 
    622             @param params: a dictionary containing name of slicer parameters and  
    623             values the user assigned to the slicer. 
    624         """ 
    625         x = params["x"]  
    626         y = params["y"]  
    627         self.update(x=x, y=y, center_x=None, center_y=None) 
    628  
    629  
    630592class HorizontalDoubleLine(_BaseInteractor): 
    631593    """ 
     
    808770        self.move(x, y, None) 
    809771        self.update() 
    810          
    811     def get_params(self): 
    812         """ 
    813         Store a copy of values of parameters of the slicer into a dictionary. 
    814         :return params: the dictionary created 
    815         """ 
    816         params = {} 
    817         params["x"] = self.x 
    818         params["y"] = self.y 
    819         return params 
    820      
    821     def set_params(self, params): 
    822         """ 
    823         Receive a dictionary and reset the slicer with values contained  
    824         in the values of the dictionary. 
    825         :param params: a dictionary containing name of slicer parameters and  
    826             values the user assigned to the slicer. 
    827         """ 
    828         x = params["x"]  
    829         y = params["y"]  
    830         self.update(x=x, y=y, center_x=None,center_y=None) 
    831772          
    832           
    833           
Note: See TracChangeset for help on using the changeset viewer.