source: sasview/src/sas/sasgui/perspectives/pr/media/pr_help.rst @ 5a5e371

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalc
Last change on this file since 5a5e371 was 5a5e371, checked in by krzywon, 6 years ago

Document batch p(r) and link to the anchor from the results window. Remove unicode characters from batch results table for saving purposes.

  • Property mode set to 100644
File size: 3.7 KB
RevLine 
[ec392464]1.. pr_help.rst
2
3.. This is a port of the original SasView html help file to ReSTructured text
4.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
5
[b64b87c]6P(r) Calculation
7================
[ec392464]8
[8a22b5b]9Description
10-----------
[ec392464]11
[1221196]12This tool calculates a real-space distance distribution function, *P(r)*, using
13the inversion approach (Moore, 1980).
[8a22b5b]14
15*P(r)* is set to be equal to an expansion of base functions of the type
16
[0391dae]17.. math::
18  \Phi_{n(r)} = 2 r sin(\frac{\pi n r}{D_{max}})
[ec392464]19
[0391dae]20The coefficient of each base function in the expansion is found by performing
[8a22b5b]21a least square fit with the following fit function
22
[0391dae]23.. math::
[ec392464]24
[0391dae]25  \chi^2=\frac{\sum_i (I_{meas}(Q_i)-I_{th}(Q_i))^2}{error^2}+Reg\_term
[1221196]26
[ec392464]27
[0391dae]28where $I_{meas}(Q_i)$ is the measured scattering intensity and $I_{th}(Q_i)$ is
[1221196]29the prediction from the Fourier transform of the *P(r)* expansion.
[0391dae]30
[1221196]31The $Reg\_term$ term is a regularization term set to the second derivative
[0391dae]32$d^2P(r)/d^2r$ integrated over $r$. It is used to produce a smooth *P(r)* output.
[ec392464]33
[8a22b5b]34.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
[ec392464]35
[b64b87c]36Using P(r) inversion
37--------------------
[ec392464]38
[8a22b5b]39The user must enter
40
41*  *Number of terms*: the number of base functions in the P(r) expansion.
[1221196]42
[8a22b5b]43*  *Regularization constant*: a multiplicative constant to set the size of
[ec392464]44   the regularization term.
45
[8a22b5b]46*  *Maximum distance*: the maximum distance between any two points in the
[ec392464]47   system.
[8a22b5b]48
[0391dae]49P(r) inversion requires that the background be perfectly subtracted.  This is
50often difficult to do well and thus many data sets will include a background.
[1abd19c]51For those cases, the user should check the "Estimate background level" option
52and the module will do its best to estimate it. If you know the background value
53for your data, select the "Input manual background level" option. Note that
54this value will be treated as having 0 error.
[0391dae]55
56The P(r) module is constantly computing in the background what the optimum
57*number of terms* should be as well as the optimum *regularization constant*.
58These are constantly updated in the buttons next to the entry boxes on the GUI.
59These are almost always close and unless the user has a good reason to choose
60differently they should just click on the buttons to accept both.  {D_max} must
61still be set by the user.  However, besides looking at the output, the user can
62click the explore button which will bring up a graph of chi^2 vs Dmax over a
63range around the current Dmax.  The user can change the range and the number of
64points to explore in that range.  They can also choose to plot several other
65parameters as a function of Dmax including: I0, Rg, Oscillation parameter,
66background, positive fraction, and 1-sigma positive fraction.
67
[8a22b5b]68.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
69
[5a5e371]70.. _Batch_Pr_Mode:
71
72Batch P(r) inversion
73--------------------
74
75The p(r) calculator accepts any number of data sets, and supports batch fitting
76for all data sets in the p(r) data set combo box. Switching between data sets in
77the combo box allows for individual fits and review of fit parameters. The
78displayed plots will also update to include the latest fit results for the
79selected data set.
80
81The 'Calculate All' button will run the p(r) calculation for each file,
82sequentially. The calculator will estimate the number of terms, background, and
83regularization constant for each file prior to running the p(r) calculation.
84The final results for all data sets are then presented in a savable data table.
85
86.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
87
[8a22b5b]88Reference
89---------
90
91P.B. Moore
92*J. Appl. Cryst.*, 13 (1980) 168-175
93
94.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
95
[5a5e371]96.. note::  This help document was last modified by Jeff Krzywon, 18 April 2018
Note: See TracBrowser for help on using the repository browser.