Changeset e6b9723 in sasview for sansview/perspectives/fitting


Ignore:
Timestamp:
Jan 20, 2010 3:50:37 PM (15 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:
6d20b46
Parents:
d68c655
Message:

add more hint on the panel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/invariant_panel.py

    r2db1d66 re6b9723  
    3737    FONT_VARIANT = 1 
    3838     
    39 class InvariantPanel(wx.Panel): 
     39class InvariantPanel(wx.ScrolledWindow): 
    4040    """ 
    4141        Provides the Invariant GUI. 
     
    4848    CENTER_PANE = True 
    4949    def __init__(self, parent, data=None, base=None): 
    50         wx.Panel.__init__(self, parent) 
     50        wx.ScrolledWindow.__init__(self, parent, style= wx.FULL_REPAINT_ON_RESIZE ) 
    5151        #Font size  
    5252        self.SetWindowVariant(variant=FONT_VARIANT) 
     
    6161        #Draw the panel 
    6262        self._do_layout() 
     63        self.SetScrollbars(20,20,25,65) 
    6364        self.SetAutoLayout(True) 
    6465        self.Layout() 
     
    281282        data_range_value_txt = wx.StaticText(self, -1, str(data_range)) 
    282283         
    283         background_txt = wx.StaticText(self, -1, 'Background') 
     284        background_txt = wx.StaticText(self, -1, 'Background (Optional)') 
    284285        self.background_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 
    285286        self.background_ctl.SetValue(str(BACKGROUND)) 
    286287        self.background_ctl.SetToolTipString("Background to subtract to data.") 
    287         scale_txt = wx.StaticText(self, -1, 'Scale') 
     288        scale_txt = wx.StaticText(self, -1, 'Scale (Optional)') 
    288289        self.scale_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 
    289290        self.scale_ctl.SetValue(str(SCALE)) 
    290291        self.scale_ctl.SetToolTipString("Scale to apply to data.") 
    291         contrast_txt = wx.StaticText(self, -1, 'Contrast') 
     292        contrast_txt = wx.StaticText(self, -1, 'Contrast (Optional)') 
    292293        self.contrast_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 
    293         self.contrast_ctl.SetToolTipString("Contrast in q range.") 
    294         porod_const_txt = wx.StaticText(self, -1, 'Porod Constant') 
     294        msg_hint = "Enter a value for the contrast to get the volume fraction" 
     295        self.contrast_ctl.SetToolTipString(str(msg_hint)) 
     296        porod_const_txt = wx.StaticText(self, -1, 'Porod Constant(Optional)') 
    295297        self.porod_const_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 
    296         self.porod_const_ctl.SetToolTipString("Invariant in q range.") 
     298        msg_hint ="Need both the contrast and surface to get the surface" 
     299        self.porod_const_ctl.SetToolTipString(str(msg_hint)) 
    297300        
    298301        sizer_input.Add(data_txt, 0, wx.LEFT, 5) 
     
    335338        self.npts_low_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/3, -1)) 
    336339        self.npts_low_ctl.SetValue(str(NPTS)) 
     340        msg_hint = "the number of first q points to consider" 
     341        msg_hint +="during the fit for extrapolation at low Q" 
     342        self.npts_low_ctl.SetToolTipString(msg_hint) 
    337343        self.power_low_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/3, -1)) 
    338344        self.power_low_ctl.SetValue(str(self.power_law_exponant)) 
     
    363369        self.power_law_high = wx.RadioButton(self, -1, 'Power_law', 
    364370                                              (10, 10), style=wx.RB_GROUP) 
    365         #self.Bind(wx.EVT_RADIOBUTTON, self._set_dipers_Param, 
    366         #           id=self.power_law_high.GetId()) 
     371        msg_hint ="Check it to extrapolate data to high Q" 
     372        self.power_law_high.SetToolTipString(msg_hint) 
     373        
    367374        #MAC needs SetValue 
    368375        self.power_law_high.SetValue(True) 
    369376        npts_high_txt = wx.StaticText(self, -1, 'Npts') 
    370377        self.npts_high_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/3, -1)) 
     378        msg_hint = "the number of last q points to consider" 
     379        msg_hint += "during the fit for extrapolation high Q" 
     380        self.npts_high_ctl.SetToolTipString(msg_hint) 
    371381        self.npts_high_ctl.SetValue(str(NPTS)) 
    372382        self.power_high_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/3, -1)) 
     
    404414        extra_hint = "Extrapolation Maximum Range: " 
    405415        extra_hint_txt= wx.StaticText(self, -1,extra_hint ) 
    406         enable_sizer = wx.BoxSizer(wx.HORIZONTAL) 
    407416        extra_range = "[%s - %s]"%(str(Q_MINIMUM), str(Q_MAXIMUM)) 
    408417        extra_range_value_txt = wx.StaticText(self, -1, str(extra_range)) 
    409         enable_sizer.Add(extra_hint_txt, 0, wx.ALL, 5) 
    410         enable_sizer.Add(extra_range_value_txt, 0, wx.ALL, 5) 
     418        extra_enable_hint = "Hint: Check any box to enable a specific extrapolation !" 
     419        extra_enable_hint_txt= wx.StaticText(self, -1, extra_enable_hint ) 
     420        #enable_sizer = wx.BoxSizer(wx.HORIZONTAL) 
     421        enable_sizer = wx.GridBagSizer(5,5) 
     422        #enable_sizer.Add(extra_hint_txt, 0, wx.ALL, 5) 
     423        #enable_sizer.Add(extra_range_value_txt, 0, wx.ALL, 5) 
     424         
     425        iy = 0 
     426        ix = 0 
     427        enable_sizer.Add(extra_hint_txt,(iy, ix),(1,1), 
     428                            wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 
     429        ix += 1 
     430        enable_sizer.Add(extra_range_value_txt, (iy, ix), (1,1), 
     431                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
     432        ix = 0 
     433        iy += 1 
     434        enable_sizer.Add(extra_enable_hint_txt,(iy, ix),(1,1), 
     435                            wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 
    411436         
    412437        type_extrapolation_sizer = wx.BoxSizer(wx.HORIZONTAL) 
     
    442467        self.invariant_total_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 
    443468        self.invariant_total_ctl.SetEditable(False) 
    444         self.invariant_total_ctl.SetToolTipString("Invariant in q range and extra\ 
    445                    polated range.") 
     469        msg_hint = "Invariant in q range and extra polated range." 
     470        self.invariant_total_ctl.SetToolTipString(msg_hint) 
    446471        self.invariant_total_err_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 
    447472        self.invariant_total_err_ctl.SetEditable(False) 
     
    595620         
    596621class InvariantWindow(wx.Frame): 
    597     def __init__(self, parent=None, id=1,data=None, title="SLD Calculator",base=None): 
     622    def __init__(self, parent=None, id=1,data=None, title="Invariant",base=None): 
    598623        wx.Frame.__init__(self, parent, id, title, size=( PANEL_WIDTH, 
    599624                                                             PANEL_HEIGHT)) 
Note: See TracChangeset for help on using the changeset viewer.