Ignore:
Timestamp:
Jun 3, 2010 1:09:19 PM (14 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
7e4a6ff
Parents:
d955bf19
Message:

working on documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • invariantview/perspectives/invariant/invariant_panel.py

    r3de66c1 rd7a39e5  
    11""" 
    2     This module provide GUI for the neutron scattering length density calculator 
    3     @author: Gervaise B. Alina 
     2This module provide GUI for the neutron scattering length density calculator 
     3 
    44""" 
    55 
     
    4747class InvariantPanel(ScrolledPanel): 
    4848    """ 
    49         Provides the Invariant GUI. 
     49    Provides the Invariant GUI. 
    5050    """ 
    5151    ## Internal nickname for the window, used by the AUI manager 
     
    8181    def err_check_on_data(self): 
    8282        """ 
    83             Check if data is valid for further computation 
     83        Check if data is valid for further computation 
    8484        """ 
    8585        flag = False 
     
    9898    def set_data(self, data): 
    9999        """ 
    100             Set the data 
     100        Set the data 
    101101        """ 
    102102        self._data = data 
     
    115115    def set_message(self): 
    116116        """ 
    117             Display warning message if available 
     117        Display warning message if available 
    118118        """ 
    119119        if self.inv_container is not None: 
     
    133133    def set_manager(self, manager): 
    134134        """ 
    135             set value for the manager 
     135        set value for the manager 
    136136        """ 
    137137        self._manager = manager  
     
    139139    def get_background(self): 
    140140        """ 
    141             @return the background textcrtl value as a float 
     141        return the background textcrtl value as a float 
    142142        """ 
    143143        background = self.background_tcl.GetValue().lstrip().rstrip() 
     
    151151    def get_scale(self): 
    152152        """ 
    153             @return the scale textcrtl value as a float 
     153        return the scale textcrtl value as a float 
    154154        """ 
    155155        scale = self.scale_tcl.GetValue().lstrip().rstrip() 
     
    167167    def get_contrast(self): 
    168168        """ 
    169             @return the contrast textcrtl value as a float 
     169        return the contrast textcrtl value as a float 
    170170        """ 
    171171        par_str = self.contrast_tcl.GetValue().strip() 
     
    189189    def get_porod_const(self): 
    190190        """ 
    191             @return the porod constant textcrtl value as a float 
     191        return the porod constant textcrtl value as a float 
    192192        """ 
    193193        par_str = self.porod_constant_tcl.GetValue().strip() 
     
    304304    def set_extrapolation_low(self, inv, low_q=False): 
    305305        """ 
    306             @return float value necessary to compute invariant a low q 
     306        return float value necessary to compute invariant a low q 
    307307        """ 
    308308        #get funtion 
     
    341341    def set_extrapolation_high(self, inv, high_q=False): 
    342342        """ 
    343             @return float value necessary to compute invariant a high q 
     343        return float value necessary to compute invariant a high q 
    344344        """ 
    345345        power_high = None 
     
    372372    def display_details(self, event): 
    373373        """ 
    374             open another panel for more details on invariant calculation 
     374        open another panel for more details on invariant calculation 
    375375        """ 
    376376        panel = InvariantDetailsPanel(parent=self,  
     
    382382    def compute_invariant(self, event=None): 
    383383        """ 
    384             compute invariant  
     384        compute invariant  
    385385        """ 
    386386        msg= "" 
     
    465465    def reset_panel(self): 
    466466        """ 
    467             set the panel at its initial state. 
     467        set the panel at its initial state. 
    468468        """ 
    469469        self.background_tcl.SetValue(str(BACKGROUND)) 
     
    491491    def _reset_output(self): 
    492492        """ 
    493             clear outputs textcrtl 
     493        clear outputs textcrtl 
    494494        """ 
    495495        self.invariant_total_tcl.Clear() 
     
    504504    def _define_structure(self): 
    505505        """ 
    506             Define main sizers needed for this panel 
     506        Define main sizers needed for this panel 
    507507        """ 
    508508        ## Box sizers must be defined first before defining buttons/textctrls (MAC). 
     
    550550    def _layout_data_name(self): 
    551551        """ 
    552             Draw widgets related to data's name 
     552        Draw widgets related to data's name 
    553553        """ 
    554554        #Sizer hint  
     
    586586    def _layout_bkg_scale(self): 
    587587        """ 
    588             Draw widgets related to background and scale 
     588        Draw widgets related to background and scale 
    589589        """ 
    590590        background_txt = wx.StaticText(self, -1, 'Background : ')   
     
    605605    def _layout_contrast_porod(self): 
    606606        """ 
    607             Draw widgets related to porod constant and contrast 
     607        Draw widgets related to porod constant and contrast 
    608608        """ 
    609609        contrast_txt = wx.StaticText(self, -1, 'Contrast : ')   
     
    627627    def _enable_fit_power_law_low(self, event=None): 
    628628        """ 
    629             Enable and disable the power value editing 
     629        Enable and disable the power value editing 
    630630        """ 
    631631        if self.fix_enable_low.IsEnabled(): 
     
    637637    def _enable_low_q_section(self, event=None): 
    638638        """ 
    639             Disable or enable some button if the user enable low q extrapolation 
     639        Disable or enable some button if the user enable low q extrapolation 
    640640        """ 
    641641        if self.enable_low_cbox.GetValue(): 
     
    658658    def _enable_power_law_low(self, event=None): 
    659659        """ 
    660             Enable editing power law section at low q range 
     660        Enable editing power law section at low q range 
    661661        """ 
    662662        if self.guinier.GetValue(): 
     
    672672    def _layout_extrapolation_low(self): 
    673673        """ 
    674             Draw widgets related to extrapolation at low q range 
     674        Draw widgets related to extrapolation at low q range 
    675675        """ 
    676676        self.enable_low_cbox = wx.CheckBox(self, -1, "Enable Extrapolate Low Q") 
     
    742742    def _enable_fit_power_law_high(self, event=None): 
    743743        """ 
    744             Enable and disable the power value editing 
     744        Enable and disable the power value editing 
    745745        """ 
    746746        if self.fix_enable_high.IsEnabled(): 
     
    752752    def _enable_high_q_section(self, event=None): 
    753753        """ 
    754             Disable or enable some button if the user enable high q extrapolation 
     754        Disable or enable some button if the user enable high q extrapolation 
    755755        """ 
    756756        if self.enable_high_cbox.GetValue(): 
     
    771771    def _layout_extrapolation_high(self): 
    772772        """ 
    773             Draw widgets related to extrapolation at high q range 
     773        Draw widgets related to extrapolation at high q range 
    774774        """ 
    775775        self.enable_high_cbox = wx.CheckBox(self, -1, "Enable Extrapolate high-Q") 
     
    833833    def _layout_extrapolation(self): 
    834834        """ 
    835             Draw widgets related to extrapolation 
     835        Draw widgets related to extrapolation 
    836836        """ 
    837837        extra_hint = "Extrapolation Maximum Q Range [1/A]: " 
     
    869869    def _layout_volume_surface_sizer(self): 
    870870        """ 
    871             Draw widgets related to volume and surface 
     871        Draw widgets related to volume and surface 
    872872        """ 
    873873        unit_volume = '' 
     
    922922    def _layout_invariant_sizer(self): 
    923923        """ 
    924             Draw widgets related to invariant 
     924        Draw widgets related to invariant 
    925925        """ 
    926926        uncertainty = "+/-"  
     
    954954    def _layout_inputs_sizer(self): 
    955955        """ 
    956             Draw widgets related to inputs 
     956        Draw widgets related to inputs 
    957957        """ 
    958958        self._layout_bkg_scale() 
     
    963963    def _layout_outputs_sizer(self): 
    964964        """ 
    965             Draw widgets related to outputs 
     965        Draw widgets related to outputs 
    966966        """ 
    967967        self._layout_volume_surface_sizer() 
     
    973973    def _layout_button(self):   
    974974        """ 
    975             Do the layout for the button widgets 
     975        Do the layout for the button widgets 
    976976        """  
    977977        #compute button 
     
    995995    def _do_layout(self): 
    996996        """ 
    997             Draw window content 
     997        Draw window content 
    998998        """ 
    999999        self._define_structure() 
     
    10161016     
    10171017class InvariantDialog(wx.Dialog): 
     1018    """ 
     1019    """ 
    10181020    def __init__(self, parent=None, id=1,graph=None, 
    10191021                 data=None, title="Invariant",base=None): 
     
    10251027         
    10261028class InvariantWindow(wx.Frame): 
     1029    """ 
     1030    """ 
    10271031    def __init__(self, parent=None, id=1,graph=None,  
    10281032                 data=None, title="Invariant",base=None): 
Note: See TracChangeset for help on using the changeset viewer.