[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] | 6 | P(r) Calculation |
---|
| 7 | ================ |
---|
[ec392464] | 8 | |
---|
[8a22b5b] | 9 | Description |
---|
| 10 | ----------- |
---|
[ec392464] | 11 | |
---|
[1221196] | 12 | This tool calculates a real-space distance distribution function, *P(r)*, using |
---|
| 13 | the 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] | 20 | The coefficient of each base function in the expansion is found by performing |
---|
[8a22b5b] | 21 | a 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] | 28 | where $I_{meas}(Q_i)$ is the measured scattering intensity and $I_{th}(Q_i)$ is |
---|
[1221196] | 29 | the prediction from the Fourier transform of the *P(r)* expansion. |
---|
[0391dae] | 30 | |
---|
[1221196] | 31 | The $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] | 36 | Using P(r) inversion |
---|
| 37 | -------------------- |
---|
[ec392464] | 38 | |
---|
[8a22b5b] | 39 | The 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] | 49 | P(r) inversion requires that the background be perfectly subtracted. This is |
---|
| 50 | often difficult to do well and thus many data sets will include a background. |
---|
[1abd19c] | 51 | For those cases, the user should check the "Estimate background level" option |
---|
| 52 | and the module will do its best to estimate it. If you know the background value |
---|
| 53 | for your data, select the "Input manual background level" option. Note that |
---|
| 54 | this value will be treated as having 0 error. |
---|
[0391dae] | 55 | |
---|
| 56 | The 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*. |
---|
| 58 | These are constantly updated in the buttons next to the entry boxes on the GUI. |
---|
| 59 | These are almost always close and unless the user has a good reason to choose |
---|
| 60 | differently they should just click on the buttons to accept both. {D_max} must |
---|
| 61 | still be set by the user. However, besides looking at the output, the user can |
---|
| 62 | click the explore button which will bring up a graph of chi^2 vs Dmax over a |
---|
| 63 | range around the current Dmax. The user can change the range and the number of |
---|
| 64 | points to explore in that range. They can also choose to plot several other |
---|
| 65 | parameters as a function of Dmax including: I0, Rg, Oscillation parameter, |
---|
| 66 | background, positive fraction, and 1-sigma positive fraction. |
---|
| 67 | |
---|
[8a22b5b] | 68 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 69 | |
---|
| 70 | Reference |
---|
| 71 | --------- |
---|
| 72 | |
---|
| 73 | P.B. Moore |
---|
| 74 | *J. Appl. Cryst.*, 13 (1980) 168-175 |
---|
| 75 | |
---|
| 76 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 77 | |
---|
[0391dae] | 78 | .. note:: This help document was last modified by Paul Butler, 05 September, 2016 |
---|