source: sasview/src/sas/pr/__init__.py @ c8d22ec

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since c8d22ec was b9a5f0e, checked in by krzywon, 10 years ago

90% complete with the conversion.

  • Property mode set to 100644
File size: 2.9 KB
Line 
1"""
2    P(r) inversion for SAS
3"""
4## \mainpage P(r) inversion for SAS
5#
6# \section intro_sec Introduction
7# This module provides calculations to transform scattering intensity data
8# I(q) into distance distribution function P(r). A description of the
9# technique can be found elsewhere [1-5]. The module is useable as a
10# standalone application but its functionality is meant to be presented
11# to end-users through the user interface developed as part of the SAS
12# flagship application.
13#
14# Procedure: We will follow the procedure of Moore [1].
15#
16# [1] P.B. Moore, J.Appl. Cryst (1980) 13, 168-175.
17#
18# [2] O. Glatter, J.Appl. Cryst (1977) 10, 415-421.
19#
20# [3] D.I. Svergun, J.Appl. Cryst (1991) 24, 485-492.
21#
22# [4] D.I. Svergun, J.Appl. Cryst (1992) 25, 495-503.
23#
24# [5] S. Hansen and J. Skov Pedersen, J.Appl. Cryst (1991) 24, 541-548.
25#
26## \subsection class Class Diagram:
27# The following shows a partial class diagram with the main attributes
28# and methods of the invertor.
29#
30# \image html architecture.png
31#
32# \section install_sec Installation
33#
34# \subsection obtain Obtaining the Code
35#
36# The code is available here:
37# \verbatim
38#$ svn co svn://danse.us/sas/pr_inversion
39# \endverbatim
40#
41# \subsection depends External Dependencies
42# scipy, numpy
43#
44# \subsection build Building the code
45# The standard python package can be built with distutils.
46# \verbatim
47#$ python setup.py build
48#$ python setup.py install
49# \endverbatim
50#
51#
52# \subsection Tutorial
53# To create an inversion object:
54# \verbatim
55#from sas.pr.invertor import Invertor
56#    invertor = Invertor()
57# \endverbatim
58#
59# To set the maximum distance between any two points:
60# \verbatim
61#    invertor.d_max = 160.0
62# \endverbatim
63#
64# To set the regularization constant:
65# \verbatim
66#    invertor.alpha = 0.0007
67# \endverbatim
68#
69# To set the q, I(q) and error on I(q):
70# \verbatim
71#    invertor.x = q_vector
72#    invertor.y = Iq_vector
73#    invertor.err = dIq_vector
74# \endverbatim
75#
76# To perform the inversion. In this example, we choose
77# a P(r) expension wit 10 base functions.
78# \verbatim
79#    c_out, c_cov = invertor.invert(10)
80# \endverbatim
81# The c_out and c_cov are the set of coefficients and the covariance
82# matrix for those coefficients, respectively.
83#
84# To get P(r):
85# \verbatim
86#    r = 10.0
87#    pr = invertor.pr(c_out, r)
88# \endverbatim
89# Alternatively, one can get P(r) with the error on P(r):
90# \verbatim
91#    r = 10.0
92#    pr, dpr = invertor.pr_err(c_out, c_cov, r)
93# \endverbatim
94#
95# To get the output I(q) from the set of coefficients found:
96# \verbatim
97#    q = 0.001
98#    iq = invertor.iq(c_out, q)
99# \endverbatim
100#
101# Examples are available as unit tests under sas.pr_inversion.test.
102#
103# \section help_sec Contact Info
104# Code and Documentation produced as part of the DANSE project.
105
106__author__ = 'University of Tennessee'
Note: See TracBrowser for help on using the repository browser.