Ignore:
Timestamp:
Jun 3, 2018 4:33:35 AM (6 years ago)
Author:
GitHub <noreply@…>
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
Children:
316b9c1
Parents:
de43192 (diff), 8b89396 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Paul Butler <butlerpd@…> (06/03/18 04:33:35)
git-committer:
GitHub <noreply@…> (06/03/18 04:33:35)
Message:

Merge pull request #151 from SasView?/ticket885b

Ticket885b

This reverts to no polydisperse parameters — ticket #885 needs to be updated to be a feature request adding polydispersity … correctly this time.

Location:
src/sas/sasgui/perspectives/fitting/media
Files:
2 edited

Legend:

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

    r47ace50 r9258c43c  
    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 = [ 
  • src/sas/sasgui/perspectives/fitting/media/residuals_help.rst

    r99ded31 r84ac3f1  
    2727 
    2828$\chi^2$ is a statistical parameter that quantifies the differences between 
    29 an observed data set and an expected dataset (or 'theory'). 
    30  
    31 When showing the a model with the data, *SasView* displays this parameter 
    32 normalized to the number of data points, $N_\mathrm{pts}$ such that 
     29an observed data set and an expected dataset (or 'theory') calculated as 
    3330 
    3431.. math:: 
    3532 
    36   \chi^2_N 
    37   =  \sum[(Y_i - \mathrm{theory}_i)^2 / \mathrm{error}_i^2] / N_\mathrm{pts} 
     33  \chi^2 
     34  =  \sum[(Y_i - \mathrm{theory}_i)^2 / \mathrm{error}_i^2] 
    3835 
    39 When performing a fit, *SasView* instead displays the reduced $\chi^2_R$, 
    40 which takes into account the number of fitting parameters $N_\mathrm{par}$ 
    41 (to calculate the number of 'degrees of freedom'). This is computed as 
     36Fitting typically minimizes the value of $\chi^2$.  For assessing the quality of 
     37the 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 
     39degrees of freedom (or DOF). The DOF is the number of data points being 
     40considered, $N_\mathrm{pts}$, reduced by the number of free (i.e. fitted) 
     41parameters, $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 
     43given as 
    4244 
    4345.. math:: 
     
    4749  / [N_\mathrm{pts} - N_\mathrm{par}] 
    4850 
    49 The normalized $\chi^2_N$ and the reduced $\chi^2_R$ are very close to each 
    50 other when $N_\mathrm{pts} \gg N_\mathrm{par}$. 
     51Note that this means the displayed value will vary depending on the number of 
     52parameters used in the fit. In particular, when doing a calculation without a 
     53fit (e.g. manually changing a parameter) the DOF will now equal $N_\mathrm{pts}$ 
     54and the $\chi^2_R$ will be the smallest possible for that combination of model, 
     55data set, and set of parameter values. 
     56 
     57When $N_\mathrm{pts} \gg N_\mathrm{par}$ as it should for proper fitting, the 
     58value of the reduced $\chi^2_R$ will not change very much. 
    5159 
    5260For a good fit, $\chi^2_R$ tends to 1. 
     
    9098| 2015-06-08 Steve King 
    9199| 2017-09-28 Paul Kienzle 
     100| 2018-03-04 Paul Butler 
Note: See TracChangeset for help on using the changeset viewer.