Index: pr_inversion/__init__.py
===================================================================
--- pr_inversion/__init__.py	(revision 9e8dc223ee841261f4cf577f54920873d455660d)
+++ pr_inversion/__init__.py	(revision 9a11937a59823081f8f1d4dd70374e3284ddcc7f)
@@ -0,0 +1,48 @@
+"""
+    P(r) inversion for SANS
+"""
+## \mainpage P(r) inversion for SANS
+#
+# \section intro_sec Introduction
+# This module provides calculations to transform scattering intensity data 
+# I(q) into distance distribution function P(r). A description of the 
+# technique can be found elsewhere [1-5]. The module is useable as a 
+# standalone application but its functionality is meant to be presented 
+# to end-users through the user interface developed as part of the SANS 
+# flagship application. 
+#
+# Procedure: We will follow the procedure of Moore [1].
+# 
+# [1] P.B. Moore, J.Appl. Cryst (1980) 13, 168-175.
+# [2] O. Glatter, J.Appl. Cryst (1977) 10, 415-421.
+# [3] D.I. Svergun, J.Appl. Cryst (1991) 24, 485-492.
+# [4] D.I. Svergun, J.Appl. Cryst (1992) 25, 495-503.
+# [5] S. Hansen and J. Skov Pedersen, J.Appl. Cryst (1991) 24, 541-548.
+#
+#
+# \section install_sec Installation
+#
+# \subsection obtain Obtaining the Code
+#
+# The code is available here:
+# \verbatim
+#$ svn co svn://danse.us/sans/pr_inversion
+# \endverbatim
+#
+# \subsection depends External Dependencies
+# scipy, numpy, pylab
+#
+# \subsection build Building the code
+# The standard python package can be built with distutils.
+# \verbatim
+#$ python setup.py build
+#$ python setup.py install
+# \endverbatim
+#
+#
+# Examples are available as unit tests under sans.pr_inversion.test.
+#
+# \section help_sec Contact Info
+# Code and Documentation produced as part of the DANSE project.
+
+__author__ = 'University of Tennessee'
Index: pr_inversion/invertor.py
===================================================================
--- pr_inversion/invertor.py	(revision f71287f458148547d69aae7ddc900f1afde663f6)
+++ pr_inversion/invertor.py	(revision 9a11937a59823081f8f1d4dd70374e3284ddcc7f)
@@ -3,6 +3,33 @@
 import sys
 
+def help():
+    """
+        Provide general online help text
+    """
+    info_txt  = "The inversion approach is based on Moore, J. Appl. Cryst. (1980) 13, 168-175.\n\n"
+    info_txt += "P(r) is set to be equal to an expansion of base functions of the type "
+    info_txt += "phi_n(r) = 2*r*sin(pi*n*r/D_max). The coefficient of each base functions "
+    info_txt += "in the expansion is found by performing a least square fit with the "
+    info_txt += "following fit function:\n\n"
+    info_txt += "chi**2 = sum_i[ I_meas(q_i) - I_th(q_i) ]**2/error**2 + Reg_term\n\n"
+    info_txt += "where I_meas(q) is the measured scattering intensity and I_th(q) is "
+    info_txt += "the prediction from the Fourier transform of the P(r) expansion. "
+    info_txt += "The Reg_term term is a regularization term set to the second derivative "
+    info_txt += "d**2P(r)/dr**2 integrated over r. It is used to produce a smooth P(r) output.\n\n"
+    info_txt += "The following are user inputs:\n\n"
+    info_txt += "   - Number of terms: the number of base functions in the P(r) expansion.\n\n"
+    info_txt += "   - Regularization constant: a multiplicative constant to set the size of "
+    info_txt += "the regularization term.\n\n"
+    info_txt += "   - Maximum distance: the maximum distance between any two points in the system.\n"
+     
+    return info_txt
+    
+
 class Invertor(Cinvertor):
-    
+    """
+        Invertor class to perform P(r) inversion
+        
+        TODO: explain the maths
+    """
     ## Chisqr of the last computation
     chi2  = 0
@@ -191,5 +218,7 @@
         # blah = numpy.ascontiguousarray(blah_original)
         # ... before passing it to C
-        
+        """
+            TODO: Document this
+        """
         import math
         from scipy.linalg.basic import lstsq
@@ -410,4 +439,5 @@
     
         file.close()
+     
         
     def from_file(self, path):
