Index: calculator/slit_length_calculator.py
===================================================================
--- calculator/slit_length_calculator.py	(revision d267aed487102c084b6f7631fffee693a64ac3cc)
+++ calculator/slit_length_calculator.py	(revision 74b1770c459412a087638d5bfaae3d22dc9df204)
@@ -94,6 +94,6 @@
                         /(y_half_u - y_half_d)
         
-        # multiply by 2 due to the beam profile is for half beam
-        slit_length = 2.0 * x_half
+        # Our slit length is half width, so just give half beam value
+        slit_length = x_half
         
         # set slit_length
Index: calculator/test/utest_slit_length_calculator.py
===================================================================
--- calculator/test/utest_slit_length_calculator.py	(revision 9ec4406995d2463bd85cf07e6192d5a5a7292ca0)
+++ calculator/test/utest_slit_length_calculator.py	(revision 74b1770c459412a087638d5bfaae3d22dc9df204)
@@ -25,5 +25,6 @@
         
         # The value "5.5858" was obtained by manual calculation.
-        self.assertAlmostEqual(slitlength,5.5858, 3)
+        # It turns out our slit length is FWHM/2
+        self.assertAlmostEqual(slitlength,5.5858/2, 3)
         
         
Index: calculatorview/media/kiessig_calculator_help.html
===================================================================
--- calculatorview/media/kiessig_calculator_help.html	(revision 74b1770c459412a087638d5bfaae3d22dc9df204)
+++ calculatorview/media/kiessig_calculator_help.html	(revision 74b1770c459412a087638d5bfaae3d22dc9df204)
@@ -0,0 +1,27 @@
+<html>
+<body>
+<h4>Kiessig Thickness Calculator</h4>
+<ul>
+<li><a href="#Description">Description:</a></li>
+<li><a href="#HowTo">HowTo?</a></li>
+
+</ul>
+<h5><a name="Description">Description</a></h5>
+<p>
+This tool is to approximately estimate the thickness of a layer
+ or the diameter of particles from the Kiessig fringe in 
+ SANS/NR data, and uses the Kiessig relation;
+ thickness = 2*Pi/fringe_width.
+  
+</p>
+
+
+<h5><a name="HowTo">HowTo?</a></h5>
+<p>
+To get a rough thickness or particle size, just type the Kiessig fringe width (in the 1/A unit)
+ and click on the 'Compute' button. Then the output value will be show up in the 'Thickness' text box.</p>
+
+
+</body>
+
+</html>
Index: calculatorview/media/slit_calculator_help.html
===================================================================
--- calculatorview/media/slit_calculator_help.html	(revision e7ff682505a81e7441c707c9eaba83191b44d8fa)
+++ calculatorview/media/slit_calculator_help.html	(revision 74b1770c459412a087638d5bfaae3d22dc9df204)
@@ -9,5 +9,5 @@
 <h5><a name="Description">Description</a></h5>
 <p>
-This tool is for X-ray users to calculate the slit size (FWHM) 
+This tool is for X-ray users to calculate the slit size (FWHM/2) 
 for smearing  based on their half beam profile data (SAXSess). 
 </p>
@@ -16,5 +16,5 @@
 <h5><a name="HowTo">HowTo?</a></h5>
 <p>
-To calculate the FWHM slit size, just load the beam profile data using the browse button. </p>
+To calculate the slit size (FWHM/2), just load the beam profile data using the browse button. </p>
 <p>
 Once a data is loaded, the slit size will be computed and show up in the text box. </p>
Index: calculatorview/perspectives/calculator/calculator.py
===================================================================
--- calculatorview/perspectives/calculator/calculator.py	(revision 6137b1500635c6fedd6d779d3ae59748933c5e73)
+++ calculatorview/perspectives/calculator/calculator.py	(revision 74b1770c459412a087638d5bfaae3d22dc9df204)
@@ -112,4 +112,7 @@
         Returns a set of menu entries for tools
         """
+        kiessig_help = "This tool is to approximatly compute the "
+        kiessig_help += "thickness of a shell or the size of "
+        kiessig_help += "particles \n from the width of a Kiessig fringe."
         sld_help = "Provides computation related to Scattering Length Density"
         slit_length_help = "Provides computation related to Slit Length Density"
@@ -117,5 +120,7 @@
         return [("SLD Calculator", sld_help, self.on_calculate_sld),
                 ("Slit Size Calculator", slit_length_help,
-                                self.on_calculate_slit_size)]#,
+                        self.on_calculate_slit_size),
+                ("Kiessig Thickness Calculator", 
+                        kiessig_help, self.on_calculate_kiessig),]#,
                 #("Data Editor", data_editor_help, self.on_edit_data)]
               
@@ -127,5 +132,14 @@
         frame = DataEditorWindow(parent=self.parent, data=[], title="Data Editor")
         frame.Show(True)
-        
+
+    def on_calculate_kiessig(self, event):
+        """
+        Compute the Kiessig thickness
+        """
+        from kiessig_calculator_panel import KiessigWindow
+        frame = KiessigWindow()
+        frame.Show(True) 
+    
+       
     def on_calculate_sld(self, event):
         """
Index: calculatorview/perspectives/calculator/help_panel.py
===================================================================
--- calculatorview/perspectives/calculator/help_panel.py	(revision 1c779b6b9ee7ebebeb540ced435ec6d47848ac31)
+++ calculatorview/perspectives/calculator/help_panel.py	(revision 74b1770c459412a087638d5bfaae3d22dc9df204)
@@ -115,4 +115,5 @@
             <li><a href ="sld_calculator_help.html" target ="showframe">SLD Calculator</a><br></li>
             <li><a href ="slit_calculator_help.html" target ="showframe">Slit Size Calculator</a><br></li>
+            <li><a href ="kiessig_calculator_help.html" target ="showframe">Kiessig Thickness Calculator</a><br></li>
             </ul>
             </body>
Index: calculatorview/perspectives/calculator/kiessig_calculator_panel.py
===================================================================
--- calculatorview/perspectives/calculator/kiessig_calculator_panel.py	(revision 74b1770c459412a087638d5bfaae3d22dc9df204)
+++ calculatorview/perspectives/calculator/kiessig_calculator_panel.py	(revision 74b1770c459412a087638d5bfaae3d22dc9df204)
@@ -0,0 +1,191 @@
+"""
+   This software was developed by the University of Tennessee as part of the
+Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
+project funded by the US National Science Foundation. 
+
+See the license text in license.txt
+
+copyright 2008, 2009, University of Tennessee
+"""
+
+import wx
+import sys
+import os
+
+from sans.guicomm.events import StatusEvent  
+from sans.calculator.kiessig_calculator import KiessigThicknessCalculator 
+from calculator_widgets import OutputTextCtrl, InputTextCtrl
+
+_BOX_WIDTH = 77
+#Slit length panel size 
+if sys.platform.count("win32") > 0:
+    PANEL_WIDTH = 500
+    PANEL_HEIGHT = 210
+    FONT_VARIANT = 0
+else:
+    PANEL_WIDTH = 530
+    PANEL_HEIGHT = 250
+    FONT_VARIANT = 1
+ 
+class KiessigThicknessCalculatorPanel(wx.Panel):
+    """
+    Provides the Kiessig thickness calculator GUI.
+    """
+    ## Internal nickname for the window, used by the AUI manager
+    window_name = "Kiessig Thickness Calculator"
+    ## Name to appear on the window title bar
+    window_caption = "Kiessig Thickness Calculator"
+    ## Flag to tell the AUI manager to put this panel in the center pane
+    CENTER_PANE = True
+    
+    def __init__(self, parent, id=-1, *args, **kwds):
+        wx.Panel.__init__(self, parent, id=id, *args, **kwds)
+        #Font size 
+        self.SetWindowVariant(variant=FONT_VARIANT)  
+        # Object that receive status event
+        self.parent = parent
+        self.kiessig = KiessigThicknessCalculator()
+        self._do_layout()
+       
+    def _define_structure(self):
+        """
+        Define the main sizers building to build this application.
+        """
+        self.main_sizer = wx.BoxSizer(wx.VERTICAL)
+        self.box_source = wx.StaticBox(self, -1,
+                                str("Kiessig Thickness Calculator"))
+        self.boxsizer_source = wx.StaticBoxSizer(self.box_source,
+                                                    wx.VERTICAL)
+        self.dq_name_sizer = wx.BoxSizer(wx.HORIZONTAL)
+        self.thickness_size_sizer = wx.BoxSizer(wx.HORIZONTAL)
+        self.hint_sizer = wx.BoxSizer(wx.HORIZONTAL)
+        self.button_sizer = wx.BoxSizer(wx.HORIZONTAL)
+       
+    def _layout_dq_name(self):
+        """
+        Fill the sizer containing dq name
+        """
+        # get the default dq
+        dq_value = str(self.kiessig.get_deltaq())
+        dq_unit_txt = wx.StaticText(self, -1, '[1/A]')
+        dq_name_txt = wx.StaticText(self, -1, 
+                                'Kiessig Fringe Width (Delta Q): ')
+        self.dq_name_tcl = InputTextCtrl(self, -1, 
+                                         size=(_BOX_WIDTH,-1))
+        dq_hint = "Type the Kiessig Fringe Width (Delta Q)"
+        self.dq_name_tcl.SetValue(dq_value)
+        self.dq_name_tcl.SetToolTipString(dq_hint)
+        #control that triggers importing data
+        id = wx.NewId()
+        self.compute_button = wx.Button(self, id, "Compute")
+        hint_on_compute = "Compute the diameter/thickness in the real space."
+        self.compute_button.SetToolTipString(hint_on_compute)
+        self.Bind(wx.EVT_BUTTON, self.on_compute, id=id)
+        self.dq_name_sizer.AddMany([(dq_name_txt, 0, wx.LEFT, 15),
+                                    (self.dq_name_tcl, 0, wx.LEFT, 15),
+                                    (dq_unit_txt,0, wx.LEFT, 10),
+                                (self.compute_button, 0, wx.LEFT, 30)])
+    def _layout_thickness_size(self):
+        """
+        Fill the sizer containing thickness information
+        """
+        thick_unit = '['+self.kiessig.get_thickness_unit() +']'
+        thickness_size_txt = wx.StaticText(self, -1, 'Thickness (or Diameter): ')
+        self.thickness_size_tcl = OutputTextCtrl(self, -1, 
+                                                 size=(_BOX_WIDTH,-1))
+        thickness_size_hint = " Estimated Size in Real Space"
+        self.thickness_size_tcl.SetToolTipString(thickness_size_hint)
+        thickness_size_unit_txt = wx.StaticText(self, -1, thick_unit)
+        
+        self.thickness_size_sizer.AddMany([(thickness_size_txt, 0, wx.LEFT, 15),
+                                    (self.thickness_size_tcl, 0, wx.LEFT, 15),
+                                    (thickness_size_unit_txt, 0, wx.LEFT, 10)])
+    
+    def _layout_hint(self):
+        """
+        Fill the sizer containing hint 
+        """
+        hint_msg = "This tool is to approximately estimate the thickness of a layer"
+        hint_msg += " or the diameter of particles\n "
+        hint_msg += "from the Kiessig fringe width in SANS/NR data."
+        hint_msg += ""
+        self.hint_txt = wx.StaticText(self, -1, hint_msg)
+        self.hint_sizer.AddMany([(self.hint_txt, 0, wx.LEFT, 15)])
+    
+    def _layout_button(self):  
+        """
+        Do the layout for the button widgets
+        """ 
+        self.bt_close = wx.Button(self, wx.ID_CANCEL,'Close')
+        self.bt_close.Bind(wx.EVT_BUTTON, self.on_close)
+        self.bt_close.SetToolTipString("Close this window.")
+        self.button_sizer.AddMany([(self.bt_close, 0, wx.LEFT, 390)])
+        
+    def _do_layout(self):
+        """
+            Draw window content
+        """
+        self._define_structure()
+        self._layout_dq_name()
+        self._layout_thickness_size()
+        self._layout_hint()
+        self._layout_button()
+        self.boxsizer_source.AddMany([(self.dq_name_sizer, 0,
+                                          wx.EXPAND|wx.TOP|wx.BOTTOM, 5),
+                                   (self.thickness_size_sizer, 0,
+                                     wx.EXPAND|wx.TOP|wx.BOTTOM, 5),
+                                     (self.hint_sizer, 0,
+                                     wx.EXPAND|wx.TOP|wx.BOTTOM, 5)])
+        self.main_sizer.AddMany([(self.boxsizer_source, 0, wx.ALL, 10),
+                                  (self.button_sizer, 0,
+                                    wx.EXPAND|wx.TOP|wx.BOTTOM, 5)])
+        self.SetSizer(self.main_sizer)
+        self.SetAutoLayout(True)
+
+    def on_close(self, event):
+        """
+        close the window containing this panel
+        """
+        self.parent.Close()
+        
+    def on_compute(self, event):
+        """
+        Execute the computation of thickness
+        """
+        # skip for another event
+        if event != None:
+            event.Skip()
+        dq = self.dq_name_tcl.GetValue()
+        self.kiessig.set_deltaq(dq)
+        # calculate the thickness 
+        output = self.kiessig.compute_thickness()
+        thickness = self.format_number(output)
+        # set tcl
+        self.thickness_size_tcl.SetValue(str(thickness))
+        
+    def format_number(self,value=None):
+        """
+        Return a float in a standardized, human-readable formatted string 
+        """
+        try: 
+            value = float(value)
+        except:
+            output = None
+            return output
+
+        output= "%-7.4g" % value
+        return output.lstrip().rstrip()   
+     
+class KiessigWindow(wx.Frame):
+    def __init__(self, parent=None, id=1, title="Kiessig Thickness Calculator"):
+        wx.Frame.__init__(self, parent, id, title, size=(PANEL_WIDTH,PANEL_HEIGHT))
+        self.parent = parent
+        self.panel = KiessigThicknessCalculatorPanel(parent=self)
+        self.Centre()
+        self.Show(True)
+        
+if __name__ == "__main__": 
+    app = wx.PySimpleApp()
+    frame = KiessigWindow()    
+    frame.Show(True)
+    app.MainLoop()     
Index: calculatorview/perspectives/calculator/slit_length_calculator_panel.py
===================================================================
--- calculatorview/perspectives/calculator/slit_length_calculator_panel.py	(revision 25a2ee306b01ea134890c411f8004a9189a01f6c)
+++ calculatorview/perspectives/calculator/slit_length_calculator_panel.py	(revision 74b1770c459412a087638d5bfaae3d22dc9df204)
@@ -86,5 +86,5 @@
             Fill the sizer containing slit size information
         """
-        slit_size_txt = wx.StaticText(self, -1, 'Slit Size (FWHM): ')
+        slit_size_txt = wx.StaticText(self, -1, 'Slit Size (FWHM/2): ')
         self.slit_size_tcl = InterActiveOutputTextCtrl(self, -1, size=(_BOX_WIDTH,-1))
         slit_size_hint = " Estimated full slit size"
