Changes in src/sas/sasgui/perspectives/fitting/media/fitting_help.rst [8b89396:fa307dd] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/media/fitting_help.rst
r8b89396 rfa307dd 42 42 * *Ellipsoid* - ellipsoidal shapes (oblate,prolate, core shell, etc) 43 43 * *Parellelepiped* - as the name implies 44 * *Sphere* - s heroidal shapes (sphere, core multishell, vesicle, etc)44 * *Sphere* - spheroidal shapes (sphere, core multishell, vesicle, etc) 45 45 * *Lamellae* - lamellar shapes (lamellar, core shell lamellar, stacked 46 46 lamellar, etc) … … 61 61 on the *Description* button to the right. 62 62 63 Product Models 64 ^^^^^^^^^^^^^^ 65 66 S(Q) models can be combined with many models in the other categories to 67 generate what SasView calls "product models". The combination can be done by 68 one of two methods, but how they behave is slightly different. 69 70 The first, most straightforward, method is simply to use the S(Q) drop-down in 71 the FitPage: 72 73 .. figure:: p_and_s_buttons.png 74 75 This example would then generate a product model with the following parameters: 76 77 .. figure:: p_and_s_buttons_parameters.png 78 79 The other method is to use the :ref:`Sum|Multi(p1,p2)` tool under Fitting > 80 Plugin Model Operations: 81 82 .. figure:: p_and_s_sum_model.png 83 84 This creates a product model with the following parameters: 85 86 .. figure:: p_and_s_sum_model_parameters.png 87 88 As can be seen, the second method has produced a product model with an extra 89 parameter: *radius_effective*. This is the radial distance determining the 90 range of the $S(Q)$ interaction and may, or may not, be the same as the 91 *radius*, in this example, depending on the concentration of the system. In 92 other systems, *radius_effective* may depend on the particle form (shape). 93 94 See :ref:`Product_Models` for more information. 95 63 96 Show 1D/2D 64 97 ^^^^^^^^^^ … … 119 152 120 153 For a complete list of all the library models available in SasView, see 121 the `Model Documentation <../../../ index.html>`_ .154 the `Model Documentation <../../../sasgui/perspectives/fitting/models/index.html>`_ . 122 155 123 156 It is also possible to add your own models. … … 217 250 a P(Q) model has been selected). 218 251 252 .. _Sum|Multi(p1,p2): 253 219 254 Sum|Multi(p1,p2) 220 255 ^^^^^^^^^^^^^^^^ … … 341 376 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 342 377 378 Fitting Integer Parameters 379 -------------------------- 380 381 Most of the parameters in SasView models will naturally take floating point (decimal) 382 values, but there are some parameters which can only have integer values. Examples 383 include, but are not limited to, the number of shells in a multilayer vesicle, the 384 number of beads in a pearl necklace, the number of arms of a star polymer, and so on. 385 Wherever possible/recognised, the integer nature of a parameter is specified in the 386 respective model documentation and/or parameter table, so read the documentation 387 carefully! 388 389 Integer parameters must be fitted with care. 390 391 Start with your best possible guess for the value of the parameter. And using 392 *a priori* knowledge, fix as many of the other parameters as possible. 393 394 The SasView optimizers treat integer parameters internally as floating point 395 numbers, but the values presented to the user are truncated or rounded, as 396 appropriate. 397 398 In most instances integer parameters will probably be greater than zero. A good 399 policy in such cases is to use a constraint to enforce this. 400 401 Because an integer parameter should, by definition, only move in integer steps, 402 problems may be encountered if the optimizer step size is too small. Similarly, 403 be **very careful** about applying polydispersity to integer parameters. 404 405 The Levenberg-Marquardt and Quasi-Newton BFGS (and other derivative-based) 406 optimizers are probably best avoided for fitting models with integer parameters. 407 408 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 409 343 410 Fitting Limits 344 411 -------------- … … 426 493 See :ref:`Assessing_Fit_Quality`. 427 494 428 The objective of model-fitting is to find a *physically-plausible* model, and set429 of model parameters, that generate a theory that reproduces the experimental data 430 and gives residual values as close to zero as possible.495 The objective of model-fitting is to find a *physically-plausible* model, and 496 set of model parameters, that generate a theory that reproduces the experimental 497 data and minimizes the values of the residuals. 431 498 432 499 Change 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. 500 starts to represent the experimental data. Then check the tick boxes alongside 501 the 'background' and 'scale' parameters. Click the *Fit* button. SasView 502 will optimise the values of the 'background' and 'scale' and also display the 503 corresponding uncertainties on the optimised values. 504 505 .. note:: 506 If the uncertainty on a fitted parameter is unrealistically large, or if it 507 displays as NaN, the model is most likely a poor representation of the data, 508 the parameter in question is highly correlated with one or more of the other 509 fitted parameters, or the model is relatively insensitive to the value of 510 that particular parameter. 511 512 In the bottom left corner of the *Fit Page* is a box displaying a normalised 513 value of the statistical $\chi^2$ parameter (the reduced $\chi^2$, 514 See :ref:`Assessing_Fit_Quality`) returned by the optimiser. 444 515 445 516 Now 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 the447 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`.517 process until all relevant parameters are checked and have been optimised. As 518 the fit of the theory to the experimental data improves, the value of 'Reduced 519 Chi2' will decrease. A good model fit should produce values of Reduced Chi2 520 close to one, and certainly << 100. See :ref:`Assessing_Fit_Quality`. 450 521 451 522 SasView has a number of different optimisers (see the section :ref:`Fitting_Options`). … … 462 533 *the Data Explorer is checked (see the section* :ref:`Loading_data` *).* 463 534 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). 535 This mode is an extension of the :ref:`Single_Fit_Mode` that allows for some 536 relatively extensive constraints between fitted parameters in a single *FitPage* 537 or between several *FitPage*'s (eg, to constrain all fitted parameters to be the 538 same in a contrast series of *FitPages* except for the solvent sld parameter, 539 constrain the length to be twice that of the radius in a single *FitPage*, 540 fix the radius of the sphere in one *FitPage* to be the same as the radius of 541 the cylinder in a second *FitPage*, etc). 467 542 468 543 If the data to be fit are in multiple files, load each file, then select each file … … 501 576 next to *Add Constraint?* in the *Fit Constraints* box. 502 577 578 To constrain all identically named parameters to fit *simultaneously* to the 579 same value across all the *Fitpages* use the *Easy Setup* drop-down buttons in 580 the *Const & Simul Fit* page. 581 503 582 *NB: You can only constrain parameters that are set to refine.* 583 584 Constraints will generally be of the form 585 586 Mi Parameter1 = Mj.Parameter1 587 588 however the text box after the '=' sign can be used to adjust this 589 relationship; for example 590 591 Mi Parameter1 = scalar \* Mj.Parameter1 592 593 A 'free-form' constraint box is also provided. 594 595 Many constraints can be entered for a single fit. 504 596 505 597 When ready, click the *Fit* button on the *Const & Simul Fit* page, NOT the *Fit* 506 598 button on the individual *FitPage*'s. 507 599 508 Simultaneous Fits without Constraints509 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^510 511 600 The results of the model-fitting will be returned to each of the individual 512 601 *FitPage*'s. 513 602 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`. 603 Note that the Reduced Chi2 value returned is the SUM of the Reduced Chi2 of 604 each fit. To see the Reduced Chi2 value for a specific *FitPage*, click the 605 *Compute* button at the bottom of that *FitPage* to recalculate. Note that in 606 doing so the degrees of freedom will be set to Npts. 607 See :ref:`Assessing_Fit_Quality`. Moreover in the case of constraints the 608 degrees of freedom are less than one might think due to those constraints. 543 609 544 610 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 766 832 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 767 833 768 .. note:: This help document was last changed by Paul Butler, 10 September 769 2017 834 .*Document History* 835 836 | 2017-09-10 Paul Butler 837 | 2017-09-15 Steve King 838 | 2018-03-05 Paul Butler
Note: See TracChangeset
for help on using the changeset viewer.