Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/media/fitting_help.rst

    r47ace50 r8b89396  
    180180*checked*\ . 
    181181 
    182 Also note that the 'Fit Parameters' have been split into two sections: those 
    183 which can be polydisperse (shape and orientation parameters) and those which are 
    184 not (eg, scattering length densities). 
    185  
    186182A model file generated by this option can be viewed and further modified using 
    187183the :ref:`Advanced_Plugin_Editor` . 
    188184 
    189 **SasView version 4.2** made it possible to specify whether a plugin created with 
    190 the *New Plugin Model* dialog is actually a form factor P(Q) or a structure factor 
    191 S(Q). To do this, simply add one or other of the following lines under the *import* 
    192 statements. 
     185Note that the New Plugin Model Feature currently does not allow for parameters 
     186to be polydisperse.  However they can be edited in the Advanced Editor. 
     187 
     188 
     189**SasView version 4.2** made it possible to specify whether a plugin created 
     190with the *New Plugin Model* dialog is actually a form factor P(Q) or a structure 
     191factor S(Q). To do this, simply add one or other of the following lines under 
     192the *import* statements. 
    193193 
    194194For a form factor:: 
     
    200200     structure_factor = True 
    201201 
    202 If the plugin is a structure factor it is *also* necessary to add two variables to 
    203 the parameter list:: 
     202If the plugin is a structure factor it is *also* necessary to add two variables 
     203to the parameter list:: 
    204204 
    205205     parameters = [ 
     
    426426See :ref:`Assessing_Fit_Quality`. 
    427427 
    428 The objective of model-fitting is to find a *physically-plausible* model, and 
    429 set of model parameters, that generate a theory that reproduces the experimental 
    430 data and minimizes the values of the residuals. 
     428The objective of model-fitting is to find a *physically-plausible* model, and set 
     429of model parameters, that generate a theory that reproduces the experimental data 
     430and gives residual values as close to zero as possible. 
    431431 
    432432Change the default values of the model parameters by hand until the theory line 
    433 starts to represent the experimental data. Then check the tick boxes alongside 
    434 the 'background' and 'scale' parameters. Click the *Fit* button. SasView 
    435 will optimise the values of the 'background' and 'scale' and also display the 
    436 corresponding uncertainties on the optimised values. 
    437  
    438 .. note:: 
    439    If the uncertainty on a fitted parameter is unrealistically large, or if it 
    440    displays as NaN, the model is most likely a poor representation of the data, 
    441    the parameter in question is highly correlated with one or more of the other 
    442    fitted parameters, or the model is relatively insensitive to the value of 
    443    that particular parameter. 
    444  
    445 In the bottom left corner of the *Fit Page* is a box displaying a normalised 
    446 value of the statistical $\chi^2$ parameter (the reduced $\chi^2$, 
    447 See :ref:`Assessing_Fit_Quality`) returned by the optimiser. 
     433starts to represent the experimental data. Then uncheck the tick boxes alongside 
     434all parameters *except* the 'background' and the 'scale'. Click the *Fit* button. 
     435SasView will optimise the values of the 'background' and 'scale' and also display 
     436the corresponding uncertainties on the optimised values. 
     437 
     438*NB: If no uncertainty is shown it generally means that the model is not very* 
     439*dependent on the corresponding parameter (or that one or more parameters are* 
     440*'correlated').* 
     441 
     442In the bottom left corner of the *Fit Page* is a box displaying the normalised value 
     443of the statistical $\chi^2$ parameter returned by the optimiser. 
    448444 
    449445Now check the box for another model parameter and click *Fit* again. Repeat this 
    450 process until all relevant parameters are checked and have been optimised. As 
    451 the fit of the theory to the experimental data improves, the value of 'Reduced 
    452 Chi2' will decrease. A good model fit should produce values of Reduced Chi2 
    453 close to one, and certainly << 100. See :ref:`Assessing_Fit_Quality`. 
     446process until most or all parameters are checked and have been optimised. As the 
     447fit of the theory to the experimental data improves the value of 'chi2/Npts' will 
     448decrease. A good model fit should easily produce values of 'chi2/Npts' that are 
     449close to one, and certainly <100. See :ref:`Assessing_Fit_Quality`. 
    454450 
    455451SasView has a number of different optimisers (see the section :ref:`Fitting_Options`). 
     
    466462*the Data Explorer is checked (see the section* :ref:`Loading_data` *).* 
    467463 
    468 This mode is an extension of the :ref:`Single_Fit_Mode` that allows for some 
    469 relatively extensive constraints between fitted parameters in a single *FitPage* 
    470 or between several *FitPage*'s (eg, to constrain all fitted parameters to be the 
    471 same in a contrast series of *FitPages* except for the solvent sld parameter, 
    472 constrain the length to be twice that of the radius in a single *FitPage*, 
    473 fix the radius of the sphere in one *FitPage* to be the same as the radius of 
    474 the cylinder in a second *FitPage*, etc). 
     464This mode is an extension of the :ref:`Single_Fit_Mode` that fits two or more data 
     465sets *to the same model* simultaneously. If necessary it is possible to constrain 
     466fit parameters between data sets (eg, to fix a background level, or radius, etc). 
    475467 
    476468If the data to be fit are in multiple files, load each file, then select each file 
     
    509501next to *Add Constraint?* in the *Fit Constraints* box. 
    510502 
    511 To constrain all identically named parameters to fit *simultaneously* to the 
    512 same value across all the *Fitpages* use the *Easy Setup* drop-down buttons in 
    513 the *Const & Simul Fit* page. 
    514  
    515503*NB: You can only constrain parameters that are set to refine.* 
     504 
     505When ready, click the *Fit* button on the *Const & Simul Fit* page, NOT the *Fit* 
     506button on the individual *FitPage*'s. 
     507 
     508Simultaneous Fits without Constraints 
     509^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
     510 
     511The results of the model-fitting will be returned to each of the individual 
     512*FitPage*'s. 
     513 
     514Note that the chi2/Npts value returned is the SUM of the chi2/Npts of each fit. To 
     515see the chi2/Npts value for a specific *FitPage*, click the *Compute* button at the 
     516bottom of that *FitPage* to recalculate. Also see :ref:`Assessing_Fit_Quality`. 
     517 
     518Simultaneous Fits with Constraints 
     519^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
     520 
     521Use the *Easy Setup* drop-down buttons in the *Const & Simul Fit* page to set 
     522up constraints between *FitPage*'s. 
    516523 
    517524Constraints will generally be of the form 
     
    528535Many constraints can be entered for a single fit. 
    529536 
    530 When ready, click the *Fit* button on the *Const & Simul Fit* page, NOT the *Fit* 
    531 button on the individual *FitPage*'s. 
    532  
    533537The results of the model-fitting will be returned to each of the individual 
    534538*FitPage*'s. 
    535539 
    536 Note that the Reduced Chi2 value returned is the SUM of the Reduced Chi2 of 
    537 each fit. To see the Reduced Chi2 value for a specific *FitPage*, click the  
    538 *Compute* button at the bottom of that *FitPage* to recalculate. Note that in 
    539 doing so the degrees of freedom will be set to Npts. 
    540 See :ref:`Assessing_Fit_Quality`.  Moreover in the case of constraints the 
    541 degrees of freedom are less than one might think due to those constraints. 
     540Note that the chi2/Npts value returned is the SUM of the chi2/Npts of each fit. To 
     541see the chi2/Npts value for a specific *FitPage*, click the *Compute* button at the 
     542bottom of that *FitPage* to recalculate. Also see :ref:`Assessing_Fit_Quality`. 
    542543 
    543544.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     
    765766.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    766767 
    767 .*Document History* 
    768  
    769 | 2017-09-10 Paul Butler 
    770 | 2017-09-15 Steve King 
    771 | 2018-03-05 Paul Butler 
     768.. note::  This help document was last changed by Paul Butler, 10 September 
     769   2017 
Note: See TracChangeset for help on using the changeset viewer.