Changeset 84ac3f1 in sasview
- Timestamp:
- Mar 4, 2018 10:14:20 PM (7 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
- Children:
- 47ace50
- Parents:
- a7c6f38
- Location:
- src/sas/sasgui/perspectives/fitting/media
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/media/fitting_help.rst
ra7c6f38 r84ac3f1 432 432 Change the default values of the model parameters by hand until the theory line 433 433 starts to represent the experimental data. Then check the tick boxes alongside 434 the 'background' and the'scale' parameters. Click the *Fit* button. SasView434 the 'background' and 'scale' parameters. Click the *Fit* button. SasView 435 435 will optimise the values of the 'background' and 'scale' and also display the 436 436 corresponding uncertainties on the optimised values. 437 437 438 438 .. note:: 439 If a parameter uncertainty is unrealistically large, or if it displays as440 NaN either the model is a poor representation of the data, the parameter in441 question is either highly correlated with one or more other fitted parameters442 or at least that the model is relatively insensitive to the value of that443 particular parameter.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 444 445 445 In the bottom left corner of the *Fit Page* is a box displaying the normalised … … 447 447 448 448 Now check the box for another model parameter and click *Fit* again. Repeat this 449 process until most or all parameters are checked and have been optimised. As the450 fit of the theory to the experimental data improves, the value of 'Reduced Chi2' 451 will decrease. A good model fit should produce values of Reduced Chi2 close 452 close to one, and certainly < 100. See :ref:`Assessing_Fit_Quality`.449 process until all relevant parameters are checked and have been optimised. As 450 the fit of the theory to the experimental data improves, the value of 'Reduced 451 Chi2' will decrease. A good model fit should produce values of Reduced Chi2 452 close to one, and certainly << 100. See :ref:`Assessing_Fit_Quality`. 453 453 454 454 SasView has a number of different optimisers (see the section :ref:`Fitting_Options`). … … 465 465 *the Data Explorer is checked (see the section* :ref:`Loading_data` *).* 466 466 467 This mode is an extension of the :ref:`Single_Fit_Mode` that fits two or more data 468 sets *to the same model* simultaneously. If necessary it is possible to constrain 469 fit parameters between data sets (eg, to fix a background level, or radius, etc). 467 This mode is an extension of the :ref:`Single_Fit_Mode` that allows for some 468 relatively extensive constraints between fitted parameters in a single *FitPage* 469 or between several *FitPage*'s (eg, to constrain all fitted parameters to be the 470 same in a contrast series of *FitPages* except for the solvent sld parameter, 471 contrain the length to be twice that of the radius in a single *FitPage*, 472 fix the radius of the sphere in one *FitPage* to be the same as the radius of 473 the cylinder in a second *FitPage*, etc). 470 474 471 475 If the data to be fit are in multiple files, load each file, then select each file … … 504 508 next to *Add Constraint?* in the *Fit Constraints* box. 505 509 510 To constrain all identically named parameters to fit *simultaneously* to the 511 same value across all the *Fitpages* use the *Easy Setup* drop-down buttons in 512 the *Const & Simul Fit* page. 513 506 514 *NB: You can only constrain parameters that are set to refine.* 515 516 Constraints will generally be of the form 517 518 Mi Parameter1 = Mj.Parameter1 519 520 however the text box after the '=' sign can be used to adjust this 521 relationship; for example 522 523 Mi Parameter1 = scalar \* Mj.Parameter1 524 525 A 'free-form' constraint box is also provided. 526 527 Many constraints can be entered for a single fit. 507 528 508 529 When ready, click the *Fit* button on the *Const & Simul Fit* page, NOT the *Fit* 509 530 button on the individual *FitPage*'s. 510 511 Simultaneous Fits without Constraints512 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^513 531 514 532 The results of the model-fitting will be returned to each of the individual … … 518 536 each fit. To see the Reduced Chi2 value for a specific *FitPage*, click the 519 537 *Compute* button at the bottom of that *FitPage* to recalculate. Note that in 520 doing so the degrees of freedome will be set to Npts. 521 See :ref:`Assessing_Fit_Quality`. 522 523 Simultaneous Fits with Constraints 524 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 525 526 Use the *Easy Setup* drop-down buttons in the *Const & Simul Fit* page to set 527 up constraints between *FitPage*'s. 528 529 Constraints will generally be of the form 530 531 Mi Parameter1 = Mj.Parameter1 532 533 however the text box after the '=' sign can be used to adjust this 534 relationship; for example 535 536 Mi Parameter1 = scalar \* Mj.Parameter1 537 538 A 'free-form' constraint box is also provided. 539 540 Many constraints can be entered for a single fit. 541 542 The results of the model-fitting will be returned to each of the individual 543 *FitPage*'s. 544 545 Note that the Reduced Chi2 value returned is the SUM of the Reduced Chi2 of 546 each fit. To see the Reduced Chi2 value for a specific *FitPage*, click the 547 *Compute* button at the bottom of that *FitPage* to recalculate. Note that in 548 doing so the degrees of freedome will be set to Npts. 538 doing so the degrees of freedom will be set to Npts. 549 539 See :ref:`Assessing_Fit_Quality`. Moreover in the case of constraints the 550 degrees of freedom are less than one might think do to those constraints. 540 degrees of freedom are less than one might think due to those constraints. 541 551 542 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 552 543 … … 773 764 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 774 765 775 .. note:: This help document was last changed by Paul Butler, 10 September 776 2017 766 .*Document History* 767 768 | 2017-09-10 Paul Butler 769 | 2017-09-15 Steve King 770 | 2018-03-05 Paul Butler -
src/sas/sasgui/perspectives/fitting/media/residuals_help.rst
ra7c6f38 r84ac3f1 34 34 = \sum[(Y_i - \mathrm{theory}_i)^2 / \mathrm{error}_i^2] 35 35 36 Fitting typically minimizes the value of $\chi^2$. However, for assessing the37 quality of the model and its "fit" this parameter is not terribly helpful on its 38 own. Thus *SasView* instead displays a normalized version of this parameter, 39 using the traditional reduced $\chi^2_R$. This is the $\chi^2$ divided by the 40 degrees of freedom (or DOF). The DOF is simply the number of data points being 41 considered reduced by the number of free (i.e. fitted) parameters. Note that 42 model parameters that are kept fixed do *not* contribute to the DOF (they are 43 not"free". This reduced value is thengiven as36 Fitting typically minimizes the value of $\chi^2$. For assessing the quality of 37 the model and its "fit" however, *SasView* displays the traditional reduced 38 $\chi^2_R$ which normalizes this parameter by dividing it by the number of 39 degrees of freedom (or DOF). The DOF is the number of data points being 40 considered, $N_\mathrm{pts}$, reduced by the number of free (i.e. fitted) 41 parameters, $N_\mathrm{par}$. Note that model parameters that are kept fixed do 42 *not* contribute to the DOF (they are not "free"). This reduced value is then 43 given as 44 44 45 45 .. math:: … … 49 49 / [N_\mathrm{pts} - N_\mathrm{par}] 50 50 51 where $N_\mathrm{par}$ is the number of *fitted* parameters. Note that this 52 means the displayed value will vary depending on the number of parameters used 53 in the fit. In particular, when doing a calculation without a fit (e.g. 54 manually changing a parameter) the DOF will now equal $N_\mathrm{pts}$ and the 55 $\chi^2_R$ will be the smallest possible for that combination of model, data 56 set and set of parameter values. 51 Note that this means the displayed value will vary depending on the number of 52 parameters used in the fit. In particular, when doing a calculation without a 53 fit (e.g. manually changing a parameter) the DOF will now equal $N_\mathrm{pts}$ 54 and the $\chi^2_R$ will be the smallest possible for that combination of model, 55 data set, and set of parameter values. 57 56 58 57 When $N_\mathrm{pts} \gg N_\mathrm{par}$ as it should for proper fitting, the … … 99 98 | 2015-06-08 Steve King 100 99 | 2017-09-28 Paul Kienzle 100 | 2018-03-04 Paul Butler
Note: See TracChangeset
for help on using the changeset viewer.