Ignore:
File:
1 edited

Legend:

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

    r8b89396 r6d7b252b  
    4242*  *Ellipsoid* - ellipsoidal shapes (oblate,prolate, core shell, etc) 
    4343*  *Parellelepiped* - as the name implies 
    44 *  *Sphere* - sheroidal shapes (sphere, core multishell, vesicle, etc) 
     44*  *Sphere* - spheroidal shapes (sphere, core multishell, vesicle, etc) 
    4545*  *Lamellae* - lamellar shapes (lamellar, core shell lamellar, stacked 
    4646   lamellar, etc) 
     
    6161on the *Description* button to the right. 
    6262 
     63Product Models 
     64^^^^^^^^^^^^^^ 
     65 
     66.. figure:: p_and_s_buttons.png 
     67 
     68S(Q) models can be combined with models in the other categories to generate 
     69what SasView calls "product models". See :ref:`Product_Models` for more 
     70information. 
     71 
    6372Show 1D/2D 
    6473^^^^^^^^^^ 
     
    119128 
    120129For a complete list of all the library models available in SasView, see 
    121 the `Model Documentation <../../../index.html>`_ . 
     130the `Model Documentation <../../../sasgui/perspectives/fitting/models/index.html>`_ . 
    122131 
    123132It is also possible to add your own models. 
     
    341350.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    342351 
     352Fitting Integer Parameters 
     353-------------------------- 
     354 
     355Most of the parameters in SasView models will naturally take floating point (decimal)  
     356values, but there are some parameters which can only have integer values. Examples  
     357include, but are not limited to, the number of shells in a multilayer vesicle, the  
     358number of beads in a pearl necklace, the number of arms of a star polymer, and so on. 
     359Wherever possible/recognised, the integer nature of a parameter is specified in the  
     360respective model documentation and/or parameter table, so read the documentation  
     361carefully! 
     362 
     363Integer parameters must be fitted with care. 
     364 
     365Start with your best possible guess for the value of the parameter. And using  
     366*a priori* knowledge, fix as many of the other parameters as possible. 
     367  
     368The SasView optimizers treat integer parameters internally as floating point  
     369numbers, but the values presented to the user are truncated or rounded, as  
     370appropriate. 
     371 
     372In most instances integer parameters will probably be greater than zero. A good  
     373policy in such cases is to use a constraint to enforce this. 
     374 
     375Because an integer parameter should, by definition, only move in integer steps,  
     376problems may be encountered if the optimizer step size is too small. Similarly,  
     377be **very careful** about applying polydispersity to integer parameters. 
     378 
     379The Levenberg-Marquardt and Quasi-Newton BFGS (and other derivative-based)  
     380optimizers are probably best avoided for fitting models with integer parameters. 
     381 
     382.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     383 
    343384Fitting Limits 
    344385-------------- 
     
    426467See :ref:`Assessing_Fit_Quality`. 
    427468 
    428 The objective of model-fitting is to find a *physically-plausible* model, and set 
    429 of model parameters, that generate a theory that reproduces the experimental data 
    430 and gives residual values as close to zero as possible. 
     469The objective of model-fitting is to find a *physically-plausible* model, and 
     470set of model parameters, that generate a theory that reproduces the experimental 
     471data and minimizes the values of the residuals. 
    431472 
    432473Change the default values of the model parameters by hand until the theory line 
    433 starts to represent the experimental data. Then uncheck the tick boxes alongside 
    434 all parameters *except* the 'background' and the 'scale'. Click the *Fit* button. 
    435 SasView will optimise the values of the 'background' and 'scale' and also display 
    436 the 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  
    442 In the bottom left corner of the *Fit Page* is a box displaying the normalised value 
    443 of the statistical $\chi^2$ parameter returned by the optimiser. 
     474starts to represent the experimental data. Then check the tick boxes alongside 
     475the 'background' and 'scale' parameters. Click the *Fit* button. SasView 
     476will optimise the values of the 'background' and 'scale' and also display the 
     477corresponding uncertainties on the optimised values. 
     478 
     479.. note:: 
     480   If the uncertainty on a fitted parameter is unrealistically large, or if it 
     481   displays as NaN, the model is most likely a poor representation of the data, 
     482   the parameter in question is highly correlated with one or more of the other 
     483   fitted parameters, or the model is relatively insensitive to the value of 
     484   that particular parameter. 
     485 
     486In the bottom left corner of the *Fit Page* is a box displaying a normalised 
     487value of the statistical $\chi^2$ parameter (the reduced $\chi^2$, 
     488See :ref:`Assessing_Fit_Quality`) returned by the optimiser. 
    444489 
    445490Now check the box for another model parameter and click *Fit* again. Repeat this 
    446 process until most or all parameters are checked and have been optimised. As the 
    447 fit of the theory to the experimental data improves the value of 'chi2/Npts' will 
    448 decrease. A good model fit should easily produce values of 'chi2/Npts' that are 
    449 close to one, and certainly <100. See :ref:`Assessing_Fit_Quality`. 
     491process until all relevant parameters are checked and have been optimised. As 
     492the fit of the theory to the experimental data improves, the value of 'Reduced 
     493Chi2' will decrease. A good model fit should produce values of Reduced Chi2 
     494close to one, and certainly << 100. See :ref:`Assessing_Fit_Quality`. 
    450495 
    451496SasView has a number of different optimisers (see the section :ref:`Fitting_Options`). 
     
    462507*the Data Explorer is checked (see the section* :ref:`Loading_data` *).* 
    463508 
    464 This mode is an extension of the :ref:`Single_Fit_Mode` that fits two or more data 
    465 sets *to the same model* simultaneously. If necessary it is possible to constrain 
    466 fit parameters between data sets (eg, to fix a background level, or radius, etc). 
     509This mode is an extension of the :ref:`Single_Fit_Mode` that allows for some 
     510relatively extensive constraints between fitted parameters in a single *FitPage* 
     511or between several *FitPage*'s (eg, to constrain all fitted parameters to be the 
     512same in a contrast series of *FitPages* except for the solvent sld parameter, 
     513constrain the length to be twice that of the radius in a single *FitPage*, 
     514fix the radius of the sphere in one *FitPage* to be the same as the radius of 
     515the cylinder in a second *FitPage*, etc). 
    467516 
    468517If the data to be fit are in multiple files, load each file, then select each file 
     
    501550next to *Add Constraint?* in the *Fit Constraints* box. 
    502551 
     552To constrain all identically named parameters to fit *simultaneously* to the 
     553same value across all the *Fitpages* use the *Easy Setup* drop-down buttons in 
     554the *Const & Simul Fit* page. 
     555 
    503556*NB: You can only constrain parameters that are set to refine.* 
     557 
     558Constraints will generally be of the form 
     559 
     560  Mi Parameter1 = Mj.Parameter1 
     561 
     562however the text box after the '=' sign can be used to adjust this 
     563relationship; for example 
     564 
     565  Mi Parameter1 = scalar \* Mj.Parameter1 
     566 
     567A 'free-form' constraint box is also provided. 
     568 
     569Many constraints can be entered for a single fit. 
    504570 
    505571When ready, click the *Fit* button on the *Const & Simul Fit* page, NOT the *Fit* 
    506572button on the individual *FitPage*'s. 
    507573 
    508 Simultaneous Fits without Constraints 
    509 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
    510  
    511574The results of the model-fitting will be returned to each of the individual 
    512575*FitPage*'s. 
    513576 
    514 Note that the chi2/Npts value returned is the SUM of the chi2/Npts of each fit. To 
    515 see the chi2/Npts value for a specific *FitPage*, click the *Compute* button at the 
    516 bottom of that *FitPage* to recalculate. Also see :ref:`Assessing_Fit_Quality`. 
    517  
    518 Simultaneous Fits with Constraints 
    519 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
    520  
    521 Use the *Easy Setup* drop-down buttons in the *Const & Simul Fit* page to set 
    522 up constraints between *FitPage*'s. 
    523  
    524 Constraints will generally be of the form 
    525  
    526   Mi Parameter1 = Mj.Parameter1 
    527  
    528 however the text box after the '=' sign can be used to adjust this 
    529 relationship; for example 
    530  
    531   Mi Parameter1 = scalar \* Mj.Parameter1 
    532  
    533 A 'free-form' constraint box is also provided. 
    534  
    535 Many constraints can be entered for a single fit. 
    536  
    537 The results of the model-fitting will be returned to each of the individual 
    538 *FitPage*'s. 
    539  
    540 Note that the chi2/Npts value returned is the SUM of the chi2/Npts of each fit. To 
    541 see the chi2/Npts value for a specific *FitPage*, click the *Compute* button at the 
    542 bottom of that *FitPage* to recalculate. Also see :ref:`Assessing_Fit_Quality`. 
     577Note that the Reduced Chi2 value returned is the SUM of the Reduced Chi2 of 
     578each fit. To see the Reduced Chi2 value for a specific *FitPage*, click the  
     579*Compute* button at the bottom of that *FitPage* to recalculate. Note that in 
     580doing so the degrees of freedom will be set to Npts. 
     581See :ref:`Assessing_Fit_Quality`.  Moreover in the case of constraints the 
     582degrees of freedom are less than one might think due to those constraints. 
    543583 
    544584.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     
    766806.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    767807 
    768 .. note::  This help document was last changed by Paul Butler, 10 September 
    769    2017 
     808.*Document History* 
     809 
     810| 2017-09-10 Paul Butler 
     811| 2017-09-15 Steve King 
     812| 2018-03-05 Paul Butler 
Note: See TracChangeset for help on using the changeset viewer.