Changeset b92884a in sasview


Ignore:
Timestamp:
Nov 3, 2008 3:01:50 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:
58eac5d
Parents:
d292959
Message:

help dialog filled

Location:
sansview
Files:
1 added
3 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • sansview/doc/change_scale_help.html

    rd292959 rb92884a  
     1<html> 
     2<body> 
     3<h4>Change scale</h4> 
     4<p> 
     5        If the loaded data is a 1-D data.Changing scale or Data Representation will work as 
     6        followed:<b>right click</b> on the plot window. 
     7        A context menu pops-up  and select <b>Change Scale</b>. A dialog window titled<b> 
     8        select the scale of the graph</b> will pop-up then change the <b>x</b>, the <b>y</b> 
     9        and the <b>view </b> values as wish. 
     10        If the loaded data  is an image.<b>Right click</b> on the image to pop-up the context 
     11        menu. Select <Toggle linear/Log scale> to switch from linear to log scale. The scale  
     12        selected is printed on the statusbar. 
     13         
     14</p> 
     15</body> 
     16</html> 
  • sansview/doc/load_data_help.html

    rd292959 rb92884a  
    33 
    44<p> 
    5 <h6>Loading File</h6> 
    6 Overview of elementary concepts in statistics. 
    7 Variables. Correlation. Measurement scales. Statistical significance.  
    8 Distributions. Normality assumption. 
     5<h4>Loading File</h4> 
     6From Menu go to <b>file</b> -><b>open</b>. Select a file from the dialog window and click on Open. 
     7Data contained in the file will be displayed. To cancel the loading click on <b>cancel</b>. 
     8In case a file can not be loaded, an error message will be displayed on the statusbar. 
    99</p> 
    1010 
  • sansview/doc/model_use_help.html

    rd292959 rb92884a  
    22<body> 
    33 
    4 <a href ="load_data_help.html" target ="showframe">Frame a</a><br> 
    5 <a href ="glossaryhelp.html" target ="showframe">Frame b</a><br> 
     4<h4>Visualize Model</h4> 
     5<ul> 
     6<li><a href="#Model type">Model type</a></li> 
     7<li><a href="#Visualize">Change Model's parameters</a></li> 
     8<li><a href="#Plugin"> Write your own model plugin</a></li> 
     9</ul> 
    610 
     11<h5><a name="Model types">Model type</a></h5> 
     12<p> Models are grouped into three classes: 
     13        <ul> 
     14        <li><b> Shapes</b>: Regular  geometric shapes</li> 
     15        <li><b> Shape- Independent</b></li> 
     16        <li><b> Added Shapes</b> : model written by the user</li> 
     17        </ul> 
     18</p> 
    719 
     20<h5><a name="Visualize">Change Model's parameters</a></h5> 
     21<p> 
     22        To visualize model in a different window, from menu click on <b>Model</b>.Select 
     23        a type of model and then the name of your model.A new window will appear with the plot  
     24        of your model with default values. Change model's parameters on <b> model view</b> tab 
     25        and view the plotted model with its new parameters.  
     26</p> 
     27 
     28<h5><a name="Plugin"> Write your own model plugin</a></h5> 
     29<p> 
     30        Write your own model plugin and save it into <b>plugins</b> directory. You plugin 
     31        model will be added into "<>added Models</>" fiel on model menu. then you can use it  
     32        as a regular default model. 
     33</p> 
    834</body> 
    935</html> 
  • sansview/doc/reset_Graph_help.html

    rd292959 rb92884a  
     1<html> 
     2<body> 
     3 
     4<h4>Graph help</h4> 
     5<ul> 
     6<li><a href="#add">Add Errors</a></li> 
     7<li><a href="#drag">Drag plot</a></li> 
     8<li><a href="#reset">Reset Graph</a></li> 
     9<li><a href="#save">Save Data</a></li> 
     10<li><a href="#select">Select Data</a></li> 
     11<li><a href="#zoom ">Zoom in/out</a></li> 
     12<li><a href="#remove ">Remove Data</a></li> 
     13</ul> 
     14 
     15<h5><a name="add">Add Error</a></h5> 
     16<p>  
     17        Right click on a theory plot.On context menu select <b> Add Error</b>. 
     18        Errors will be added to the theory. 
     19</p> 
     20 
     21<h5><a name="zoom">Zoom in/out</a></h5> 
     22<p>  
     23        Click on the plotting window, roll the wheel up to zoom out and roll it down 
     24        to zoom in. 
     25</p> 
     26 
     27<h5><a name="reset">Reset Graph</a></h5> 
     28<p> 
     29        To reset the graph's size, right click on the plot and the context menu pops-up. 
     30        Select <b>Reset Graph</b> and the plot will take its initial dimensions 
     31</p> 
     32 
     33<h5><a name="select"> Select Data</a></h5> 
     34<p> 
     35        Right click on the data plotted. It will be highlighted in yellow to interact with 
     36        the data via context menu. 
     37</p> 
     38 
     39<h5><a name="save"> Save Data</a></h5> 
     40<p> 
     41        Right click on plot. Context menu will pop-up select save image [file name].A dialog 
     42        window opens and write a the name of the file to save and click on <b>Save</b> 
     43</p> 
     44 
     45<h5><a name="drag"> Drag plot</a></h5> 
     46<p> 
     47        <b>Left Click</b> on inside the graph and hold the left button on of the mouse and  
     48        move the mouse to the direction wanted. 
     49</p> 
     50 
     51<h5><a name="remove">Remove Data</a></h5> 
     52<p> 
     53        Highlight the plot and the context menu appears.Select <b>remove [fine name]</b>. 
     54        The plot selected will disappear. 
     55</p> 
     56 
     57</body> 
     58</html> 
  • sansview/doc/simultaneous_fit_help.html

    rd292959 rb92884a  
     1<html> 
     2<body> 
     3 
     4<h4>Simultaneous Fit</h4> 
     5<p> 
     6        Can only happen with more than 2 data select with their associated model. 
     7        Can only operate with the park engine selected <b>Fitting</b> on the menu. 
     8        check <b> park</b>. 
     9</p> 
     10<ul> 
     11<li><a href="#noconstraint">Simultaneous Fit without constraint</a></li> 
     12<li><a href="#constraint">Simultaneous Fit with constraint</a></li> 
     13</ul> 
     14 
     15<h5><a name="noconstraint">Simultaneous Fit without constraint</a></h5> 
     16<p>  
     17        Highlight the data to fit. Select from the context menu <b>Select Data for fitting</b>. 
     18        A new tab with the name of the data selected will appears. Select a model used for the fit 
     19        from the combo box. Model's parameters will be display.Set initial parameters if need. 
     20        Check at least one parameter to fit.Go to <b>Simultaneous Fit</b> and check at least 2 
     21        models name to fit.Click on <b> constraint fit </b> button. results will be displayed on  
     22        tabs corresponding to each model select. 
     23         
     24</p> 
     25 
     26<h5><a name="constraint">Simultaneous Fit with constraint</a></h5> 
     27<p> 
     28        Perform <a href="#noconstraint">Simultaneous Fit without constraint</a> step. 
     29        Enter constraint in the text control next to  <b>constraint fit</b> button. 
     30        Constraint should be of type model1 parameter name = f(model2 parameter name). 
     31        Many constraints can be entered for a single fit.Each of them should be separated  
     32        by a newline charater or ";" 
     33</p> 
     34 
     35</body> 
     36</html> 
  • sansview/doc/single_fit_help.html

    rd292959 rb92884a  
     1<html> 
     2<body> 
     3 
     4<h4>Single Fit</h4> 
     5<ul> 
     6<li><a href="#fitpage">Single Fit</a></li> 
     7<li><a href="#linearfit">Linear Fit</a></li> 
     8</ul> 
     9 
     10<h5><a name="fitpage">Single Fit</a></h5> 
     11<p>  
     12        Highlight the data to fit. Select from the context menu <b>Select Data for fitting</b>. 
     13        A new tab with the name of the data selected will appears. Select a model used for the fit 
     14        from the combo box. Model's parameters will be display.Set initial parameters if need. 
     15        Check at least one parameter to fit.Click on <b> Fit</b> button. 
     16        New parameters values will be displayed as well as error and new chi square associated 
     17        with the fit operation. 
     18        The model will be replotted with its new values. 
     19        Errors will be display on the statusbar. 
     20        Single fit can also be perform on the "<b>simultaneous fit </b>" tab is parameters are previously  
     21        selected on the page corresponding to a model name check. if one model is check, click  
     22        on <b> constraint fit </b> button to perform a single fit. results will be displayed on  
     23        the appropriate tab. 
     24         
     25</p> 
     26 
     27<h5><a name="linearfit">Linear Fit</a></h5> 
     28<p> 
     29        Linear fit is performed with a line model. Highlight data to fit.From the context menu 
     30        select <b> Linear Fit</b>.A dialog window appears.Change model initial parameters, data limits 
     31        and hit <b> fit</b> button. New parameters values are displayed and the line with the new  
     32        parameters is added to the plot. 
     33</p> 
     34 
     35</body> 
     36</html> 
  • sansview/perspectives/fitting/helpDialog.py

    rd292959 rb92884a  
    33import wx.html as html 
    44import os 
     5def help(): 
     6    """ 
     7        Provide general online help text 
     8        Future work: extend this function to allow topic selection 
     9    """ 
     10    info_txt  = "The inversion approach is based on Moore, J. Appl. Cryst. (1980) 13, 168-175.\n\n" 
     11    info_txt += "P(r) is set to be equal to an expansion of base functions of the type " 
     12    info_txt += "phi_n(r) = 2*r*sin(pi*n*r/D_max). The coefficient of each base functions " 
     13    info_txt += "in the expansion is found by performing a least square fit with the " 
     14    info_txt += "following fit function:\n\n" 
     15    info_txt += "chi**2 = sum_i[ I_meas(q_i) - I_th(q_i) ]**2/error**2 + Reg_term\n\n" 
     16    info_txt += "where I_meas(q) is the measured scattering intensity and I_th(q) is " 
     17    info_txt += "the prediction from the Fourier transform of the P(r) expansion. " 
     18    info_txt += "The Reg_term term is a regularization term set to the second derivative " 
     19    info_txt += "d**2P(r)/dr**2 integrated over r. It is used to produce a smooth P(r) output.\n\n" 
     20    info_txt += "The following are user inputs:\n\n" 
     21    info_txt += "   - Number of terms: the number of base functions in the P(r) expansion.\n\n" 
     22    info_txt += "   - Regularization constant: a multiplicative constant to set the size of " 
     23    info_txt += "the regularization term.\n\n" 
     24    info_txt += "   - Maximum distance: the maximum distance between any two points in the system.\n" 
     25      
     26    return info_txt 
     27     
     28class HelpDialog(wx.Dialog): 
     29    def __init__(self, parent, id): 
     30       
     31        wx.Dialog.__init__(self, parent, id, size=(400, 420)) 
     32        self.SetTitle("P(r) help")  
     33         
     34 
     35        vbox = wx.BoxSizer(wx.VERTICAL) 
     36 
     37        explanation = help() 
     38            
     39        label_explain = wx.StaticText(self, -1, explanation, size=(350,320)) 
     40             
     41        vbox.Add(label_explain, 0, wx.ALL|wx.EXPAND, 15) 
     42 
     43 
     44        static_line = wx.StaticLine(self, -1) 
     45        vbox.Add(static_line, 0, wx.EXPAND, 0) 
     46         
     47        button_OK = wx.Button(self, wx.ID_OK, "OK") 
     48        #button_Cancel = wx.Button(self, wx.ID_CANCEL, "Cancel") 
     49         
     50        sizer_button = wx.BoxSizer(wx.HORIZONTAL) 
     51        sizer_button.Add((20, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
     52        sizer_button.Add(button_OK, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10) 
     53        #sizer_button.Add(button_Cancel, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)         
     54        vbox.Add(sizer_button, 0, wx.EXPAND|wx.BOTTOM|wx.TOP, 10) 
     55 
     56        self.SetSizer(vbox) 
     57        self.SetAutoLayout(True) 
     58         
     59        self.Layout() 
     60        self.Centre() 
    561 
    662class HelpWindow(wx.Dialog): 
    763    def __init__(self, parent, id, title): 
    8         wx.Dialog.__init__(self, parent, id, title, size=(450, 450)) 
     64        wx.Dialog.__init__(self, parent, id, title, size=(600, 450)) 
    965         
    1066        vbox1  = wx.BoxSizer(wx.HORIZONTAL) 
    1167         
    12         #lpanel = wx.Panel(self, -1, style=wx.BORDER_SUNKEN) 
     68        lpanel = wx.Panel(self, -1, style=wx.BORDER_SUNKEN) 
    1369        rpanel = wx.Panel(self, -1) 
    14         #vbox1.Add(lpanel, -1, wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
     70        vbox1.Add(lpanel, -1, wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    1571        vbox1.Add(rpanel, -1, wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    1672         
    1773        vbox = wx.BoxSizer(wx.VERTICAL) 
    1874        header = wx.Panel(rpanel, -1, size=(-1, 20)) 
    19         header = wx.Panel(rpanel, -1) 
    2075        header.SetBackgroundColour('#6666FF') 
    2176        header.SetForegroundColour('WHITE') 
    2277        hbox = wx.BoxSizer(wx.HORIZONTAL) 
    23         st = wx.StaticText(header, -1, 'Help', (5, 5)) 
    24          
     78        st = wx.StaticText(header, -1, '', (5, 5)) 
    2579        font = st.GetFont() 
    2680        font.SetPointSize(10) 
     
    3084        vbox.Add(header, 0, wx.EXPAND) 
    3185        
    32  
    33         help = html.HtmlWindow(rpanel, -1, style=wx.NO_BORDER) 
    34         try: 
    35            cwd = os.path.split(__file__)[0] 
    36         except: 
    37             cwd = os.getcwd() 
     86        vboxl= wx.BoxSizer(wx.VERTICAL) 
     87        headerl = wx.Panel(lpanel, -1, size=(-1, 20)) 
    3888        
    39          
    40          
    41         dir = os.path.dirname(os.path.dirname(cwd)) 
    42         filename="doc\load_data_help.html" 
    43         print os.path.join(dir,filename) 
    44         fname=os.path.join(dir,filename) 
    45         help.LoadPage( fname ) 
    46          
    47           
    48         #print help.ToText() 
     89        headerl.SetBackgroundColour('#6666FF') 
     90        headerl.SetForegroundColour('WHITE') 
     91        hboxl = wx.BoxSizer(wx.HORIZONTAL) 
     92        lst = wx.StaticText(headerl, -1, 'Contents', (5, 5)) 
     93        fontl = lst.GetFont() 
     94        fontl.SetPointSize(10) 
     95        lst.SetFont(fontl) 
     96        hboxl.Add(lst, 1, wx.TOP | wx.BOTTOM | wx.LEFT, 5) 
     97        headerl.SetSizer(hboxl) 
     98        vboxl.Add(headerl, 0, wx.EXPAND) 
     99        self.lhelp = html.HtmlWindow(lpanel, -1, style=wx.NO_BORDER) 
     100        self.rhelp = html.HtmlWindow(rpanel, -1, style=wx.NO_BORDER) 
    49101        
    50         vbox.Add(help, 1, wx.EXPAND) 
    51          
     102        page="""<html> 
     103            <body> 
     104            <ul> 
     105            <li><a href ="doc/change_scale_help.html" target ="showframe">Change scale</a><br></li> 
     106            <li><a href ="doc/reset_Graph_help.html" target ="showframe">Graph Help</a><br></li> 
     107            <li><a href ="doc/load_data_help.html" target ="showframe">Load a File</a><br></li> 
     108            <li><a href ="doc/simultaneous_fit_help.html" target ="showframe">Simultaneous Fit</a><br></li> 
     109            <li><a href ="doc/single_fit_help.html" target ="showframe">Single Fit</a><br></li> 
     110            <li><a href ="doc/model_use_help.html" target ="showframe">Visualize Model</a><br></li> 
     111            </ul> 
     112            </body> 
     113            </html>""" 
     114        
     115        self.lhelp.SetPage(page) 
     116        self.lhelp.Bind(wx.html.EVT_HTML_LINK_CLICKED,self.OnLinkClicked ) 
     117        vbox.Add(self.rhelp, 1, wx.EXPAND) 
     118        vboxl.Add(self.lhelp, 1, wx.EXPAND) 
    52119        rpanel.SetSizer(vbox) 
    53         #lpanel.SetFocus() 
     120        lpanel.SetSizer(vboxl) 
     121        lpanel.SetFocus() 
    54122         
    55123        self.SetSizer(vbox1) 
     124         
    56125        self.Centre() 
    57126        self.Show(True) 
     127    def OnLinkClicked(self, event): 
     128        """ 
     129            Function to diplay html page related to the hyperlinktext selected 
     130        """ 
     131        link= event.GetLinkInfo().GetHref() 
     132        self.rhelp.LoadPage(link) 
     133 
    58134 
    59135class MyApp(wx.App): 
Note: See TracChangeset for help on using the changeset viewer.