Index: .gitignore
===================================================================
--- .gitignore	(revision aaad4c950340dd661ea6ea88902bb2c1a895de57)
+++ .gitignore	(revision ecdd1329f3d08a5aa572dbfe37b8bff1e161f9d3)
@@ -58,4 +58,5 @@
 /test/sasdataloader/test/isis_1_1_write_test.xml
 /test/sasdataloader/test/write_test.xml
+/test/fileconverter/test/export2d.h5
 test*log
 
Index: Vagrantfile
===================================================================
--- Vagrantfile	(revision 601b93d4f5d0df9b804d41b2f5cd81359a7dd583)
+++ Vagrantfile	(revision 0657b10d26d720ba2d37ccc2fd170a453a83b49d)
@@ -2,8 +2,8 @@
 # vi: set ft=ruby :
 
-# This allows you to build sasview using vagrant 
+# This allows you to build sasview using vagrant
 # for the moment you can build Ubuntu on any platform supported by vagrant
 # (Linux, Mac, Windows)
-# You will need VirtualBox as well. 
+# You will need VirtualBox as well.
 # Download pages:
 # http://www.vagrantup.com/downloads
@@ -21,5 +21,5 @@
   # Every Vagrant development environment requires a box. You can search for
   # boxes at https://atlas.hashicorp.com/search.
-  config.vm.box = "ubuntu/trusty64"
+  config.vm.box = "ubuntu/xenial64"
   #config.vm.box = "fedora19"
   #config.vm.box_url = "https://dl.dropboxusercontent.com/u/86066173/fedora-19.box"
@@ -40,4 +40,8 @@
   end
   #
+  config.vm.synced_folder ".", "/vagrant", disabled: true
+  config.vm.synced_folder ".", "/sasview-docs-test/sasview", disabled: false
+  config.vm.synced_folder "../sasmodels", "/sasview-docs-test/sasmodels", disabled: false
+
   config.vm.provision :shell, :path => "Vagrantprovision.sh"
 end
Index: Vagrantprovision.sh
===================================================================
--- Vagrantprovision.sh	(revision 795ea6a20bf45d14eaee0e6d2129d2019ac16563)
+++ Vagrantprovision.sh	(revision 0657b10d26d720ba2d37ccc2fd170a453a83b49d)
@@ -7,5 +7,5 @@
 pip install bumps comtypes periodictable 
 
-cat >> ~vagrant/.bashrc <<EOF
+cat >> ~/.bashrc <<EOF
 export LANG=en_US.UTF-8
 export LC_ALL=en_US.UTF-8
Index: docs/sphinx-docs/build_sphinx.py
===================================================================
--- docs/sphinx-docs/build_sphinx.py	(revision 751f4bdb1383a4267910b9a189f51206749158e0)
+++ docs/sphinx-docs/build_sphinx.py	(revision 01f1e174e9a9bcc2a3ecebc3d6448a75d9028016)
@@ -6,4 +6,6 @@
 http://sphinx-doc.org/invocation.html
 """
+from __future__ import print_function
+
 import subprocess
 import os
@@ -12,6 +14,6 @@
 import shutil
 import imp
+
 from glob import glob
-
 from distutils.dir_util import copy_tree
 from distutils.util import get_platform
@@ -55,19 +57,4 @@
 SASMODELS_DEST_BUILDIMG = os.path.join(SASMODELS_DEST_PROLOG, "user", "models", "img")
 
-#if os.path.exists(SASMODELS_SOURCE_PROLOG):
-#    print "Found models prolog folder at ", SASMODELS_SOURCE_PROLOG
-#if os.path.exists(SASMODELS_SOURCE_REF_MODELS):
-#    print "Found models ref folder at ", SASMODELS_SOURCE_REF_MODELS
-#if os.path.exists(SASMODELS_SOURCE_MODELS):
-#    print "Found models folder at ", SASMODELS_SOURCE_MODELS
-#if os.path.exists(SASMODELS_SOURCE_IMG):
-#    print "Found img folder at ", SASMODELS_SOURCE_IMG
-#if os.path.exists(SASMODELS_DEST_REF_MODELS):
-#    print "Found models ref folder at ", SASMODELS_DEST_REF_MODELS
-#if os.path.exists(SASMODELS_DEST_MODELS):
-#    print "Found models folder at ", SASMODELS_DEST_MODELS
-#if os.path.exists(SASMODELS_DEST_IMG):
-#    print "Found img folder at ", SASMODELS_DEST_IMG
-#sys.exit()
 
 SPHINX_BUILD = os.path.join(CURRENT_SCRIPT_DIR, "build")
@@ -88,5 +75,5 @@
         s=open(filename).read()
         if old_string in s:
-                print 'Changing "{old_string}" to "{new_string}"'.format(**locals())
+                print('Changing "{old_string}" to "{new_string}"'.format(**locals()))
                 s=s.replace(old_string, new_string)
                 f=open(filename, 'w')
@@ -95,10 +82,10 @@
                 f.close()
         else:
-                print 'No occurences of "{old_string}" found.'.format(**locals())
+                print('No occurences of "{old_string}" found.'.format(**locals()))
 
 def _remove_dir(dir_path):
     """Removes the given directory."""
     if os.path.isdir(dir_path):
-        print "Removing \"%s\"... " % dir_path
+        print("Removing \"%s\"... " % dir_path)
         shutil.rmtree(dir_path)
 
@@ -107,5 +94,5 @@
     Clean the sphinx build directory.
     """
-    print "=== Cleaning Sphinx Build ==="
+    print("=== Cleaning Sphinx Build ===")
     _remove_dir(SASVIEW_DOCS)
     _remove_dir(SPHINX_BUILD)
@@ -120,7 +107,7 @@
     Copy the source toctrees to new folder for assembling the sphinx-docs
     """
-    print "=== Copying Source toctrees ==="
+    print("=== Copying Source toctrees ===")
     if os.path.exists(SASVIEW_TOC_SOURCE):
-       print "Found docs folder at ", SASVIEW_TOC_SOURCE
+       print("Found docs folder at", SASVIEW_TOC_SOURCE)
        shutil.copytree(SASVIEW_TOC_SOURCE, SPHINX_SOURCE)
 
@@ -141,5 +128,5 @@
     so that Sphinx may pick it up when generating the documentation.
     """
-    print "=== Retrieve User Docs ==="
+    print("=== Retrieve User Docs ===")
 
     # Copy documentation files from their "source" to their "destination".
@@ -148,5 +135,5 @@
 
             docs = os.path.abspath(os.path.join(root, dirname))
-            print "Found docs folder at \"%s\"." % docs
+            print("Found docs folder at \"%s\"." % docs)
 
             dest_dir_part = os.path.dirname(os.path.relpath(docs, SASVIEW_SRC))
@@ -158,47 +145,48 @@
 
     # Now pickup testdata_help.rst
-#    print os.path.abspath(SASVIEW_TEST)
-#    print os.path.abspath(SPHINX_SOURCE_TEST)
-    print "=== Including Test Data Docs ==="
+    print("=== Including Test Data Docs ===")
     if os.path.exists(SASVIEW_TEST):
-       print "Found docs folder at ", SASVIEW_TEST
+       print("Found docs folder at", SASVIEW_TEST)
        shutil.copytree(SASVIEW_TEST, SPHINX_SOURCE_TEST)
 
-    print "=== And the Sasmodels Docs ==="
+    print("=== And the Sasmodels Docs ===")
     # Make sure we have the relevant images for the new sasmodels documentation
     # First(!) we'll make a local reference copy for SasView (/new-models will be cleaned each build)
     if os.path.exists(SASMODELS_SOURCE_IMG):
-        print "Found img  folder SASMODELS_SOURCE_IMG    at ", SASMODELS_SOURCE_IMG
+        print("Found img folder SASMODELS_SOURCE_IMG at", SASMODELS_SOURCE_IMG)
         if not os.path.exists(SASMODELS_DEST_IMG):
-            print "Missing docs folder SASMODELS_DEST_IMG at ", SASMODELS_DEST_IMG
+            print("Missing docs folder SASMODELS_DEST_IMG at", SASMODELS_DEST_IMG)
             os.makedirs(SASMODELS_DEST_IMG)
-            print "created SASMODELS_DEST_BUILDIMG at ", SASMODELS_DEST_BUILDIMG
-        else: print "Found img  folder SASMODELS_DEST_IMG      at ", SASMODELS_DEST_IMG
-        print "Copying sasmodels model image files..."
+            print("created SASMODELS_DEST_BUILDIMG at", SASMODELS_DEST_BUILDIMG)
+        else:
+            print("Found img folder SASMODELS_DEST_IMG at", SASMODELS_DEST_IMG)
+        print("Copying sasmodels model image files...")
         for files in os.listdir(SASMODELS_SOURCE_IMG):
             fromhere=os.path.join(SASMODELS_SOURCE_IMG,files)
             tohere=os.path.join(SASMODELS_DEST_IMG,files)
             shutil.copy(fromhere,tohere)
-    else: print "cannot find SASMODELS_SOURCE_IMG", SASMODELS_SOURCE_IMG
+    else:
+        print("no source directory",SASMODELS_SOURCE_IMG,"was found")
 
     if os.path.exists(SASMODELS_SOURCE_AUTOIMG):
-        print "Found img  folder SASMODELS_SOURCE_AUTOIMG    at ", SASMODELS_SOURCE_AUTOIMG
+        print("Found img folder SASMODELS_SOURCE_AUTOIMG at", SASMODELS_SOURCE_AUTOIMG)
         if not os.path.exists(SASMODELS_DEST_IMG):
-            print "Missing docs folder SASMODELS_DEST_IMG at ", SASMODELS_DEST_IMG
+            print("Missing docs folder SASMODELS_DEST_IMG at", SASMODELS_DEST_IMG)
             os.makedirs(SASMODELS_DEST_BUILDIMG)
-            print "created SASMODELS_DEST_BUILDIMG at ", SASMODELS_DEST_BUILDIMG
-        print "Copying sasmodels model auto-generated image files..."
+            print("created SASMODELS_DEST_BUILDIMG at", SASMODELS_DEST_BUILDIMG)
+        print("Copying sasmodels model auto-generated image files...")
         for files in os.listdir(SASMODELS_SOURCE_AUTOIMG):
             fromhere=os.path.join(SASMODELS_SOURCE_AUTOIMG,files)
             tohere=os.path.join(SASMODELS_DEST_IMG,files)
             shutil.copy(fromhere,tohere)
-    else: print "no source directory",SASMODELS_SOURCE_AUTOIMG ,"was found"
+    else:
+        print("no source directory",SASMODELS_SOURCE_AUTOIMG ,"was found")
 
     # And the rst prolog with the unit substitutions
     if os.path.exists(SASMODELS_SOURCE_PROLOG):
-        print "Found prolog folder SASMODELS_SOURCE_PROLOG at ", SASMODELS_SOURCE_PROLOG
+        print("Found prolog folder SASMODELS_SOURCE_PROLOG at", SASMODELS_SOURCE_PROLOG)
         if os.path.exists(SASMODELS_DEST_PROLOG):
-            print "Found docs folder SASMODELS_DEST_PROLOG   at ", SASMODELS_DEST_PROLOG
-            print "Copying sasmodels rst_prolog file..."
+            print("Found docs folder SASMODELS_DEST_PROLOG at", SASMODELS_DEST_PROLOG)
+            print("Copying sasmodels rst_prolog file...")
             for files in os.listdir(SASMODELS_SOURCE_PROLOG):
                 if files.startswith("rst"):
@@ -206,10 +194,12 @@
                     tohere=os.path.join(SASMODELS_DEST_PROLOG,files)
                     shutil.copy(fromhere,tohere)
+    else:
+        print("no source directory",SASMODELS_SOURCE_PROLOG, "was found")
 
     if os.path.exists(SASMODELS_SOURCE_GPU):
-        print "Found docs folder SASMODELS_SOURCE_GPU at ", SASMODELS_SOURCE_GPU
+        print("Found docs folder SASMODELS_SOURCE_GPU at", SASMODELS_SOURCE_GPU)
         if os.path.exists(SPHINX_SOURCE_USER):
-            print "Found docs folder SPHINX_SOURCE_USER      at ", SPHINX_SOURCE_USER
-            print "Copying sasmodels gpu files..."
+            print("Found docs folder SPHINX_SOURCE_USER at", SPHINX_SOURCE_USER)
+            print("Copying sasmodels gpu files...")
             for files in os.listdir(SASMODELS_SOURCE_GPU):
                 if files.endswith(".rst"):
@@ -217,10 +207,12 @@
                     tohere=os.path.join(SPHINX_SOURCE_USER,files)
                     shutil.copy(fromhere,tohere)
+    else:
+        print("no source directory",SASMODELS_SOURCE_GPU,"was found")
 
     if os.path.exists(SASMODELS_SOURCE_SESANS):
-        print "Found docs folder SASMODELS_SOURCE_SESANS at ", SASMODELS_SOURCE_SESANS
+        print("Found docs folder SASMODELS_SOURCE_SESANS at", SASMODELS_SOURCE_SESANS)
         if os.path.exists(SPHINX_SOURCE_USER):
-            print "Found docs folder SPHINX_SOURCE_USER      at ", SPHINX_SOURCE_USER
-            print "Copying sasmodels sesans files..."
+            print("Found docs folder SPHINX_SOURCE_USER at", SPHINX_SOURCE_USER)
+            print("Copying sasmodels sesans files...")
             for files in os.listdir(SASMODELS_SOURCE_SESANS):
                 if files.endswith(".rst"):
@@ -228,10 +220,12 @@
                     tohere=os.path.join(SPHINX_SOURCE_USER,files)
                     shutil.copy(fromhere,tohere)
+    else:
+        print("no source directory",SASMODELS_SOURCE_SESANS,"was found")
 
     if os.path.exists(SASMODELS_SOURCE_MAGNETISM):
-        print "Found docs folder SASMODELS_SOURCE_MAGNETISM at ", SASMODELS_SOURCE_MAGNETISM
+        print("Found docs folder SASMODELS_SOURCE_MAGNETISM at", SASMODELS_SOURCE_MAGNETISM)
         if os.path.exists(SASMODELS_DEST_REF_MODELS):
-            print "Found docs folder SASMODELS_DEST_REF_MODELS   at ", SASMODELS_DEST_REF_MODELS
-            print "Copying sasmodels model toctree files..."
+            print("Found docs folder SASMODELS_DEST_REF_MODELS at", SASMODELS_DEST_REF_MODELS)
+            print("Copying sasmodels model toctree files...")
             for files in os.listdir(SASMODELS_SOURCE_MAGNETISM):
                 if files.endswith(".rst"):
@@ -239,36 +233,40 @@
                     tohere=os.path.join(SASMODELS_DEST_REF_MODELS,files)
                     shutil.copy(fromhere,tohere)
+    else:
+        print("no source directory",SASMODELS_SOURCE_MAGNETISM,"was found")
 
     if os.path.exists(SASMODELS_SOURCE_MAGIMG):
-        print "Found img folder SASMODELS_SOURCE_MAGIMG   at ", SASMODELS_SOURCE_MAGIMG
+        print("Found img folder SASMODELS_SOURCE_MAGIMG   at", SASMODELS_SOURCE_MAGIMG)
         if not os.path.exists(SASMODELS_DEST_MAGIMG):
-            print "Missing img folder SASMODELS_DEST_MAGIMG at ", SASMODELS_DEST_MAGIMG
+            print("Missing img folder SASMODELS_DEST_MAGIMG at", SASMODELS_DEST_MAGIMG)
             os.makedirs(SASMODELS_DEST_MAGIMG)
-            print "created SASMODELS_DEST_MAGIMG at ", SASMODELS_DEST_MAGIMG
-        print "Copying sasmodels mag image files..."
+            print("created SASMODELS_DEST_MAGIMG at", SASMODELS_DEST_MAGIMG)
+        print("Copying sasmodels mag image files...")
         for files in os.listdir(SASMODELS_SOURCE_MAGIMG):
             fromhere=os.path.join(SASMODELS_SOURCE_MAGIMG,files)
             tohere=os.path.join(SASMODELS_DEST_MAGIMG,files)
             shutil.copy(fromhere,tohere)
-    else: print "no source directory",SASMODELS_SOURCE_MAGIMG ,"was found"
+    else:
+        print("no source directory",SASMODELS_SOURCE_MAGIMG ,"was found")
 
     if os.path.exists(SASMODELS_SOURCE_SESANSIMG):
-        print "Found img folder SASMODELS_SOURCE_SESANSIMG   at ", SASMODELS_SOURCE_SESANSIMG
+        print("Found img folder SASMODELS_SOURCE_SESANSIMG at", SASMODELS_SOURCE_SESANSIMG)
         if not os.path.exists(SASMODELS_DEST_SESANSIMG):
-            print "Missing img folder SASMODELS_DEST_SESANSIMG at ", SASMODELS_DEST_SESANSIMG
+            print("Missing img folder SASMODELS_DEST_SESANSIMG at", SASMODELS_DEST_SESANSIMG)
             os.makedirs(SASMODELS_DEST_SESANSIMG)
-            print "created SASMODELS_DEST_SESANSIMG at ", SASMODELS_DEST_SESANSIMG
-        print "Copying sasmodels sesans image files..."
+            print("created SASMODELS_DEST_SESANSIMG at", SASMODELS_DEST_SESANSIMG)
+        print("Copying sasmodels sesans image files...")
         for files in os.listdir(SASMODELS_SOURCE_SESANSIMG):
             fromhere=os.path.join(SASMODELS_SOURCE_SESANSIMG,files)
             tohere=os.path.join(SASMODELS_DEST_SESANSIMG,files)
             shutil.copy(fromhere,tohere)
-    else: print "no source directory",SASMODELS_SOURCE_SESANSIMG ,"was found"
+    else:
+        print("no source directory",SASMODELS_SOURCE_SESANSIMG ,"was found")
 
     if os.path.exists(SASMODELS_SOURCE_REF_MODELS):
-        print "Found docs folder SASMODELS_SOURCE_REF_MODELS at ", SASMODELS_SOURCE_REF_MODELS
+        print("Found docs folder SASMODELS_SOURCE_REF_MODELS at", SASMODELS_SOURCE_REF_MODELS)
         if os.path.exists(SASMODELS_DEST_REF_MODELS):
-            print "Found docs folder SASMODELS_DEST_REF_MODELS   at ", SASMODELS_DEST_REF_MODELS
-            print "Copying sasmodels model toctree files..."
+            print("Found docs folder SASMODELS_DEST_REF_MODELS at", SASMODELS_DEST_REF_MODELS)
+            print("Copying sasmodels model toctree files...")
             for files in os.listdir(SASMODELS_SOURCE_REF_MODELS):
                 if files.endswith(".rst"):
@@ -276,25 +274,27 @@
                     tohere=os.path.join(SASMODELS_DEST_REF_MODELS,files)
                     shutil.copy(fromhere,tohere)
-    # But need to change the path to the model docs in the tocs
-    for files in os.listdir(SASMODELS_DEST_REF_MODELS):
-#        print files
-        if files.startswith("shape"):
-            print "Changing toc paths in", files
-            inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/")
-        if files.startswith("sphere"):
-            print "Changing toc paths in", files
-            inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/")
-        if files.startswith("custom"):
-            print "Changing toc paths in", files
-            inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/")
-        if files.startswith("structure"):
-            print "Changing toc paths in", files
-            inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/")
+            # But need to change the path to the model docs in the tocs
+            for files in os.listdir(SASMODELS_DEST_REF_MODELS):
+        #        print files
+                if files.startswith("shape"):
+                    print("Changing toc paths in", files)
+                    inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/")
+                if files.startswith("sphere"):
+                    print("Changing toc paths in", files)
+                    inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/")
+                if files.startswith("custom"):
+                    print("Changing toc paths in", files)
+                    inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/")
+                if files.startswith("structure"):
+                    print("Changing toc paths in", files)
+                    inplace_change(os.path.join(SASMODELS_DEST_REF_MODELS,files), "../../model/", "models/")
+    else:
+        print("no source directory",SASMODELS_SOURCE_REF_MODELS," was found")
 
     if os.path.exists(SASMODELS_SOURCE_MODELS):
-        print "Found docs folder SASMODELS_SOURCE_MODELS at ", SASMODELS_SOURCE_MODELS
+        print("Found docs folder SASMODELS_SOURCE_MODELS at", SASMODELS_SOURCE_MODELS)
         if os.path.exists(SASMODELS_DEST_MODELS):
-            print "Found docs folder SASMODELS_DEST_MODELS   at ", SASMODELS_DEST_MODELS
-            print "Copying sasmodels model files..."
+            print("Found docs folder SASMODELS_DEST_MODELS at", SASMODELS_DEST_MODELS)
+            print("Copying sasmodels model files...")
             for files in os.listdir(SASMODELS_SOURCE_MODELS):
                 if files.endswith(".rst"):
@@ -303,10 +303,10 @@
                     shutil.copy(fromhere,tohere)
         else:
-            print "Missing docs folder SASMODELS_DEST_MODELS at ", SASMODELS_DEST_MODELS
+            print("Missing docs folder SASMODELS_DEST_MODELS at", SASMODELS_DEST_MODELS)
             os.makedirs(SASMODELS_DEST_MODELS)
             if not os.path.exists(SASMODELS_DEST_BUILDIMG):
                 os.makedirs(SASMODELS_DEST_BUILDIMG)
-            print "Created docs folder SASMODELS_DEST_MODELS at ", SASMODELS_DEST_MODELS
-            print "Copying model files for build..."
+            print("Created docs folder SASMODELS_DEST_MODELS at", SASMODELS_DEST_MODELS)
+            print("Copying model files for build...")
             for files in os.listdir(SASMODELS_SOURCE_MODELS):
                 if files.endswith(".rst"):
@@ -315,9 +315,12 @@
                     shutil.copy(fromhere,tohere)
             # No choice but to do this because model files are all coded for images in /models/img
-            print "Copying image files for build..."
+            print("Copying image files for build...")
             for files in os.listdir(SASMODELS_DEST_IMG):
                 fromhere=os.path.join(SASMODELS_DEST_IMG,files)
                 tohere=os.path.join(SASMODELS_DEST_BUILDIMG,files)
                 shutil.copy(fromhere,tohere)
+    else:
+        print("no source directory",SASMODELS_SOURCE_MODELS,"was found.")
+        print("!!!!NO MODEL DOCS WILL BE BUILT!!!!")
 
 
@@ -327,19 +330,18 @@
     """
     if os.path.exists(BUMPS_DOCS):
-        print "=== Retrieve BUMPS Docs ==="
+        print("=== Retrieve BUMPS Docs ===")
         filenames = [os.path.join(BUMPS_DOCS, "optimizer.rst")]
         filenames += glob(os.path.join(BUMPS_DOCS, "dream-*.png"))
         filenames += glob(os.path.join(BUMPS_DOCS, "fit-*.png"))
         for f in filenames:
-            print "Copying file", f
+            print("Copying file", f)
             shutil.copy(f, BUMPS_TARGET)
     else:
-        print """
-*** Error *** missing directory %s
+        print("""
+======= Error =======
+missing directory %s
 The documentation will not include the optimizer selection section.
 Checkout the bumps source tree and rebuild the docs.
-
-
-""" % BUMPS_DOCS
+""" % BUMPS_DOCS)
 
 def apidoc():
@@ -348,5 +350,5 @@
     in the SasView build directory.
     """
-    print "=== Generate API Rest Files ==="
+    print("=== Generate API Rest Files ===")
 
     # Clean directory before generating a new version.
@@ -362,5 +364,5 @@
     Runs sphinx-build.  Reads in all .rst files and spits out the final html.
     """
-    print "=== Build HTML Docs from Rest Files ==="
+    print("=== Build HTML Docs from Rest Files ===")
     subprocess.call(["sphinx-build",
                      "-b", "html", # Builder name. TODO: accept as arg to setup.py.
@@ -369,5 +371,5 @@
                      os.path.join(SPHINX_BUILD, "html")])
 
-    print "=== Copy HTML Docs to Build Directory ==="
+    print("=== Copy HTML Docs to Build Directory ===")
     html = os.path.join(SPHINX_BUILD, "html")
     copy_tree(html, SASVIEW_DOCS)
@@ -381,5 +383,5 @@
     build()
 
-    print "=== Done ==="
+    print("=== Done ===")
 
 if __name__ == "__main__":
Index: docs/sphinx-docs/source/user/tutorial.rst
===================================================================
--- docs/sphinx-docs/source/user/tutorial.rst	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ docs/sphinx-docs/source/user/tutorial.rst	(revision 461a917085638bceaabfa22752ae08830bd03274)
@@ -3,8 +3,10 @@
 .. _tutorial:
 
-Tutorial
-========
+Tutorials
+=========
 
 .. note:: In Windows use [Alt]-[Cursor left] to return to the previous page
 
-:download:`Tutorial <../../../../sasview/media/Tutorial.pdf>`
+:download:`Getting Started with Sasview <../../../../sasview/media/getting_started_with_sasview.pdf>`
+
+:download:`Old Tutorial <../../../../sasview/media/Tutorial.pdf>`
Index: docs/sphinx-docs/source/user/working.rst
===================================================================
--- docs/sphinx-docs/source/user/working.rst	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ docs/sphinx-docs/source/user/working.rst	(revision 8cc39d692a9ec93915b6320953059d50e5afbd77)
@@ -15,5 +15,5 @@
    Test Data <../test/testdata_help.rst>
       
-   Tutorial <tutorial.rst>
+   Tutorials <tutorial.rst>
    
    Writing a Plugin Model <sasgui/perspectives/fitting/plugin.rst>
Index: run.py
===================================================================
--- run.py	(revision 64ca561b6b264f63b4d7d09a6582f1f3330ae720)
+++ run.py	(revision f36e01fa1b9b521d3f7496b637e33bed18626df2)
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
 #!/usr/bin/env python
+
 """
 Run sasview in place.  This allows sasview to use the python
@@ -14,27 +16,12 @@
 """
 
+import imp
 import os
 import sys
-import imp
-import logging
-import logging.config
-
 from contextlib import contextmanager
-from os.path import abspath, dirname, join as joinpath
+from os.path import join as joinpath
+from os.path import abspath, dirname
 
 
-LOGGER_CONFIG_FILE = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'sasview/logging.ini')
-logging.config.fileConfig(LOGGER_CONFIG_FILE, disable_existing_loggers=True)
-logger = logging.getLogger(__name__)
-
-def update_all_logs_to_debug(logger):
-    '''
-    This updates all loggers and respective handlers to DEBUG
-    '''
-    for handler in logger.handlers or logger.parent.handlers:
-        handler.setLevel(logging.DEBUG)
-    for name,_ in logging.Logger.manager.loggerDict.items():
-        logging.getLogger(name).setLevel(logging.DEBUG)
-        
 def addpath(path):
     """
@@ -50,4 +37,5 @@
     sys.path.insert(0, path)
 
+
 @contextmanager
 def cd(path):
@@ -60,10 +48,12 @@
     os.chdir(old_dir)
 
+
 def import_package(modname, path):
     """Import a package into a particular point in the python namespace"""
-    mod = imp.load_source(modname, abspath(joinpath(path,'__init__.py')))
+    mod = imp.load_source(modname, abspath(joinpath(path, '__init__.py')))
     sys.modules[modname] = mod
     mod.__path__ = [abspath(path)]
     return mod
+
 
 def import_dll(modname, build_path):
@@ -72,7 +62,8 @@
     ext = sysconfig.get_config_var('SO')
     # build_path comes from context
-    path = joinpath(build_path, *modname.split('.'))+ext
-    #print "importing", modname, "from", path
+    path = joinpath(build_path, *modname.split('.')) + ext
+    # print "importing", modname, "from", path
     return imp.load_dynamic(modname, path)
+
 
 def prepare():
@@ -86,6 +77,6 @@
     from distutils.util import get_platform
     root = abspath(dirname(__file__))
-    platform = '%s-%s'%(get_platform(),sys.version[:3])
-    build_path = joinpath(root, 'build','lib.'+platform)
+    platform = '%s-%s' % (get_platform(), sys.version[:3])
+    build_path = joinpath(root, 'build', 'lib.' + platform)
 
     # Notify the help menu that the Sphinx documentation is in a different
@@ -98,13 +89,17 @@
     #if not os.path.exists(mplconfig): os.mkdir(mplconfig)
     #import matplotlib
-    #matplotlib.use('Agg')
-    #print matplotlib.__file__
+    # matplotlib.use('Agg')
+    # print matplotlib.__file__
     #import pylab; pylab.hold(False)
     # add periodictable to the path
-    try: import periodictable
-    except: addpath(joinpath(root, '..','periodictable'))
+    try:
+        import periodictable
+    except:
+        addpath(joinpath(root, '..', 'periodictable'))
 
-    try: import bumps
-    except: addpath(joinpath(root, '..','bumps'))
+    try:
+        import bumps
+    except:
+        addpath(joinpath(root, '..', 'bumps'))
 
     # select wx version
@@ -126,5 +121,5 @@
     # be better to just store the package in src/sas/sasview.
     import sas
-    sas.sasview = import_package('sas.sasview', joinpath(root,'sasview'))
+    sas.sasview = import_package('sas.sasview', joinpath(root, 'sasview'))
 
     # The sas.models package Compiled Model files should be pulled in from the build directory even though
@@ -135,5 +130,5 @@
     import sas.sascalc.pr
     sas.sascalc.pr.core = import_package('sas.sascalc.pr.core',
-                                  joinpath(build_path, 'sas', 'sascalc', 'pr', 'core'))
+                                         joinpath(build_path, 'sas', 'sascalc', 'pr', 'core'))
 
     # Compiled modules need to be pulled from the build directory.
@@ -141,5 +136,5 @@
     import sas.sascalc.file_converter
     sas.sascalc.file_converter.core = import_package('sas.sascalc.file_converter.core',
-                                  joinpath(build_path, 'sas', 'sascalc', 'file_converter', 'core'))                    
+                                                     joinpath(build_path, 'sas', 'sascalc', 'file_converter', 'core'))
 
     # Compiled modules need to be pulled from the build directory.
@@ -147,14 +142,22 @@
     import sas.sascalc.calculator
     sas.sascalc.calculator.core = import_package('sas.sascalc.calculator.core',
-                                  joinpath(build_path, 'sas', 'sascalc', 'calculator', 'core'))
+                                                 joinpath(build_path, 'sas', 'sascalc', 'calculator', 'core'))
 
     sys.path.append(build_path)
 
-    #print "\n".join(sys.path)
+    # print "\n".join(sys.path)
+
 
 if __name__ == "__main__":
-    update_all_logs_to_debug(logger)
+    # Need to add absolute path before actual prepare call,
+    # so logging can be done during initialization process too
+    root = abspath(dirname(__file__))
+    addpath(joinpath(root, 'sasview'))
+    from logger_config import SetupLogger
+    logger = SetupLogger(__name__).config_development()
+
+    logger.debug("Starting SASVIEW in debug mode.")
     prepare()
     from sas.sasview.sasview import run
     run()
-    
+    logger.debug("Ending SASVIEW in debug mode.")
Index: sasview/installer_generator.py
===================================================================
--- sasview/installer_generator.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ sasview/installer_generator.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -4,7 +4,10 @@
 exists in the current directory. Edit local_config.py according to your needs.
 """
+from __future__ import print_function
+
 import local_config
 import os 
 import string
+
 
 REG_PROGRAM = """{app}\MYPROG.EXE"" ""%1"""
@@ -364,6 +367,6 @@
     f.write(TEMPLATE)
     f.close()
-    print "Generate Inno setup installer script complete"
-    print "A new file %s.iss should be created.Please refresh your directory" % str(INSTALLER_FILE)
+    print("Generate Inno setup installer script complete")
+    print("A new file %s.iss should be created.Please refresh your directory" % str(INSTALLER_FILE))
     
 if __name__ == "__main__":
Index: sasview/local_config.py
===================================================================
--- sasview/local_config.py	(revision ea45bfe4e68bda8abf0866aa2c51cfcf4cf63e36)
+++ sasview/local_config.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -2,4 +2,6 @@
     Application settings
 """
+from __future__ import print_function
+
 import time
 import os
@@ -150,5 +152,5 @@
         :TODO - Need method doc string
         """
-        print "%g:  %s" % (time.clock(), message)
+        print("%g:  %s" % (time.clock(), message))
 
         if __EVT_DEBUG_2_FILE__:
Index: sasview/logger_config.py
===================================================================
--- sasview/logger_config.py	(revision f36e01fa1b9b521d3f7496b637e33bed18626df2)
+++ sasview/logger_config.py	(revision f36e01fa1b9b521d3f7496b637e33bed18626df2)
@@ -0,0 +1,83 @@
+from __future__ import print_function
+
+import logging
+import logging.config
+import os
+import os.path
+
+import pkg_resources
+
+
+'''
+Module that manages the global logging
+'''
+
+
+class SetupLogger(object):
+    '''
+    Called at the beginning of run.py or sasview.py
+    '''
+
+    def __init__(self, logger_name):
+        self._find_config_file()
+        self.name = logger_name
+
+    def config_production(self):
+        logger = logging.getLogger(self.name)
+        if not logger.root.handlers:
+            self._read_config_file()
+            logging.captureWarnings(True)
+            logger = logging.getLogger(self.name)
+        return logger
+
+    def config_development(self):
+        '''
+        '''
+        self._read_config_file()
+        logger = logging.getLogger(self.name)
+        self._update_all_logs_to_debug(logger)
+        logging.captureWarnings(True)
+        return logger
+
+    def _read_config_file(self):
+        if self.config_file is not None:
+            logging.config.fileConfig(self.config_file)
+
+    def _update_all_logs_to_debug(self, logger):
+        '''
+        This updates all loggers and respective handlers to DEBUG
+        '''
+        for handler in logger.handlers or logger.parent.handlers:
+            handler.setLevel(logging.DEBUG)
+        for name, _ in logging.Logger.manager.loggerDict.items():
+            logging.getLogger(name).setLevel(logging.DEBUG)
+
+    def _find_config_file(self, filename="logging.ini"):
+        '''
+        The config file is in:
+        Debug ./sasview/
+        Packaging: sas/sasview/
+        Packaging / production does not work well with absolute paths
+        thus the multiple paths below
+        '''
+        places_to_look_for_conf_file = [
+            os.path.join(os.path.abspath(os.path.dirname(__file__)), filename),
+            filename,
+            os.path.join("sas", "sasview", filename),
+            os.path.join(os.getcwd(), "sas", "sasview", filename),
+        ]
+
+        # To avoid the exception in OSx
+        # NotImplementedError: resource_filename() only supported for .egg, not .zip
+        try:
+            places_to_look_for_conf_file.append(
+                pkg_resources.resource_filename(__name__, filename))
+        except NotImplementedError:
+            pass
+
+        for filepath in places_to_look_for_conf_file:
+            if os.path.exists(filepath):
+                self.config_file = filepath
+                return
+        print("ERROR: Logging.ini not found...")
+        self.config_file = None
Index: sasview/logging.ini
===================================================================
--- sasview/logging.ini	(revision 64ca561b6b264f63b4d7d09a6582f1f3330ae720)
+++ sasview/logging.ini	(revision fc22533c01ad2a6c8b1c6b4a0fb67c15c527405d)
@@ -16,5 +16,6 @@
 
 [formatter_detailed]
-format=%(asctime)s:%(name)s:%(levelname)s: %(lineno)d: %(message)s
+#format=%(asctime)s : %(levelname)s : %(name)s: %(lineno)d: %(message)s
+format=%(asctime)s : %(levelname)s : %(name)s (%(filename)s:%(lineno)s) :: %(message)s
 
 ###############################################################################
@@ -27,10 +28,10 @@
 class=logging.StreamHandler
 formatter=simple
-level=INFO
+level=WARNING
 args=tuple()
 
 [handler_log_file]
 class=logging.FileHandler
-level=INFO
+level=DEBUG
 formatter=detailed
 args=(os.path.join(os.path.expanduser("~"),'sasview.log'),"a")
@@ -43,5 +44,5 @@
 
 [logger_root]
-level=INFO
+level=DEBUG
 formatter=default
 handlers=console,log_file
@@ -60,5 +61,5 @@
 
 [logger_sasgui]
-level=INFO
+level=DEBUG
 qualname=sas.sasgui
 handlers=console,log_file
Index: sasview/media/README.txt
===================================================================
--- sasview/media/README.txt	(revision 643dcd93773c48e06cd96864545e5a12a9f775e1)
+++ sasview/media/README.txt	(revision 5fa99237de58afe37b6ac2cfcb48e1b2393a34d7)
@@ -3,2 +3,4 @@
 
 The source files are in: /sasview/docs/sasview
+
+The getting_started_with_sasview.pdf has been manually added here until the auto-generated LibreOffice doc build is up and running.
Index: sasview/sasview.py
===================================================================
--- sasview/sasview.py	(revision 3608cd114aaf5142818c85b33f8f32323c34e481)
+++ sasview/sasview.py	(revision f36e01fa1b9b521d3f7496b637e33bed18626df2)
@@ -1,25 +1,24 @@
+# -*- coding: utf-8 -*-
 """
 Base module for loading and running the main SasView application.
 """
 ################################################################################
-#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.
+# 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
+# See the license text in license.txt
 #
-#copyright 2009, University of Tennessee
+# copyright 2009, University of Tennessee
 ################################################################################
 import os
+import os.path
 import sys
-import logging
-import logging.config
 import traceback
 
-logger = logging.getLogger(__name__)
-if not logger.root.handlers:
-    LOGGER_CONFIG_FILE = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'logging.ini')
-    logging.config.fileConfig(LOGGER_CONFIG_FILE, disable_existing_loggers=False)
-    logging.captureWarnings(True)
+from sas.sasview.logger_config import SetupLogger
+
+logger = SetupLogger(__name__).config_production()
+
 
 # Log the start of the session
@@ -55,9 +54,9 @@
 import wxcruft
 wxcruft.call_later_fix()
-#wxcruft.trace_new_id()
+# wxcruft.trace_new_id()
 
-#Always use private .matplotlib setup to avoid conflicts with other
-#uses of matplotlib
-#Have to check if .sasview exists first
+# Always use private .matplotlib setup to avoid conflicts with other
+# uses of matplotlib
+# Have to check if .sasview exists first
 sasdir = os.path.join(os.path.expanduser("~"),'.sasview')
 if not os.path.exists(sasdir):
@@ -72,6 +71,5 @@
 from sas.sasgui.guiframe.gui_style import GUIFRAME
 from welcome_panel import WelcomePanel
-# For py2exe, import config here
-import local_config
+
 PLUGIN_MODEL_DIR = 'plugin_models'
 APP_NAME = 'SasView'
@@ -87,5 +85,5 @@
         """
         """
-        #from gui_manager import ViewApp
+        # from gui_manager import ViewApp
         self.gui = gui_manager.SasViewApp(0)
         # Set the application manager for the GUI
@@ -116,5 +114,5 @@
             logger.error(traceback.format_exc())
 
-        #Invariant perspective
+        # Invariant perspective
         try:
             import sas.sasgui.perspectives.invariant as module
@@ -134,5 +132,5 @@
             logger.error("Unable to load corfunc module")
 
-        #Calculator perspective
+        # Calculator perspective
         try:
             import sas.sasgui.perspectives.calculator as module
@@ -153,5 +151,4 @@
                                                         APP_NAME)
             logger.error(traceback.format_exc())
-
 
         # Add welcome page
@@ -174,5 +171,5 @@
     if len(sys.argv) > 1:
         ## Run sasview as an interactive python interpreter
-        #if sys.argv[1] == "-i":
+        # if sys.argv[1] == "-i":
         #    sys.argv = ["ipython", "--pylab"]
         #    from IPython import start_ipython
@@ -188,4 +185,5 @@
         SasView()
 
+
 if __name__ == "__main__":
     run()
Index: sasview/setup_exe.py
===================================================================
--- sasview/setup_exe.py	(revision 8b645cc3cea24d016ee884edc83b7654f8f0470b)
+++ sasview/setup_exe.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -13,4 +13,5 @@
 # be added to the distribution directory for that purpose.
 # See for example the 'images' directory below.
+from __future__ import print_function
 
 import os
@@ -62,6 +63,6 @@
         sys.argv.remove('--extrapath')
 except:
-    print "Error processing extra python path needed to build SasView\n  %s" % \
-                sys.exc_value
+    print("Error processing extra python path needed to build SasView\n  %s" %
+          sys.exc_value)
 
 
@@ -83,12 +84,11 @@
         modulefinder.AddPackagePath(win32_folder, p)
     for extra in ["win32com.shell", "win32com.adsi", "win32com.axcontrol",
-                    "win32com.axscript", "win32com.bits", "win32com.ifilter",
-                    "win32com.internet", "win32com.mapi", "win32com.propsys",
-                    "win32com.taskscheduler"]:
-        
-            __import__(extra)
-            m = sys.modules[extra]
-            for p in m.__path__[1:]:
-                modulefinder.AddPackagePath(extra, p)
+                  "win32com.axscript", "win32com.bits", "win32com.ifilter",
+                  "win32com.internet", "win32com.mapi", "win32com.propsys",
+                  "win32com.taskscheduler"]:
+        __import__(extra)
+        m = sys.modules[extra]
+        for p in m.__path__[1:]:
+            modulefinder.AddPackagePath(extra, p)
 
 except ImportError:
@@ -167,5 +167,5 @@
         self.copyright = "copyright 2009 - 2016"
         self.name = "SasView"
-        
+
 #
 # Adapted from http://www.py2exe.org/index.cgi/MatPlotLib
@@ -236,4 +236,8 @@
     data_files.append(('config', [f]))
 f = 'local_config.py'
+if os.path.isfile(f):
+    data_files.append(('.', [f]))
+
+f = 'logging.ini'
 if os.path.isfile(f):
     data_files.append(('.', [f]))
@@ -337,5 +341,5 @@
     ])
 packages.append('periodictable.core') # not found automatically
-#packages.append('IPython')
+# packages.append('IPython')
 includes = ['site', 'lxml._elementpath', 'lxml.etree']
 
@@ -370,5 +374,5 @@
     other_resources = [(24, 1, manifest)],
     dest_base = "SasView"
-    )
+)
 
 # bundle_option = 2
Index: sasview/setup_mac.py
===================================================================
--- sasview/setup_mac.py	(revision 235f514ba93b57fa63e44309f182acef0b98bb55)
+++ sasview/setup_mac.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -11,4 +11,6 @@
    12/05/2011: Needs macholib >= 1.4.3 and py2app >= 0.6.4 to create a 64-bit app
 """
+from __future__ import print_function
+
 from setuptools import setup
 import periodictable.xsf
@@ -28,5 +30,5 @@
 build_path = os.path.join(root, 'build','lib.'+platform)
 sys.path.insert(0, build_path)
-print "BUILDING PATH INSIDE", build_path
+print("BUILDING PATH INSIDE", build_path)
 ICON = local_config.SetupIconFile_mac
 EXTENSIONS_LIST = []
@@ -51,4 +53,6 @@
 RESOURCES_FILES.append(os.path.join(sas.sascalc.dataloader.readers.get_data_path(),'defaults.json'))
 
+DATA_FILES.append('logging.ini')
+
 # Locate libxml2 library
 lib_locs = ['/usr/local/lib', '/usr/lib']
@@ -68,5 +72,5 @@
 # See if the documentation has been built, and if so include it.
 doc_path = os.path.join(build_path, "doc")
-print doc_path
+print(doc_path)
 if os.path.exists(doc_path):
     for dirpath, dirnames, filenames in os.walk(doc_path):
Index: sasview/test/nr_data/NR_Ni_down_state.txt
===================================================================
--- sasview/test/nr_data/NR_Ni_down_state.txt	(revision 867aa79418608623f77e1d053d556424aa190e06)
+++ sasview/test/nr_data/NR_Ni_down_state.txt	(revision 867aa79418608623f77e1d053d556424aa190e06)
@@ -0,0 +1,270 @@
+0.0135131  0.961716  0.0289101
+0.0136482  0.928560  0.0257264
+0.0137847  0.927453  0.0245886
+0.0139226  0.941584  0.0237276
+0.0140618  0.955294  0.0231578
+0.0142024  0.969653  0.0225102
+0.0143444  0.925495  0.0205497
+0.0144879  0.946830  0.0214205
+0.0146328  0.960356  0.0229919
+0.0147791  0.969672  0.0228891
+0.0149269  0.994970  0.0221259
+0.0150762  0.988369  0.0204817
+0.0152269  0.957256  0.0201544
+0.0153792  0.989881  0.0217797
+0.0155330  0.980922  0.0198305
+0.0156883  0.981569  0.0190783
+0.0158452  0.989446  0.0204594
+0.0160036  0.983710  0.0194286
+0.0161637  0.983005  0.0184112
+0.0163253  0.995114  0.0194257
+0.0164886  0.956886  0.0175143
+0.0166535  0.959668  0.0181797
+0.0168200  0.982260  0.0185512
+0.0169882  0.958189  0.0166085
+0.0171581  0.987396  0.0175854
+0.0173297  0.968367  0.0168996
+0.0175030  0.957182  0.0162304
+0.0176780  0.988894  0.0168458
+0.0178548  0.960474  0.0158700
+0.0180333  0.995827  0.0165555
+0.0182136  0.988815  0.0158878
+0.0183958  1.00000  0.0167942
+0.0185797  0.977605  0.0164546
+0.0187655  0.981470  0.0172425
+0.0189532  0.946679  0.0162052
+0.0191427  0.949973  0.0154345
+0.0193341  0.953328  0.0157336
+0.0195275  0.942870  0.0146470
+0.0197228  0.865491  0.0135139
+0.0199200  0.724828  0.0116757
+0.0201192  0.607757  0.00934533
+0.0203204  0.482825  0.00772872
+0.0205236  0.415805  0.00706963
+0.0207288  0.431391  0.00668147
+0.0209361  0.468545  0.00707058
+0.0211455  0.440465  0.00739142
+0.0213569  0.360291  0.00659603
+0.0215705  0.265286  0.00458124
+0.0217862  0.190373  0.00337329
+0.0220041  0.131369  0.00277100
+0.0222241  0.116842  0.00275864
+0.0224463  0.135662  0.00274717
+0.0226708  0.175561  0.00299595
+0.0228975  0.203123  0.00322181
+0.0231265  0.215788  0.00351678
+0.0233578  0.208668  0.00369891
+0.0235913  0.184629  0.00369386
+0.0238272  0.140462  0.00306832
+0.0240655  0.0956962  0.00220858
+0.0243062  0.0625630  0.00154711
+0.0245492  0.0427102  0.00111663
+0.0247947  0.0387433  0.000991448
+0.0250427  0.0446114  0.00103143
+0.0252931  0.0598101  0.00122246
+0.0255460  0.0789298  0.00149030
+0.0258015  0.0905049  0.00163303
+0.0260595  0.0953088  0.00171869
+0.0263201  0.0928272  0.00168653
+0.0265833  0.0802002  0.00149458
+0.0268491  0.0624360  0.00202876
+0.0271176  0.0475461  0.00106416
+0.0273888  0.0293066  0.000759623
+0.0276627  0.0177505  0.000549906
+0.0279393  0.0158879  0.000535357
+0.0282187  0.0195091  0.000635344
+0.0285009  0.0271216  0.000780177
+0.0287859  0.0357927  0.000946546
+0.0290738  0.0431081  0.00101791
+0.0293645  0.0483732  0.000976205
+0.0296582  0.0476611  0.000891638
+0.0299547  0.0434431  0.000841549
+0.0302543  0.0350126  0.000771050
+0.0305568  0.0249405  0.000608008
+0.0308624  0.0165013  0.000444320
+0.0311710  0.0102057  0.000353606
+0.0314827  0.00753721  0.000321873
+0.0317976  0.00745373  0.000306921
+0.0321155  0.0110146  0.000372374
+0.0324367  0.0164208  0.000453754
+0.0327611  0.0201040  0.000483163
+0.0330887  0.0225158  0.000530436
+0.0334196  0.0233820  0.000535194
+0.0337537  0.0212166  0.000455583
+0.0340913  0.0177449  0.000421772
+0.0344322  0.0128987  0.000342278
+0.0347765  0.00840363  0.000262032
+0.0351243  0.00520726  0.000199761
+0.0354755  0.00322697  0.000160004
+0.0358303  0.00396699  0.000175721
+0.0361886  0.00549414  0.000209278
+0.0365505  0.00795821  0.000263088
+0.0369160  0.0112167  0.000291701
+0.0372851  0.0117972  0.000329579
+0.0376580  0.0116843  0.000318453
+0.0380346  0.0102174  0.000281684
+0.0384149  0.00790020  0.000256543
+0.0387991  0.00572115  0.000193975
+0.0391871  0.00334086  0.000151395
+0.0395789  0.00241902  0.000126783
+0.0399747  0.00242089  0.000115682
+0.0403745  0.00298051  0.000151159
+0.0407782  0.00449386  0.000169450
+0.0411860  0.00559413  0.000171939
+0.0415978  0.00656132  0.000194755
+0.0420138  0.00615893  0.000197202
+0.0424340  0.00515349  0.000160442
+0.0428583  0.00367690  0.000131414
+0.0432869  0.00240650  0.000110371
+0.0437197  0.00136148  9.10878e-005
+0.0441569  0.00109911  7.49597e-005
+0.0445985  0.00148090  7.89773e-005
+0.0450445  0.00215200  9.46369e-005
+0.0454949  0.00288529  0.000119962
+0.0459499  0.00340265  0.000138753
+0.0464094  0.00302818  0.000138364
+0.0468735  0.00265330  0.000114874
+0.0473422  0.00186224  8.99007e-005
+0.0478156  0.00130027  6.88261e-005
+0.0482938  0.000729895  5.01516e-005
+0.0487767  0.000733598  5.29683e-005
+0.0492645  0.000965806  6.66057e-005
+0.0497571  0.00122742  8.04649e-005
+0.0502547  0.00188900  9.17640e-005
+0.0507573  0.00197926  9.69844e-005
+0.0512648  0.00194916  9.89258e-005
+0.0517775  0.00121589  7.89538e-005
+0.0522953  0.000764875  6.22980e-005
+0.0528182  0.000472794  4.84979e-005
+0.0533464  0.000506488  4.88253e-005
+0.0538799  0.000847941  4.51291e-005
+0.0544187  0.00109914  3.98390e-005
+0.0549628  0.00127840  4.34440e-005
+0.0555125  0.00127151  4.25206e-005
+0.0560676  0.00105505  3.97131e-005
+0.0566283  0.000656319  3.20738e-005
+0.0571946  0.000369127  2.30134e-005
+0.0577665  0.000256208  1.67293e-005
+0.0583442  0.000341549  1.80821e-005
+0.0589276  0.000525350  2.23722e-005
+0.0595169  0.000707067  2.80791e-005
+0.0601121  0.000732983  2.88039e-005
+0.0607132  0.000609604  2.44764e-005
+0.0613203  0.000402103  1.83544e-005
+0.0619335  0.000232529  1.48272e-005
+0.0625528  0.000159466  1.24213e-005
+0.0631784  0.000212669  1.31560e-005
+0.0638102  0.000301192  1.62700e-005
+0.0644483  0.000384585  1.80468e-005
+0.0650927  0.000392482  1.66049e-005
+0.0657437  0.000300217  1.54710e-005
+0.0664011  0.000174950  1.19922e-005
+0.0670651  0.000113914  8.40536e-006
+0.0677358  0.000129762  8.97984e-006
+0.0684131  0.000203802  1.11276e-005
+0.0690973  0.000261373  1.32348e-005
+0.0697882  0.000231401  1.18130e-005
+0.0704861  0.000189973  1.05043e-005
+0.0711910  0.000112650  7.75920e-006
+0.0719029  8.36777e-005  6.42533e-006
+0.0726219  9.53090e-005  6.92844e-006
+0.0733481  0.000129155  8.43305e-006
+0.0740816  0.000149337  9.16137e-006
+0.0748224  0.000142083  8.95509e-006
+0.0755707  0.000104498  8.11742e-006
+0.0763264  5.51500e-005  5.68376e-006
+0.0770896  4.56451e-005  4.60212e-006
+0.0778605  6.69216e-005  5.54031e-006
+0.0786391  0.000102127  6.83728e-006
+0.0794255  0.000109424  6.77086e-006
+0.0802198  7.91852e-005  6.01307e-006
+0.0810220  4.70756e-005  4.44617e-006
+0.0818322  3.45894e-005  3.60117e-006
+0.0826505  4.85846e-005  4.65928e-006
+0.0834770  6.54984e-005  5.05416e-006
+0.0843118  6.61836e-005  4.65011e-006
+0.0851549  5.40963e-005  4.45143e-006
+0.0860064  3.32253e-005  3.82976e-006
+0.0868665  2.77195e-005  3.22363e-006
+0.0877352  3.99215e-005  3.47155e-006
+0.0886125  4.85937e-005  3.86409e-006
+0.0894987  4.19518e-005  3.85924e-006
+0.0903936  2.93644e-005  3.51765e-006
+0.0912976  1.84919e-005  2.57534e-006
+0.0922106  2.28534e-005  2.60437e-006
+0.0931327  2.60631e-005  2.58705e-006
+0.0940640  3.32946e-005  2.96033e-006
+0.0950046  3.06952e-005  2.95997e-006
+0.0959547  1.96745e-005  2.49459e-006
+0.0969142  1.74632e-005  2.61927e-006
+0.0978834  2.36251e-005  2.99198e-006
+0.0988622  2.58019e-005  2.91423e-006
+0.0998508  2.28860e-005  2.61580e-006
+0.100849  1.83878e-005  2.18794e-006
+0.101858  1.84457e-005  2.11072e-006
+0.102876  1.86714e-005  2.00120e-006
+0.103905  2.19172e-005  2.15043e-006
+0.104944  1.99397e-005  2.04872e-006
+0.105994  1.63090e-005  1.80768e-006
+0.107054  1.58171e-005  1.75729e-006
+0.108124  1.68862e-005  1.78580e-006
+0.109205  1.74742e-005  1.85548e-006
+0.110297  1.36636e-005  1.69776e-006
+0.111400  1.13221e-005  1.48611e-006
+0.112514  1.58675e-005  1.83587e-006
+0.113640  1.80107e-005  2.12691e-006
+0.114776  1.38732e-005  1.96903e-006
+0.115924  1.43731e-005  2.17735e-006
+0.117083  1.21113e-005  1.96583e-006
+0.118254  1.20323e-005  1.74579e-006
+0.119436  1.39372e-005  1.70376e-006
+0.120631  1.26248e-005  1.43339e-006
+0.121837  1.18092e-005  1.33477e-006
+0.123055  1.29617e-005  1.41826e-006
+0.124286  1.39771e-005  1.69843e-006
+0.125529  1.10016e-005  1.74992e-006
+0.126784  1.12125e-005  1.77286e-006
+0.128052  1.13120e-005  1.49003e-006
+0.129332  1.26270e-005  1.34613e-006
+0.130626  1.35165e-005  1.35823e-006
+0.131932  1.25121e-005  1.59387e-006
+0.133251  6.50278e-006  1.30668e-006
+0.134584  9.58740e-006  1.43288e-006
+0.135930  9.51385e-006  1.12552e-006
+0.137289  9.11121e-006  1.10765e-006
+0.138662  8.82149e-006  1.38154e-006
+0.140048  9.66351e-006  1.52420e-006
+0.141449  9.53824e-006  1.18517e-006
+0.142863  9.40040e-006  1.09195e-006
+0.144292  9.20342e-006  1.44739e-006
+0.145735  7.99837e-006  1.40429e-006
+0.147192  8.42277e-006  1.08536e-006
+0.148664  8.17632e-006  1.11240e-006
+0.150151  7.03281e-006  1.33254e-006
+0.151652  5.72622e-006  1.04311e-006
+0.153169  6.51698e-006  9.04852e-007
+0.154701  7.76097e-006  1.40378e-006
+0.156248  4.49492e-006  1.07033e-006
+0.157810  7.04137e-006  9.64938e-007
+0.159388  9.37001e-006  1.53602e-006
+0.160982  5.36727e-006  1.20574e-006
+0.162592  6.28461e-006  9.28192e-007
+0.164218  7.18453e-006  1.40781e-006
+0.165860  5.42702e-006  1.19363e-006
+0.167519  6.21826e-006  9.48908e-007
+0.169194  7.50868e-006  1.47579e-006
+0.170886  5.88385e-006  1.09746e-006
+0.172595  5.63279e-006  1.08928e-006
+0.174321  6.17295e-006  1.39311e-006
+0.176064  5.90737e-006  9.81572e-007
+0.177824  5.69360e-006  1.37163e-006
+0.179603  7.94174e-006  1.48206e-006
+0.181399  7.79740e-006  1.37861e-006
+0.183213  5.91423e-006  1.43756e-006
+0.185045  5.62244e-006  1.00030e-006
+0.186895  5.28405e-006  1.37394e-006
+0.188764  6.66913e-006  1.22218e-006
+0.190652  7.24359e-006  1.63249e-006
+0.192558  5.17379e-006  1.27412e-006
+0.194484  5.19469e-006  1.25254e-006
+0.196429  7.03632e-006  1.64492e-006
Index: sasview/test/nr_data/NR_Ni_up_state.txt
===================================================================
--- sasview/test/nr_data/NR_Ni_up_state.txt	(revision 867aa79418608623f77e1d053d556424aa190e06)
+++ sasview/test/nr_data/NR_Ni_up_state.txt	(revision 867aa79418608623f77e1d053d556424aa190e06)
@@ -0,0 +1,271 @@
+0.0135131  0.890444  0.0262786
+0.0136482  0.935330  0.0259193
+0.0137847  0.937904  0.0247850
+0.0139226  0.920789  0.0227660
+0.0140618  0.900099  0.0212259
+0.0142024  0.945226  0.0217617
+0.0143444  0.951055  0.0212824
+0.0144879  0.957775  0.0219603
+0.0146328  0.928407  0.0220038
+0.0147791  0.938651  0.0220779
+0.0149269  0.942624  0.0203130
+0.0150762  0.968576  0.0203592
+0.0152269  0.963471  0.0204578
+0.0153792  1.00000  0.0218980
+0.0155330  0.956413  0.0192828
+0.0156883  0.967985  0.0189510
+0.0158452  0.983214  0.0204685
+0.0160036  0.975873  0.0191942
+0.0161637  0.970828  0.0180809
+0.0163253  0.953108  0.0182468
+0.0164886  0.965581  0.0177873
+0.0166535  0.992478  0.0190076
+0.0168200  0.958453  0.0179890
+0.0169882  0.992206  0.0176097
+0.0171581  0.955405  0.0168827
+0.0173297  0.921141  0.0155541
+0.0175030  0.945313  0.0160285
+0.0176780  0.968827  0.0161772
+0.0178548  0.963786  0.0157828
+0.0180333  0.976643  0.0159298
+0.0182136  0.997707  0.0161089
+0.0183958  0.999089  0.0167029
+0.0185797  0.958310  0.0159275
+0.0187655  0.957777  0.0166667
+0.0189532  0.958045  0.0163302
+0.0191427  0.975430  0.0158459
+0.0193341  0.997848  0.0166963
+0.0195275  0.988457  0.0152566
+0.0197228  0.956352  0.0148362
+0.0199200  0.961294  0.0151805
+0.0201192  0.944681  0.0133290
+0.0203204  0.950151  0.0139594
+0.0205236  0.952151  0.0144395
+0.0207288  0.962761  0.0136300
+0.0209361  0.952821  0.0129448
+0.0211455  0.935431  0.0142022
+0.0213569  0.931837  0.0145305
+0.0215705  0.934838  0.0129845
+0.0217862  0.919501  0.0121554
+0.0220041  0.917384  0.0131459
+0.0222241  0.912095  0.0137868
+0.0224463  0.900258  0.0129017
+0.0226708  0.863043  0.0110902
+0.0228975  0.804609  0.00998542
+0.0231265  0.702971  0.00907879
+0.0233578  0.582803  0.00835776
+0.0235913  0.499274  0.00813344
+0.0238272  0.457627  0.00737342
+0.0240655  0.457010  0.00685862
+0.0243062  0.414854  0.00597847
+0.0245492  0.321860  0.00451427
+0.0247947  0.231179  0.00323022
+0.0250427  0.178828  0.00254536
+0.0252931  0.173932  0.00250011
+0.0255460  0.208037  0.00293913
+0.0258015  0.243198  0.00334274
+0.0260595  0.253268  0.00347777
+0.0263201  0.226739  0.00310213
+0.0265833  0.183134  0.00264496
+0.0268491  0.118744  0.00277693
+0.0271176  0.0779644  0.00131408
+0.0273888  0.0534515  0.000960760
+0.0276627  0.0600233  0.00105750
+0.0279393  0.0860045  0.00137475
+0.0282187  0.114457  0.00172018
+0.0285009  0.132804  0.00195653
+0.0287859  0.135787  0.00207031
+0.0290738  0.122882  0.00186907
+0.0293645  0.0954101  0.00138548
+0.0296582  0.0639541  0.00100915
+0.0299547  0.0369641  0.000705270
+0.0302543  0.0230399  0.000556493
+0.0305568  0.0230098  0.000527283
+0.0308624  0.0336483  0.000635125
+0.0311710  0.0482873  0.000846293
+0.0314827  0.0609644  0.000983252
+0.0317976  0.0697305  0.00100906
+0.0321155  0.0677983  0.000970672
+0.0324367  0.0579627  0.000906563
+0.0327611  0.0427337  0.000702598
+0.0330887  0.0282752  0.000546546
+0.0334196  0.0159950  0.000389415
+0.0337537  0.0108447  0.000287468
+0.0340913  0.0126007  0.000322600
+0.0344322  0.0192608  0.000403920
+0.0347765  0.0267967  0.000510294
+0.0351243  0.0333365  0.000559690
+0.0354755  0.0371050  0.000596374
+0.0358303  0.0331868  0.000557501
+0.0361886  0.0280282  0.000478515
+0.0365505  0.0207209  0.000388521
+0.0369160  0.0121958  0.000300031
+0.0372851  0.00746941  0.000216308
+0.0376580  0.00586737  0.000190893
+0.0380346  0.00745861  0.000236754
+0.0384149  0.0120105  0.000311255
+0.0387991  0.0152087  0.000327587
+0.0391871  0.0183588  0.000388454
+0.0395789  0.0183722  0.000373042
+0.0399747  0.0168055  0.000316003
+0.0403745  0.0129610  0.000285392
+0.0407782  0.00760377  0.000220562
+0.0411860  0.00493496  0.000147263
+0.0415978  0.00296770  0.000122952
+0.0420138  0.00406351  0.000148090
+0.0424340  0.00592403  0.000174364
+0.0428583  0.00826475  0.000202906
+0.0432869  0.00974176  0.000239734
+0.0437197  0.0103830  0.000248928
+0.0441569  0.00835037  0.000215107
+0.0445985  0.00641313  0.000164260
+0.0450445  0.00378030  0.000119854
+0.0454949  0.00247600  9.51508e-005
+0.0459499  0.00194234  9.89274e-005
+0.0464094  0.00288153  0.000120924
+0.0468735  0.00389862  0.000132749
+0.0473422  0.00509683  0.000139483
+0.0478156  0.00545632  0.000142910
+0.0482938  0.00521387  0.000133907
+0.0487767  0.00423846  0.000120710
+0.0492645  0.00280647  9.49906e-005
+0.0497571  0.00195349  7.91897e-005
+0.0502547  0.00123686  7.18016e-005
+0.0507573  0.00161302  8.75042e-005
+0.0512648  0.00249490  0.000111290
+0.0517775  0.00333323  0.000127660
+0.0522953  0.00373402  0.000132958
+0.0528182  0.00310304  0.000119289
+0.0533464  0.00233205  0.000103688
+0.0538799  0.00137475  5.84675e-005
+0.0544187  0.000862859  3.47591e-005
+0.0549628  0.000794436  3.22238e-005
+0.0555125  0.00124380  4.09830e-005
+0.0560676  0.00180554  5.09379e-005
+0.0566283  0.00214211  5.63167e-005
+0.0571946  0.00207049  5.22190e-005
+0.0577665  0.00151467  4.06905e-005
+0.0583442  0.000918109  3.00631e-005
+0.0589276  0.000523212  2.09745e-005
+0.0595169  0.000454332  2.03172e-005
+0.0601121  0.000735518  2.79901e-005
+0.0607132  0.00108549  3.14789e-005
+0.0613203  0.00136057  3.44964e-005
+0.0619335  0.00121586  3.34158e-005
+0.0625528  0.000861177  2.78032e-005
+0.0631784  0.000462963  1.73513e-005
+0.0638102  0.000297269  1.45077e-005
+0.0644483  0.000348487  1.63272e-005
+0.0650927  0.000596505  2.06857e-005
+0.0657437  0.000788588  2.49641e-005
+0.0664011  0.000792275  2.49458e-005
+0.0670651  0.000595311  2.04429e-005
+0.0677358  0.000335338  1.45775e-005
+0.0684131  0.000199648  1.03786e-005
+0.0690973  0.000249447  1.21945e-005
+0.0697882  0.000400587  1.53933e-005
+0.0704861  0.000484298  1.67965e-005
+0.0711910  0.000504908  1.67182e-005
+0.0719029  0.000369647  1.36735e-005
+0.0726219  0.000203649  9.63227e-006
+0.0733481  0.000142743  7.77255e-006
+0.0740816  0.000194778  1.04837e-005
+0.0748224  0.000298843  1.25264e-005
+0.0755707  0.000345177  1.47736e-005
+0.0763264  0.000300334  1.30570e-005
+0.0770896  0.000202304  9.43365e-006
+0.0778605  0.000135146  7.41379e-006
+0.0786391  0.000123260  6.90168e-006
+0.0794255  0.000184296  8.85156e-006
+0.0802198  0.000237201  1.02218e-005
+0.0810220  0.000214790  9.11023e-006
+0.0818322  0.000150690  7.18279e-006
+0.0826505  9.00454e-005  5.94710e-006
+0.0834770  9.03782e-005  5.68063e-006
+0.0843118  0.000141873  6.65217e-006
+0.0851549  0.000163560  7.63910e-006
+0.0860064  0.000140535  7.78581e-006
+0.0868665  8.93858e-005  6.03004e-006
+0.0877352  5.92666e-005  4.20128e-006
+0.0886125  7.64039e-005  4.82042e-006
+0.0894987  0.000114803  6.52339e-006
+0.0903936  0.000104782  6.40088e-006
+0.0912976  9.52229e-005  5.82799e-006
+0.0922106  7.06955e-005  4.50775e-006
+0.0931327  6.13081e-005  3.90124e-006
+0.0940640  7.00385e-005  4.21881e-006
+0.0950046  8.86484e-005  5.05629e-006
+0.0959547  7.72893e-005  4.88504e-006
+0.0969142  5.64858e-005  4.53387e-006
+0.0978834  4.76953e-005  4.16508e-006
+0.0988622  5.88348e-005  4.27643e-006
+0.0998508  6.48796e-005  4.20775e-006
+0.100849  6.28582e-005  4.03470e-006
+0.101858  4.47171e-005  3.24721e-006
+0.102876  4.03740e-005  2.88885e-006
+0.103905  5.14897e-005  3.19467e-006
+0.104944  5.35973e-005  3.27317e-006
+0.105994  4.52867e-005  2.94382e-006
+0.107054  4.09899e-005  2.78586e-006
+0.108124  3.89382e-005  2.65950e-006
+0.109205  4.50738e-005  2.85791e-006
+0.110297  4.60581e-005  2.99755e-006
+0.111400  3.75724e-005  2.73234e-006
+0.112514  3.48787e-005  2.73813e-006
+0.113640  3.25430e-005  2.75431e-006
+0.114776  3.53942e-005  3.04983e-006
+0.115924  4.39496e-005  3.71032e-006
+0.117083  3.17644e-005  3.11403e-006
+0.118254  2.71429e-005  2.55242e-006
+0.119436  3.51949e-005  2.66951e-006
+0.120631  3.38018e-005  2.29772e-006
+0.121837  2.76843e-005  1.99876e-006
+0.123055  2.47541e-005  1.94364e-006
+0.124286  2.72585e-005  2.26720e-006
+0.125529  3.07760e-005  2.86434e-006
+0.126784  2.76326e-005  2.72626e-006
+0.128052  2.75574e-005  2.27391e-006
+0.129332  2.50036e-005  1.83227e-006
+0.130626  2.48078e-005  1.80178e-006
+0.131932  2.66661e-005  2.21521e-006
+0.133251  2.57189e-005  2.50880e-006
+0.134584  2.10161e-005  2.03183e-006
+0.135930  2.37672e-005  1.76491e-006
+0.137289  2.28594e-005  1.74215e-006
+0.138662  1.80161e-005  1.94190e-006
+0.140048  1.92866e-005  2.11669e-006
+0.141449  1.71485e-005  1.54830e-006
+0.142863  1.67488e-005  1.43106e-006
+0.144292  1.72791e-005  1.94554e-006
+0.145735  1.69174e-005  2.00432e-006
+0.147192  1.66274e-005  1.49065e-006
+0.148664  1.71027e-005  1.54594e-006
+0.150151  1.86616e-005  2.11933e-006
+0.151652  1.26504e-005  1.49963e-006
+0.153169  1.31255e-005  1.26642e-006
+0.154701  1.48463e-005  1.90985e-006
+0.156248  1.46561e-005  1.88141e-006
+0.157810  1.43918e-005  1.34402e-006
+0.159388  1.41340e-005  1.85734e-006
+0.160982  1.35302e-005  1.87224e-006
+0.162592  1.41379e-005  1.36227e-006
+0.164218  1.47340e-005  1.97722e-006
+0.165860  1.34600e-005  1.84475e-006
+0.167519  1.25573e-005  1.35258e-006
+0.169194  1.12740e-005  1.78517e-006
+0.170886  1.56259e-005  1.82379e-006
+0.172595  1.53380e-005  1.81382e-006
+0.174321  9.92309e-006  1.74326e-006
+0.176064  1.13755e-005  1.35011e-006
+0.177824  1.25446e-005  1.99229e-006
+0.179603  1.08790e-005  1.67270e-006
+0.181399  1.07734e-005  1.56341e-006
+0.183213  1.12529e-005  1.94532e-006
+0.185045  1.11770e-005  1.38234e-006
+0.186895  1.10891e-005  1.95535e-006
+0.188764  1.42045e-005  1.75034e-006
+0.190652  1.54966e-005  2.33973e-006
+0.192558  1.20368e-005  1.90797e-006
+0.194484  1.15704e-005  1.87052e-006
+0.196429  1.01103e-005  1.94929e-006
+
Index: sasview/wxcruft.py
===================================================================
--- sasview/wxcruft.py	(revision 12e5cc86b4462244202093bccc9f4a494ab24208)
+++ sasview/wxcruft.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -1,2 +1,4 @@
+from __future__ import print_function
+
 import inspect
 import wx
@@ -29,5 +31,5 @@
     else:
         tag = ""
-    print "NewId %d from %s(%d):%s%s"%(id, path, line, function, tag)
+    print("NewId %d from %s(%d):%s%s"%(id, path, line, function, tag))
     return id
 
Index: setup.py
===================================================================
--- setup.py	(revision f3bf622b821c651bb6e946100b07e15cd59331fe)
+++ setup.py	(revision 14bb7a4559442ca97cf523eddca7216d6be1e931)
@@ -1,16 +1,23 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+
 """
     Setup for SasView
-    #TODO: Add checks to see that all the dependencies are on the system
+    TODO: Add checks to see that all the dependencies are on the system
 """
+
+import os
+import subprocess
+import shutil
 import sys
-import os
-import shutil
-from setuptools import setup, Extension
 from distutils.command.build_ext import build_ext
 from distutils.core import Command
+
 import numpy as np
+from setuptools import Extension, setup
 
 # Manage version number ######################################
 import sasview
+
 VERSION = sasview.__version__
 ##############################################################
@@ -25,5 +32,5 @@
 # except when there is no such file
 # Todo : make this list generic
-#plugin_model_list = ['polynominal5.py', 'sph_bessel_jn.py',
+# plugin_model_list = ['polynominal5.py', 'sph_bessel_jn.py',
 #                      'sum_Ap1_1_Ap2.py', 'sum_p1_p2.py',
 #                      'testmodel_2.py', 'testmodel.py',
@@ -35,5 +42,5 @@
 SASVIEW_BUILD = os.path.join(CURRENT_SCRIPT_DIR, "build")
 
-sas_dir = os.path.join(os.path.expanduser("~"),'.sasview')
+sas_dir = os.path.join(os.path.expanduser("~"), '.sasview')
 if os.path.isdir(sas_dir):
     f_path = os.path.join(sas_dir, "sasview.log")
@@ -47,5 +54,5 @@
         os.remove(f_path)
     #f_path = os.path.join(sas_dir, 'plugin_models')
-    #if os.path.isdir(f_path):
+    # if os.path.isdir(f_path):
     #     for f in os.listdir(f_path):
     #         if f in plugin_model_list:
@@ -53,5 +60,6 @@
     #             os.remove(file_path)
     if os.path.exists(SASVIEW_BUILD):
-        print("Removing existing build directory", SASVIEW_BUILD, "for a clean build")
+        print("Removing existing build directory",
+              SASVIEW_BUILD, "for a clean build")
         shutil.rmtree(SASVIEW_BUILD)
 
@@ -63,5 +71,5 @@
 enable_openmp = False
 
-if sys.platform =='darwin':
+if sys.platform == 'darwin':
     if not is_64bits:
         # Disable OpenMP
@@ -77,23 +85,25 @@
 
 # Options to enable OpenMP
-copt =  {'msvc': ['/openmp'],
-         'mingw32' : ['-fopenmp'],
-         'unix' : ['-fopenmp']}
-lopt =  {'msvc': ['/MANIFEST'],
-         'mingw32' : ['-fopenmp'],
-         'unix' : ['-lgomp']}
+copt = {'msvc': ['/openmp'],
+        'mingw32': ['-fopenmp'],
+        'unix': ['-fopenmp']}
+lopt = {'msvc': ['/MANIFEST'],
+        'mingw32': ['-fopenmp'],
+        'unix': ['-lgomp']}
 
 # Platform-specific link options
-platform_lopt = {'msvc' : ['/MANIFEST']}
+platform_lopt = {'msvc': ['/MANIFEST']}
 platform_copt = {}
 
 # Set copts to get compile working on OS X >= 10.9 using clang
-if sys.platform =='darwin':
+if sys.platform == 'darwin':
     try:
         darwin_ver = int(os.uname()[2].split('.')[0])
         if darwin_ver >= 13 and darwin_ver < 14:
-            platform_copt = {'unix' : ['-Wno-error=unused-command-line-argument-hard-error-in-future']}
+            platform_copt = {
+                'unix': ['-Wno-error=unused-command-line-argument-hard-error-in-future']}
     except:
         print("PROBLEM determining Darwin version")
+
 
 class DisableOpenMPCommand(Command):
@@ -114,5 +124,6 @@
         pass
 
-class build_ext_subclass( build_ext ):
+
+class build_ext_subclass(build_ext):
     def build_extensions(self):
         # Get 64-bitness
@@ -124,20 +135,20 @@
             if c in copt:
                 for e in self.extensions:
-                    e.extra_compile_args = copt[ c ]
+                    e.extra_compile_args = copt[c]
             if c in lopt:
                 for e in self.extensions:
-                    e.extra_link_args = lopt[ c ]
+                    e.extra_link_args = lopt[c]
 
         # Platform-specific build options
         if c in platform_lopt:
             for e in self.extensions:
-                e.extra_link_args = platform_lopt[ c ]
+                e.extra_link_args = platform_lopt[c]
 
         if c in platform_copt:
             for e in self.extensions:
-                e.extra_compile_args = platform_copt[ c ]
-
+                e.extra_compile_args = platform_copt[c]
 
         build_ext.build_extensions(self)
+
 
 class BuildSphinxCommand(Command):
@@ -152,8 +163,26 @@
 
     def run(self):
+        ''' First builds the sasmodels documentation if the directory
+        is present. Then builds the sasview docs.
+        '''
+        ### AJJ - Add code for building sasmodels docs here:
+        # check for doc path
+        SASMODELS_DOCPATH = os.path.abspath(os.path.join(os.getcwd(), '..', 'sasmodels', 'doc'))
+        print("========= check for sasmodels at", SASMODELS_DOCPATH, "============")
+        if os.path.exists(SASMODELS_DOCPATH):
+            if os.path.isdir(SASMODELS_DOCPATH):
+                # if available, build sasmodels docs
+                print("============= Building sasmodels model documentation ===============")
+                smdocbuild = subprocess.call(["make", "-C", SASMODELS_DOCPATH, "html"])
+        else:
+            # if not available warning message
+            print("== !!WARNING!! sasmodels directory not found. Cannot build model docs. ==")
+
+        #Now build sasview (+sasmodels) docs
         sys.path.append("docs/sphinx-docs")
         import build_sphinx
         build_sphinx.rebuild()
 
+
 # sas module
 package_dir["sas"] = os.path.join("src", "sas")
@@ -169,5 +198,6 @@
 
 # sas.sascalc.invariant
-package_dir["sas.sascalc.invariant"] = os.path.join("src", "sas", "sascalc", "invariant")
+package_dir["sas.sascalc.invariant"] = os.path.join(
+    "src", "sas", "sascalc", "invariant")
 packages.extend(["sas.sascalc.invariant"])
 
@@ -175,59 +205,72 @@
 guiframe_path = os.path.join("src", "sas", "sasgui", "guiframe")
 package_dir["sas.sasgui.guiframe"] = guiframe_path
-package_dir["sas.sasgui.guiframe.local_perspectives"] = os.path.join(os.path.join(guiframe_path, "local_perspectives"))
+package_dir["sas.sasgui.guiframe.local_perspectives"] = os.path.join(
+    os.path.join(guiframe_path, "local_perspectives"))
 package_data["sas.sasgui.guiframe"] = ['images/*', 'media/*']
-packages.extend(["sas.sasgui.guiframe", "sas.sasgui.guiframe.local_perspectives"])
+packages.extend(
+    ["sas.sasgui.guiframe", "sas.sasgui.guiframe.local_perspectives"])
 # build local plugin
 for d in os.listdir(os.path.join(guiframe_path, "local_perspectives")):
-    if d not in ['.svn','__init__.py', '__init__.pyc']:
+    if d not in ['.svn', '__init__.py', '__init__.pyc']:
         package_name = "sas.sasgui.guiframe.local_perspectives." + d
         packages.append(package_name)
-        package_dir[package_name] = os.path.join(guiframe_path, "local_perspectives", d)
+        package_dir[package_name] = os.path.join(
+            guiframe_path, "local_perspectives", d)
 
 # sas.sascalc.dataloader
-package_dir["sas.sascalc.dataloader"] = os.path.join("src", "sas", "sascalc", "dataloader")
-package_data["sas.sascalc.dataloader.readers"] = ['defaults.json','schema/*.xsd']
-packages.extend(["sas.sascalc.dataloader","sas.sascalc.dataloader.readers","sas.sascalc.dataloader.readers.schema"])
+package_dir["sas.sascalc.dataloader"] = os.path.join(
+    "src", "sas", "sascalc", "dataloader")
+package_data["sas.sascalc.dataloader.readers"] = [
+    'defaults.json', 'schema/*.xsd']
+packages.extend(["sas.sascalc.dataloader", "sas.sascalc.dataloader.readers",
+                 "sas.sascalc.dataloader.readers.schema"])
+
 
 # sas.sascalc.calculator
 gen_dir = os.path.join("src", "sas", "sascalc", "calculator", "c_extensions")
 package_dir["sas.sascalc.calculator.core"] = gen_dir
-package_dir["sas.sascalc.calculator"] = os.path.join("src", "sas", "sascalc", "calculator")
-packages.extend(["sas.sascalc.calculator","sas.sascalc.calculator.core"])
-ext_modules.append( Extension("sas.sascalc.calculator.core.sld2i",
-        sources = [
-            os.path.join(gen_dir, "sld2i_module.cpp"),
-            os.path.join(gen_dir, "sld2i.cpp"),
-            os.path.join(gen_dir, "libfunc.c"),
-            os.path.join(gen_dir, "librefl.c"),
-        ],
-        include_dirs=[gen_dir],
-    )
-)
+package_dir["sas.sascalc.calculator"] = os.path.join(
+    "src", "sas", "sascalc", "calculator")
+packages.extend(["sas.sascalc.calculator", "sas.sascalc.calculator.core"])
+ext_modules.append(Extension("sas.sascalc.calculator.core.sld2i",
+                             sources=[
+                                 os.path.join(gen_dir, "sld2i_module.cpp"),
+                                 os.path.join(gen_dir, "sld2i.cpp"),
+                                 os.path.join(gen_dir, "libfunc.c"),
+                                 os.path.join(gen_dir, "librefl.c"),
+                             ],
+                             include_dirs=[gen_dir],
+                             )
+                   )
 
 # sas.sascalc.pr
-srcdir  = os.path.join("src", "sas", "sascalc", "pr", "c_extensions")
+srcdir = os.path.join("src", "sas", "sascalc", "pr", "c_extensions")
 package_dir["sas.sascalc.pr.core"] = srcdir
-package_dir["sas.sascalc.pr"] = os.path.join("src","sas", "sascalc", "pr")
-packages.extend(["sas.sascalc.pr","sas.sascalc.pr.core"])
-ext_modules.append( Extension("sas.sascalc.pr.core.pr_inversion",
-                              sources = [os.path.join(srcdir, "Cinvertor.c"),
-                                         os.path.join(srcdir, "invertor.c"),
-                                         ],
-                              include_dirs=[],
-                              ) )
+package_dir["sas.sascalc.pr"] = os.path.join("src", "sas", "sascalc", "pr")
+packages.extend(["sas.sascalc.pr", "sas.sascalc.pr.core"])
+ext_modules.append(Extension("sas.sascalc.pr.core.pr_inversion",
+                             sources=[os.path.join(srcdir, "Cinvertor.c"),
+                                      os.path.join(srcdir, "invertor.c"),
+                                      ],
+                             include_dirs=[],
+                             ))
+
 
 # sas.sascalc.file_converter
 mydir = os.path.join("src", "sas", "sascalc", "file_converter", "c_ext")
 package_dir["sas.sascalc.file_converter.core"] = mydir
-package_dir["sas.sascalc.file_converter"] = os.path.join("src","sas", "sascalc", "file_converter")
-packages.extend(["sas.sascalc.file_converter","sas.sascalc.file_converter.core"])
-ext_modules.append( Extension("sas.sascalc.file_converter.core.bsl_loader",
-                              sources = [os.path.join(mydir, "bsl_loader.c")],
-                              include_dirs=[np.get_include()],
-                              ) )
-
-#sas.sascalc.corfunc
-package_dir["sas.sascalc.corfunc"] = os.path.join("src", "sas", "sascalc", "corfunc")
+package_dir["sas.sascalc.file_converter"] = os.path.join(
+    "src", "sas", "sascalc", "file_converter")
+packages.extend(["sas.sascalc.file_converter",
+                 "sas.sascalc.file_converter.core"])
+ext_modules.append(Extension("sas.sascalc.file_converter.core.bsl_loader",
+                             sources=[os.path.join(mydir, "bsl_loader.c")],
+                             include_dirs=[np.get_include()],
+                             ))
+
+# sas.sascalc.corfunc
+package_dir["sas.sascalc.corfunc"] = os.path.join(
+    "src", "sas", "sascalc", "corfunc")
+
 packages.extend(["sas.sascalc.corfunc"])
 
@@ -237,35 +280,48 @@
 
 # Perspectives
-package_dir["sas.sasgui.perspectives"] = os.path.join("src", "sas", "sasgui", "perspectives")
-package_dir["sas.sasgui.perspectives.pr"] = os.path.join("src", "sas", "sasgui", "perspectives", "pr")
-packages.extend(["sas.sasgui.perspectives","sas.sasgui.perspectives.pr"])
+package_dir["sas.sasgui.perspectives"] = os.path.join(
+    "src", "sas", "sasgui", "perspectives")
+package_dir["sas.sasgui.perspectives.pr"] = os.path.join(
+    "src", "sas", "sasgui", "perspectives", "pr")
+packages.extend(["sas.sasgui.perspectives", "sas.sasgui.perspectives.pr"])
 package_data["sas.sasgui.perspectives.pr"] = ['media/*']
 
-package_dir["sas.sasgui.perspectives.invariant"] = os.path.join("src", "sas", "sasgui", "perspectives", "invariant")
+package_dir["sas.sasgui.perspectives.invariant"] = os.path.join(
+    "src", "sas", "sasgui", "perspectives", "invariant")
 packages.extend(["sas.sasgui.perspectives.invariant"])
-package_data['sas.sasgui.perspectives.invariant'] = [os.path.join("media",'*')]
-
-package_dir["sas.sasgui.perspectives.fitting"] = os.path.join("src", "sas", "sasgui", "perspectives", "fitting")
-package_dir["sas.sasgui.perspectives.fitting.plugin_models"] = os.path.join("src", "sas", "sasgui", "perspectives", "fitting", "plugin_models")
-packages.extend(["sas.sasgui.perspectives.fitting", "sas.sasgui.perspectives.fitting.plugin_models"])
-package_data['sas.sasgui.perspectives.fitting'] = ['media/*', 'plugin_models/*']
-
-packages.extend(["sas.sasgui.perspectives", "sas.sasgui.perspectives.calculator"])
+package_data['sas.sasgui.perspectives.invariant'] = [
+    os.path.join("media", '*')]
+
+package_dir["sas.sasgui.perspectives.fitting"] = os.path.join(
+    "src", "sas", "sasgui", "perspectives", "fitting")
+package_dir["sas.sasgui.perspectives.fitting.plugin_models"] = os.path.join(
+    "src", "sas", "sasgui", "perspectives", "fitting", "plugin_models")
+packages.extend(["sas.sasgui.perspectives.fitting",
+                 "sas.sasgui.perspectives.fitting.plugin_models"])
+package_data['sas.sasgui.perspectives.fitting'] = [
+    'media/*', 'plugin_models/*']
+
+packages.extend(["sas.sasgui.perspectives",
+                 "sas.sasgui.perspectives.calculator"])
 package_data['sas.sasgui.perspectives.calculator'] = ['images/*', 'media/*']
 
-package_dir["sas.sasgui.perspectives.corfunc"] = os.path.join("src", "sas", "sasgui", "perspectives", "corfunc")
+package_dir["sas.sasgui.perspectives.corfunc"] = os.path.join(
+    "src", "sas", "sasgui", "perspectives", "corfunc")
 packages.extend(["sas.sasgui.perspectives.corfunc"])
 package_data['sas.sasgui.perspectives.corfunc'] = ['media/*']
 
-package_dir["sas.sasgui.perspectives.file_converter"] = os.path.join("src", "sas", "sasgui", "perspectives", "file_converter")
+package_dir["sas.sasgui.perspectives.file_converter"] = os.path.join(
+    "src", "sas", "sasgui", "perspectives", "file_converter")
 packages.extend(["sas.sasgui.perspectives.file_converter"])
 package_data['sas.sasgui.perspectives.file_converter'] = ['media/*']
 
 # Data util
-package_dir["sas.sascalc.data_util"] = os.path.join("src", "sas", "sascalc", "data_util")
+package_dir["sas.sascalc.data_util"] = os.path.join(
+    "src", "sas", "sascalc", "data_util")
 packages.append("sas.sascalc.data_util")
 
 # Plottools
-package_dir["sas.sasgui.plottools"] = os.path.join("src", "sas", "sasgui", "plottools")
+package_dir["sas.sasgui.plottools"] = os.path.join(
+    "src", "sas", "sasgui", "plottools")
 packages.append("sas.sasgui.plottools")
 
@@ -275,4 +331,5 @@
 
 EXTENSIONS = [".c", ".cpp"]
+
 
 def append_file(file_list, dir_path):
@@ -294,10 +351,11 @@
                         file_list.append(os.path.join(sub_dir, new_f))
 
+
 # Comment out the following to avoid rebuilding all the models
 file_sources = []
 append_file(file_sources, gen_dir)
 
-#Wojtek's hacky way to add doc files while bundling egg
-#def add_doc_files(directory):
+# Wojtek's hacky way to add doc files while bundling egg
+# def add_doc_files(directory):
 #    paths = []
 #    for (path, directories, filenames) in os.walk(directory):
@@ -312,4 +370,5 @@
 package_data['sas.sasview'] = ['images/*',
                                'media/*',
+                               'logging.ini',
                                'test/*.txt',
                                'test/1d_data/*',
@@ -331,11 +390,11 @@
     'lxml', 'h5py',
 
-    ## The following dependecies won't install automatically, so assume them
-    ## The numbers should be bumped up for matplotlib and wxPython as well.
+    # The following dependecies won't install automatically, so assume them
+    # The numbers should be bumped up for matplotlib and wxPython as well.
     # 'numpy>=1.4.1', 'scipy>=0.7.2', 'matplotlib>=0.99.1.1',
     # 'wxPython>=2.8.11', 'pil',
-    ]
-
-if os.name=='nt':
+]
+
+if os.name == 'nt':
     required.extend(['html5lib', 'reportlab'])
 else:
@@ -346,25 +405,25 @@
 setup(
     name="sasview",
-    version = VERSION,
-    description = "SasView application",
-    author = "SasView Team",
-    author_email = "developers@sasview.org",
-    url = "http://sasview.org",
-    license = "PSF",
-    keywords = "small-angle x-ray and neutron scattering analysis",
-    download_url = "https://github.com/SasView/sasview.git",
-    package_dir = package_dir,
-    packages = packages,
-    package_data = package_data,
-    ext_modules = ext_modules,
-    install_requires = required,
-    zip_safe = False,
-    entry_points = {
-                    'console_scripts':[
-                                       "sasview = sas.sasview.sasview:run",
-                                       ]
-                    },
-    cmdclass = {'build_ext': build_ext_subclass,
-                'docs': BuildSphinxCommand,
-                'disable_openmp': DisableOpenMPCommand}
-    )
+    version=VERSION,
+    description="SasView application",
+    author="SasView Team",
+    author_email="developers@sasview.org",
+    url="http://sasview.org",
+    license="PSF",
+    keywords="small-angle x-ray and neutron scattering analysis",
+    download_url="https://github.com/SasView/sasview.git",
+    package_dir=package_dir,
+    packages=packages,
+    package_data=package_data,
+    ext_modules=ext_modules,
+    install_requires=required,
+    zip_safe=False,
+    entry_points={
+        'console_scripts': [
+            "sasview = sas.sasview.sasview:run",
+        ]
+    },
+    cmdclass={'build_ext': build_ext_subclass,
+              'docs': BuildSphinxCommand,
+              'disable_openmp': DisableOpenMPCommand}
+)
Index: src/examples/data_generator/testdata_generator.py
===================================================================
--- src/examples/data_generator/testdata_generator.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/examples/data_generator/testdata_generator.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -1,2 +1,4 @@
+from __future__ import print_function
+
 """
     Generate two correlated sets of data
@@ -42,5 +44,5 @@
         # Write line data set
         fd = open(filename, 'w')
-        print "Creating ", filename
+        print("Creating ", filename)
         fd.write("#y=A*x+B\n#A=%g\n#B=%g\n" % (self.constant_a, self.constant_b))
         
Index: src/sas/sascalc/calculator/sas_gen.py
===================================================================
--- src/sas/sascalc/calculator/sas_gen.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/calculator/sas_gen.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -3,4 +3,6 @@
 SAS generic computation and sld file readers
 """
+from __future__ import print_function
+
 import sas.sascalc.calculator.core.sld2i as mod
 from sas.sascalc.calculator.BaseComponent import BaseComponent
@@ -558,5 +560,5 @@
                             vol_pix = np.append(vol_pix, vol)
                         except:
-                            print "Error: set the sld of %s to zero"% atom_name
+                            print("Error: set the sld of %s to zero"% atom_name)
                             sld_n = np.append(sld_n, 0.0)
                         sld_mx = np.append(sld_mx, 0)
@@ -609,5 +611,5 @@
         Write
         """
-        print "Not implemented... "
+        print("Not implemented... ")
 
 class SLDReader(object):
@@ -1044,5 +1046,5 @@
     from mpl_toolkits.mplot3d import Axes3D
     current_dir = os.path.abspath(os.path.curdir)
-    print current_dir
+    print(current_dir)
     for i in range(6):
         current_dir, _ = os.path.split(current_dir)
Index: src/sas/sascalc/data_util/calcthread.py
===================================================================
--- src/sas/sascalc/data_util/calcthread.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/data_util/calcthread.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -4,4 +4,5 @@
 #  \brief Abstract class for defining calculation threads.
 #
+from __future__ import print_function
 
 import thread
@@ -295,5 +296,5 @@
     """
     def __init__(self, n=20000):
-        print thread.get_ident()
+        print(thread.get_ident())
         self.starttime = clock()
         self.done = False
@@ -307,20 +308,20 @@
         self.work2.queue(n)
         self.work3.queue(n)
-        print "Expect updates from Main every second and from thread every 2.5 seconds"
-        print ""
+        print("Expect updates from Main every second and from thread every 2.5 seconds")
+        print("")
         self.work.ready(.5)
         while not self.done:
             sleep(1)
-            print "Main thread %d at %.2f" % (thread.get_ident(),
-                                              clock() - self.starttime)
+            print("Main thread %d at %.2f" % (thread.get_ident(),
+                                              clock() - self.starttime))
 
     def update(self, i=0):
-        print "Update i=%d from thread %d at %.2f" % (i, thread.get_ident(),
-                                                      clock() - self.starttime)
+        print("Update i=%d from thread %d at %.2f" % (i, thread.get_ident(),
+                                                      clock() - self.starttime))
         self.work.ready(2.5)
 
     def complete(self, total=0.0):
-        print "Complete total=%g from thread %d at %.2f" % (total,
+        print("Complete total=%g from thread %d at %.2f" % (total,
                                                     thread.get_ident(),
-                                                    clock() - self.starttime)
+                                                    clock() - self.starttime))
         self.done = True
Index: src/sas/sascalc/data_util/formatnum.py
===================================================================
--- src/sas/sascalc/data_util/formatnum.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
+++ src/sas/sascalc/data_util/formatnum.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -37,5 +37,5 @@
 formatter.compact flag.
 """
-from __future__ import division
+from __future__ import division, print_function
 
 import math
Index: src/sas/sascalc/data_util/registry.py
===================================================================
--- src/sas/sascalc/data_util/registry.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/data_util/registry.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -6,4 +6,5 @@
 and registers the built-in file extensions.
 """
+from __future__ import print_function
 
 import os.path
Index: src/sas/sascalc/dataloader/data_info.py
===================================================================
--- src/sas/sascalc/dataloader/data_info.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/dataloader/data_info.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -16,4 +16,5 @@
 ######################################################################
 
+from __future__ import print_function
 
 #TODO: Keep track of data manipulation in the 'process' data structure.
Index: src/sas/sascalc/dataloader/readers/IgorReader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/IgorReader.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sascalc/dataloader/readers/IgorReader.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -12,4 +12,6 @@
 #copyright 2008, University of Tennessee
 #############################################################################
+from __future__ import print_function
+
 import os
 
Index: src/sas/sascalc/dataloader/readers/associations.py
===================================================================
--- src/sas/sascalc/dataloader/readers/associations.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sascalc/dataloader/readers/associations.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -14,4 +14,6 @@
 #copyright 2009, University of Tennessee
 #############################################################################
+from __future__ import print_function
+
 import os
 import sys
@@ -71,5 +73,5 @@
                     logger.error(msg)
     else:
-        print "Could not find reader association settings\n  %s [%s]" % (__file__, os.getcwd())
+        print("Could not find reader association settings\n  %s [%s]" % (__file__, os.getcwd()))
          
          
Index: src/sas/sascalc/dataloader/readers/red2d_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/red2d_reader.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sascalc/dataloader/readers/red2d_reader.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -9,4 +9,6 @@
 #copyright 2008, University of Tennessee
 ######################################################################
+from __future__ import print_function
+
 import os
 import numpy as np
@@ -82,5 +84,5 @@
         detector = Detector()
         if len(output.detector) > 0:
-            print str(output.detector[0])
+            print(str(output.detector[0]))
         output.detector.append(detector)
                 
Index: src/sas/sascalc/fit/AbstractFitEngine.py
===================================================================
--- src/sas/sascalc/fit/AbstractFitEngine.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/fit/AbstractFitEngine.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -1,2 +1,3 @@
+from __future__ import print_function
 
 import  copy
@@ -627,3 +628,3 @@
         """
         """
-        print str(self)
+        print(str(self))
Index: src/sas/sascalc/fit/Loader.py
===================================================================
--- src/sas/sascalc/fit/Loader.py	(revision ac07a3acc20dbf79c564bf642aece71a02c2c862)
+++ src/sas/sascalc/fit/Loader.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -1,2 +1,4 @@
+from __future__ import print_function
+
 # class Loader  to load any king of file
 #import wx
@@ -54,5 +56,5 @@
                     self.dx = np.zeros(len(self.x))
                 except:
-                    print "READ ERROR", line
+                    print("READ ERROR", line)
             # Sanity check
             if not len(self.x) == len(self.dx):
@@ -80,7 +82,7 @@
     load = Load()
     load.set_filename("testdata_line.txt")
-    print load.get_filename() 
+    print(load.get_filename()) 
     load.set_values()
-    print load.get_values()
+    print(load.get_values())
     
             
Index: src/sas/sascalc/fit/expression.py
===================================================================
--- src/sas/sascalc/fit/expression.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
+++ src/sas/sascalc/fit/expression.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -43,4 +43,6 @@
 Ideally, this interface will change
 """
+from __future__ import print_function
+
 import math
 import re
Index: src/sas/sascalc/pr/fit/AbstractFitEngine.py
===================================================================
--- src/sas/sascalc/pr/fit/AbstractFitEngine.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/pr/fit/AbstractFitEngine.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -1,2 +1,3 @@
+from __future__ import print_function
 
 import  copy
@@ -630,3 +631,3 @@
         """
         """
-        print str(self)
+        print(str(self))
Index: src/sas/sascalc/pr/fit/Loader.py
===================================================================
--- src/sas/sascalc/pr/fit/Loader.py	(revision ac07a3acc20dbf79c564bf642aece71a02c2c862)
+++ src/sas/sascalc/pr/fit/Loader.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -1,2 +1,4 @@
+from __future__ import print_function
+
 # class Loader  to load any king of file
 #import wx
@@ -54,5 +56,5 @@
                     self.dx = np.zeros(len(self.x))
                 except:
-                    print "READ ERROR", line
+                    print("READ ERROR", line)
             # Sanity check
             if not len(self.x) == len(self.dx):
@@ -80,7 +82,7 @@
     load = Load()
     load.set_filename("testdata_line.txt")
-    print load.get_filename() 
+    print(load.get_filename()) 
     load.set_values()
-    print load.get_values()
+    print(load.get_values())
     
             
Index: src/sas/sascalc/pr/fit/expression.py
===================================================================
--- src/sas/sascalc/pr/fit/expression.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
+++ src/sas/sascalc/pr/fit/expression.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -1,2 +1,4 @@
+from __future__ import print_function
+
 # This program is public domain
 """
Index: src/sas/sascalc/pr/num_term.py
===================================================================
--- src/sas/sascalc/pr/num_term.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/pr/num_term.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -1,2 +1,4 @@
+from __future__ import print_function
+
 import math
 import numpy as np
@@ -197,3 +199,3 @@
     # Testing estimator
     est = NTermEstimator(invert)
-    print est.num_terms()
+    print(est.num_terms())
Index: src/sas/sascalc/simulation/analmodelpy/tests/signon.py
===================================================================
--- src/sas/sascalc/simulation/analmodelpy/tests/signon.py	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sascalc/simulation/analmodelpy/tests/signon.py	(revision 9c3d784dfd54f5c129d7220da877e5dd6c18f62b)
@@ -17,16 +17,16 @@
     from analmodelpy import analmodelpy as analmodelpymodule
 
-    print "copyright information:"
-    print "   ", analmodelpy.copyright()
-    print "   ", analmodelpymodule.copyright()
+    print("copyright information:")
+    print("   ", analmodelpy.copyright())
+    print("   ", analmodelpymodule.copyright())
 
-    print
-    print "module information:"
-    print "    file:", analmodelpymodule.__file__
-    print "    doc:", analmodelpymodule.__doc__
-    print "    contents:", dir(analmodelpymodule)
+    print()
+    print("module information:")
+    print("    file:", analmodelpymodule.__file__)
+    print("    doc:", analmodelpymodule.__doc__)
+    print("    contents:", dir(analmodelpymodule))
 
-    print
-    print analmodelpymodule.hello()
+    print()
+    print(analmodelpymodule.hello())
 
 # version
Index: src/sas/sascalc/simulation/analmodelpy/tests/testanal_model.py
===================================================================
--- src/sas/sascalc/simulation/analmodelpy/tests/testanal_model.py	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sascalc/simulation/analmodelpy/tests/testanal_model.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -11,4 +11,6 @@
 #  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # 
+from __future__ import print_function
+
 
 if __name__ == "__main__":
@@ -18,12 +20,12 @@
     from SASsimulation import geoshapespy
 
-    print "copyright information:"
-    print "   ", analmodelpymodule.copyright()
+    print("copyright information:")
+    print("   ", analmodelpymodule.copyright())
 
-    print
-    print "module information:"
-    print "    file:", analmodelpymodule.__file__
-    print "    doc:", analmodelpymodule.__doc__
-    print "    contents:", dir(analmodelpymodule)
+    print()
+    print("module information:")
+    print("    file:", analmodelpymodule.__file__)
+    print("    doc:", analmodelpymodule.__doc__)
+    print("    contents:", dir(analmodelpymodule))
 
     a = geoshapespy.new_sphere(1.0)
Index: src/sas/sascalc/simulation/geoshapespy/tests/testshapes.py
===================================================================
--- src/sas/sascalc/simulation/geoshapespy/tests/testshapes.py	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sascalc/simulation/geoshapespy/tests/testshapes.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -11,4 +11,6 @@
 #  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # 
+from __future__ import print_function
+
 
 if __name__ == "__main__":
@@ -16,9 +18,9 @@
     from SASsimulation import geoshapespy
 
-    print
-    print "module information:"
-    print "    file:", geoshapespy.__file__
-    print "    doc:", geoshapespy.__doc__
-    print "    contents:", dir(geoshapespy)
+    print()
+    print("module information:")
+    print("    file:", geoshapespy.__file__)
+    print("    doc:", geoshapespy.__doc__)
+    print("    contents:", dir(geoshapespy))
 
     sp = geoshapespy.new_sphere(10)
Index: src/sas/sascalc/simulation/iqPy/tests/signon.py
===================================================================
--- src/sas/sascalc/simulation/iqPy/tests/signon.py	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sascalc/simulation/iqPy/tests/signon.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -11,4 +11,6 @@
 #  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # 
+from __future__ import print_function
+
 
 if __name__ == "__main__":
@@ -17,15 +19,15 @@
     from iqPy import iqPy as iqPymodule
 
-    print "copyright information:"
-    print "   ", iqPy.copyright()
-    print "   ", iqPymodule.copyright()
+    print("copyright information:")
+    print("   ", iqPy.copyright())
+    print("   ", iqPymodule.copyright())
 
-    print
-    print "module information:"
-    print "    file:", iqPymodule.__file__
-    print "    doc:", iqPymodule.__doc__
-    print "    contents:", dir(iqPymodule)
+    print()
+    print("module information:")
+    print("    file:", iqPymodule.__file__)
+    print("    doc:", iqPymodule.__doc__)
+    print("    contents:", dir(iqPymodule))
 
-    print
+    print()
 
 # version
Index: src/sas/sascalc/simulation/iqPy/tests/testiq.py
===================================================================
--- src/sas/sascalc/simulation/iqPy/tests/testiq.py	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sascalc/simulation/iqPy/tests/testiq.py	(revision 9c3d784dfd54f5c129d7220da877e5dd6c18f62b)
@@ -17,5 +17,5 @@
 	iqPy.new_iq(10,0.01,0.4)
 
-	print "pass."
+	print("pass.")
 
 # version
Index: src/sas/sascalc/simulation/pointsmodelpy/tests/signon.py
===================================================================
--- src/sas/sascalc/simulation/pointsmodelpy/tests/signon.py	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sascalc/simulation/pointsmodelpy/tests/signon.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -11,4 +11,6 @@
 #  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # 
+from __future__ import print_function
+
 
 if __name__ == "__main__":
@@ -17,16 +19,16 @@
     from pointsmodelpy import pointsmodelpy as pointsmodelpymodule
 
-    print "copyright information:"
-    print "   ", pointsmodelpy.copyright()
-    print "   ", pointsmodelpymodule.copyright()
+    print("copyright information:")
+    print("   ", pointsmodelpy.copyright())
+    print("   ", pointsmodelpymodule.copyright())
 
-    print
-    print "module information:"
-    print "    file:", pointsmodelpymodule.__file__
-    print "    doc:", pointsmodelpymodule.__doc__
-    print "    contents:", dir(pointsmodelpymodule)
+    print()
+    print("module information:")
+    print("    file:", pointsmodelpymodule.__file__)
+    print("    doc:", pointsmodelpymodule.__doc__)
+    print("    contents:", dir(pointsmodelpymodule))
 
-    print
-    print pointsmodelpymodule.hello()
+    print()
+    print(pointsmodelpymodule.hello())
 
 # version
Index: src/sas/sascalc/simulation/pointsmodelpy/tests/test2dui.py
===================================================================
--- src/sas/sascalc/simulation/pointsmodelpy/tests/test2dui.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sascalc/simulation/pointsmodelpy/tests/test2dui.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -7,4 +7,5 @@
 #  Imports:
 #--------------------------------------------------------------------------------
+from __future__ import print_function
 
 import wx
@@ -46,5 +47,5 @@
 
         data = ImageData(value_grid, index_vals)
-        print value_grid, index_vals
+        print(value_grid, index_vals)
         
         # Create the index axes
Index: src/sas/sascalc/simulation/pointsmodelpy/tests/testcomplexmodel.py
===================================================================
--- src/sas/sascalc/simulation/pointsmodelpy/tests/testcomplexmodel.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sascalc/simulation/pointsmodelpy/tests/testcomplexmodel.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -1,5 +1,8 @@
+from __future__ import print_function
+
 from sasModeling.pointsmodelpy import pointsmodelpy
 from sasModeling.iqPy import iqPy
 from sasModeling.geoshapespy import geoshapespy
+
 
 #First testing: a normal case, a lores model holds a sphere
@@ -61,7 +64,7 @@
   iqPy.OutputIQ(iqcomplex,"testcomplex2.iq")
 
-  print "p(r) is saved in testcomplex2.pr"
-  print "I(Q) is saved in testcomplex2.iq"
-  print "pass"
+  print("p(r) is saved in testcomplex2.pr")
+  print("I(Q) is saved in testcomplex2.iq")
+  print("pass")
 
 #testing 3, insert one empty pdbmodel and one loresmodel
@@ -88,7 +91,7 @@
   iqPy.OutputIQ(iqcomplex,"testcomplex3.iq")
 
-  print "p(r) is saved in testcomplex3.pr"
-  print "I(Q) is saved in testcomplex3.iq"
-  print "pass"
+  print("p(r) is saved in testcomplex3.pr")
+  print("I(Q) is saved in testcomplex3.iq")
+  print("pass")
 
 # Test 2D complex model
@@ -106,6 +109,6 @@
     pointsmodelpy.get_complexpoints(complex,vpcomplex);
  
-    print pointsmodelpy.get_complex_iq_2D(complex,vpcomplex,0.1,0.1);
-    print pointsmodelpy.get_complex_iq_2D(complex,vpcomplex,0.01,0.1);
+    print(pointsmodelpy.get_complex_iq_2D(complex,vpcomplex,0.1,0.1));
+    print(pointsmodelpy.get_complex_iq_2D(complex,vpcomplex,0.01,0.1));
 
 
Index: src/sas/sascalc/simulation/pointsmodelpy/tests/testlores.py
===================================================================
--- src/sas/sascalc/simulation/pointsmodelpy/tests/testlores.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sascalc/simulation/pointsmodelpy/tests/testlores.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -1,2 +1,5 @@
+from __future__ import print_function
+
+
 if __name__ == "__main__":
 
@@ -10,10 +13,10 @@
 #    print "   ", pointsmodelpymodule.copyright()
 
-    print
-    print "module information:"
-    print "    file:", pointsmodelpy.__file__
-    print "    doc:", pointsmodelpy.__doc__
-    print "    contents:", dir(pointsmodelpy)
-    print "    contents:", dir(geoshapespy)
+    print()
+    print("module information:")
+    print("    file:", pointsmodelpy.__file__)
+    print("    doc:", pointsmodelpy.__doc__)
+    print("    contents:", dir(pointsmodelpy))
+    print("    contents:", dir(geoshapespy))
 
 #    a = geoshapespy.new_singlehelix(10,2,30,2)
@@ -46,7 +49,7 @@
     pointsmodelpy.outputPDB(lm,vp,"modelpy.pseudo.pdb")
 
-    print "calculating distance distribution"
+    print("calculating distance distribution")
     rmax = pointsmodelpy.get_lores_pr(lm,vp)
-    print "finish calculating get_lores_pr, and rmax is:", rmax
+    print("finish calculating get_lores_pr, and rmax is:", rmax)
     pointsmodelpy.outputPR(lm,"testlores.pr")
     pointsmodelpy.get_lores_iq(lm,iq)
@@ -54,7 +57,7 @@
     iqPy.OutputIQ(iq, "testlores.iq")
 
-    print "Testing get I from a single q"
+    print("Testing get I from a single q")
     result = pointsmodelpy.get_lores_i(lm,0.1)
-    print "The I(0.1) is: %s" % str(result) 
+    print("The I(0.1) is: %s" % str(result)) 
 
 # version
Index: src/sas/sascalc/simulation/pointsmodelpy/tests/testlores2d.py
===================================================================
--- src/sas/sascalc/simulation/pointsmodelpy/tests/testlores2d.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sascalc/simulation/pointsmodelpy/tests/testlores2d.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -1,2 +1,5 @@
+from __future__ import print_function
+
+
 def test_lores2d(phi):
   from sasModeling.pointsmodelpy import pointsmodelpy 
@@ -45,8 +48,8 @@
   value_grid = zeros((100,100),Float)
   width, height = value_grid.shape
-  print width,height
+  print(width,height)
 
   I = pointsmodelpy.calculateI_Qxy(lm,0.00001,0.000002)
-  print I
+  print(I)
 
   Imax = 0
@@ -86,8 +89,8 @@
   value_grid = zeros((100,100),Float)
   width, height = value_grid.shape
-  print width,height
+  print(width,height)
 
   I = pointsmodelpy.calculateI_Qxy(lm,0.00001,0.000002)
-  print I
+  print(I)
 
   Imax = 0
@@ -109,7 +112,7 @@
 if __name__ == "__main__":
 
-  print "start to test lores 2D"
+  print("start to test lores 2D")
 #  test_lores2d(10)
   value_grid = get2d_2()
-  print value_grid
-  print "pass"
+  print(value_grid)
+  print("pass")
Index: src/sas/sasgui/guiframe/config.py
===================================================================
--- src/sas/sasgui/guiframe/config.py	(revision ea45bfe4e68bda8abf0866aa2c51cfcf4cf63e36)
+++ src/sas/sasgui/guiframe/config.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -2,4 +2,6 @@
     Application settings
 """
+from __future__ import print_function
+
 import time
 import os
@@ -150,5 +152,5 @@
         :TODO - Need method doc string
         """
-        print "%g:  %s" % (time.clock(), message)
+        print("%g:  %s" % (time.clock(), message))
 
         if __EVT_DEBUG_2_FILE__:
Index: src/sas/sasgui/guiframe/data_panel.py
===================================================================
--- src/sas/sasgui/guiframe/data_panel.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/guiframe/data_panel.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -11,4 +11,6 @@
 This module provides Graphic interface for the data_manager module.
 """
+from __future__ import print_function
+
 import wx
 from wx.build import build_options
@@ -514,5 +516,5 @@
                 self.parent.save_data2d(data, default_name)
             else:
-                print "unable to save this type of data"
+                print("unable to save this type of data")
 
     def layout_data_list(self):
@@ -1497,5 +1499,5 @@
     except:
         # raise
-        print "error", sys.exc_value
+        print("error", sys.exc_value)
 
     app.MainLoop()
Index: src/sas/sasgui/guiframe/data_processor.py
===================================================================
--- src/sas/sasgui/guiframe/data_processor.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/guiframe/data_processor.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -18,4 +18,6 @@
 
 """
+from __future__ import print_function
+
 import os
 import sys
@@ -2035,5 +2037,5 @@
         frame.Show(True)
     except:
-        print sys.exc_value
+        print(sys.exc_value)
 
     app.MainLoop()
Index: src/sas/sasgui/guiframe/dummyapp.py
===================================================================
--- src/sas/sasgui/guiframe/dummyapp.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/guiframe/dummyapp.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -3,4 +3,6 @@
 Allows the user to set an external data manager
 """
+from __future__ import print_function
+
 import sas.sasgui.guiframe.gui_manager as gui_manager
 
@@ -32,5 +34,5 @@
         plug_menu.Append(id, '&Do something')
         def _on_do_something(event):
-            print "Do something"
+            print("Do something")
         wx.EVT_MENU(self.parent, id, _on_do_something)
     
Index: src/sas/sasgui/guiframe/gui_manager.py
===================================================================
--- src/sas/sasgui/guiframe/gui_manager.py	(revision 49165488dcf1dbf657666bc78e3d4b4904d1c094)
+++ src/sas/sasgui/guiframe/gui_manager.py	(revision 2f22db96dce134a5ac8f4dba0b22c4df370c5431)
@@ -77,9 +77,9 @@
     # clean all these module variables and put them into a config class
     # that can be passed by sasview.py.
-    logger.info(sys.executable)
-    logger.info(str(sys.argv))
+    logger.debug(sys.executable)
+    logger.debug(str(sys.argv))
     from sas import sasview as sasview
     app_path = os.path.dirname(sasview.__file__)
-    logger.info("Using application path: %s", app_path)
+    logger.debug("Using application path: %s", app_path)
     return app_path
 
@@ -109,5 +109,5 @@
         if fObj is not None:
             fObj.close()
-    logger.info("GuiManager loaded %s/%s" % (path, file))
+    logger.debug("GuiManager loaded %s/%s" % (path, file))
     return config_module
 
@@ -126,9 +126,9 @@
         # Didn't find local config, load the default
         import sas.sasgui.guiframe.config as config
-        logger.info("using default local_config")
+        logger.debug("using default local_config")
     else:
-        logger.info("found local_config in %s" % os.getcwd())
+        logger.debug("found local_config in %s" % os.getcwd())
 else:
-    logger.info("found local_config in %s" % PATH_APP)
+    logger.debug("found local_config in %s" % PATH_APP)
 
 from sas.sasgui.guiframe.customdir import SetupCustom
@@ -139,9 +139,9 @@
     if custom_config is None:
         msgConfig = "Custom_config file was not imported"
-        logger.info(msgConfig)
+        logger.debug(msgConfig)
     else:
-        logger.info("using custom_config in %s" % os.getcwd())
+        logger.debug("using custom_config in %s" % os.getcwd())
 else:
-    logger.info("using custom_config from %s" % c_conf_dir)
+    logger.debug("using custom_config from %s" % c_conf_dir)
 
 # read some constants from config
@@ -2129,7 +2129,8 @@
                 if "SAS_OPENCL" in line:
                     if sas_opencl:
-                        new_config_lines.append("SAS_OPENCL = \""+sas_opencl+"\"")
+                        new_config_lines.append("SAS_OPENCL = \"" + sas_opencl
+                                                + "\"\n")
                     else:
-                        new_config_lines.append("SAS_OPENCL = None")
+                        new_config_lines.append("SAS_OPENCL = \"None\"\n")
                 else:
                     new_config_lines.append(line)
@@ -2156,8 +2157,6 @@
         if response is not None:
             try:
-                # 
                 content = response.read().strip()
-                logger.info("Connected to www.sasview.org. Latest version: %s"
-                             % (content))
+                logger.info("Connected to www.sasview.org. Latest version: %s", content)
                 version_info = json.loads(content)
             except:
Index: src/sas/sasgui/guiframe/gui_style.py
===================================================================
--- src/sas/sasgui/guiframe/gui_style.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/guiframe/gui_style.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -3,4 +3,6 @@
 Provide the style for guiframe
 """
+from __future__ import print_function
+
 import wx
 import os
@@ -79,12 +81,12 @@
 if __name__ == "__main__":
   
-    print GUIFRAME.DEFAULT_STYLE
-    print GUIFRAME.FLOATING_PANEL
-    print GUIFRAME.SINGLE_APPLICATION
+    print(GUIFRAME.DEFAULT_STYLE)
+    print(GUIFRAME.FLOATING_PANEL)
+    print(GUIFRAME.SINGLE_APPLICATION)
     style = GUIFRAME.MULTIPLE_APPLICATIONS
     style &= GUIFRAME.PLOTTING_ON
-    print style == GUIFRAME.PLOTTING_ON
+    print(style == GUIFRAME.PLOTTING_ON)
     style1 = GUIFRAME.MULTIPLE_APPLICATIONS
     style1 &= (~GUIFRAME.MANAGER_ON)
-    print style1 == GUIFRAME.DEFAULT_STYLE
-    print style1
+    print(style1 == GUIFRAME.DEFAULT_STYLE)
+    print(style1)
Index: src/sas/sasgui/guiframe/proxy.py
===================================================================
--- src/sas/sasgui/guiframe/proxy.py	(revision 463e7ffce130ae386f93cd18b87a1120743e88b5)
+++ src/sas/sasgui/guiframe/proxy.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -1,4 +1,6 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
+from __future__ import print_function
+
 import urllib2
 import sys
@@ -157,5 +159,5 @@
     response = c.connect()
     if response is not None:
-        print 50 * '-'
+        print(50 * '-')
         content = json.loads(response.read().strip())
         pprint(content)
Index: src/sas/sasgui/perspectives/calculator/detector_editor.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/detector_editor.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/perspectives/calculator/detector_editor.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -1,2 +1,3 @@
+from __future__ import print_function
 
 import wx
@@ -34,5 +35,5 @@
             self.set_values()
         except:
-            print "error", sys.exc_value
+            print("error", sys.exc_value)
 
     def _define_structure(self):
Index: src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -3,4 +3,5 @@
 This module relies on guiframe manager.
 """
+from __future__ import print_function
 
 import wx
@@ -1998,5 +1999,5 @@
             self.panel.set_volume_ctl_val(str(val))
         except:
-            print "self.panel is not initialized yet"
+            print("self.panel is not initialized yet")
 
     def set_omfpanel_default_shap(self, shape):
Index: src/sas/sasgui/perspectives/calculator/image_viewer.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/image_viewer.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/calculator/image_viewer.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -1,2 +1,4 @@
+from __future__ import print_function
+
 import os
 import sys
@@ -78,5 +80,5 @@
                 wx.PostEvent(parent, StatusEvent(status=err_msg, info="error"))
             else:
-                print err_msg
+                print(err_msg)
 
     def choose_data_file(self, location=None):
@@ -301,5 +303,5 @@
                                                     info="error"))
             else:
-                print err_msg
+                print(err_msg)
         return flag
 
@@ -332,5 +334,5 @@
                                                     info="error"))
             else:
-                print err_msg
+                print(err_msg)
         return flag
 
@@ -361,5 +363,5 @@
                                                     info="error"))
             else:
-                print err_msg
+                print(err_msg)
 
         self.OnClose(event)
Index: src/sas/sasgui/perspectives/calculator/model_editor.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/model_editor.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/calculator/model_editor.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -23,4 +23,6 @@
 #copyright 2009, University of Tennessee
 ################################################################################
+from __future__ import print_function
+
 import wx
 import sys
@@ -871,5 +873,5 @@
         # Put the cursor at appropriate position
         length = len(label)
-        print length
+        print(length)
         if label[length-1] == ')':
             length -= 1
Index: src/sas/sasgui/perspectives/calculator/sld_panel.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/sld_panel.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/calculator/sld_panel.py	(revision fe09e9bb0ad6caa9284d13a5c7dfdfc420d0c28b)
@@ -60,5 +60,6 @@
         # Object that receive status event
         self.base = base
-        self.wavelength = WAVELENGTH
+        self.neutron_wavelength = WAVELENGTH
+        self.xray_source_input = WAVELENGTH
         self.parent = parent
         #layout attribute
@@ -67,19 +68,21 @@
         self.compound = ""
         self.density = ""
-        self.wavelength_ctl = None
+        self.neutron_wavelength_ctl = None
+        self.xray_source_input_ctl = None
+        self.xray_cbox = None
         self.neutron_sld_real_ctl = None
         self.neutron_sld_im_ctl = None
-        self.mo_ka_sld_real_ctl = None
-        self.mo_ka_sld_im_ctl = None
-        self.cu_ka_sld_real_ctl = None
-        self.cu_ka_sld_im_ctl = None
+        self.xray_sld_real_ctl = None
+        self.xray_sld_im_ctl = None
         self.neutron_abs_ctl = None
         self.neutron_inc_ctl = None
         self.neutron_length_ctl = None
         self.button_calculate = None
+        self.xray_source = None
         #Draw the panel
         self._do_layout()
         self.SetAutoLayout(True)
         self.Layout()
+        self.fill_xray_cbox()
 
     def _do_layout(self):
@@ -108,8 +111,17 @@
         self.density_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, -1))
         unit_density_txt = wx.StaticText(self, -1, unit_density)
-        wavelength_txt = wx.StaticText(self, -1, 'Wavelength ')
-        self.wavelength_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, -1))
-        self.wavelength_ctl.SetValue(str(self.wavelength))
-        unit_a_txt = wx.StaticText(self, -1, unit_a)
+        neutron_wavelength_txt = wx.StaticText(self, -1, 'Neutron wavelength')
+        self.neutron_wavelength_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, -1))
+        self.neutron_wavelength_ctl.SetValue(str(self.neutron_wavelength))
+        self.xray_source_input_txt = wx.StaticText(self, -1, 'X-ray wavelength')
+        self.xray_source_input_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, -1))
+        self.xray_source_input_ctl.SetValue(str(self.xray_source_input))
+        neutron_unit_a_txt = wx.StaticText(self, -1, unit_a)
+
+        self.xray_cbox = wx.ComboBox(self, -1, size=(70, 20), style=wx.CB_READONLY)
+        xray_cbox_tip = "Select an element, wavelength or energy"
+        self.xray_cbox.SetToolTipString(xray_cbox_tip)
+        wx.EVT_COMBOBOX(self.xray_cbox, -1, self.on_select_xray)
+
         iy = 0
         ix = 0
@@ -131,11 +143,21 @@
         iy += 1
         ix = 0
-        sizer_input.Add(wavelength_txt, (iy, ix), (1, 1),
-                             wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
-        ix += 1
-        sizer_input.Add(self.wavelength_ctl, (iy, ix), (1, 1),
-                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
-        ix += 1
-        sizer_input.Add(unit_a_txt, (iy, ix), (1, 1),
+        sizer_input.Add(neutron_wavelength_txt, (iy, ix), (1, 1),
+                             wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer_input.Add(self.neutron_wavelength_ctl, (iy, ix), (1, 1),
+                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+        ix += 1
+        sizer_input.Add(neutron_unit_a_txt, (iy, ix), (1, 1),
+                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+        iy += 1
+        ix = 0
+        sizer_input.Add(self.xray_source_input_txt, (iy, ix), (1, 1),
+                             wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer_input.Add(self.xray_source_input_ctl, (iy, ix), (1, 1),
+                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+        ix += 1
+        sizer_input.Add(self.xray_cbox, (iy, ix), (1, 1),
                             wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         boxsizer1.Add(sizer_input)
@@ -151,32 +173,21 @@
                                                  size=(_BOX_WIDTH, -1))
         self.neutron_sld_real_ctl.SetEditable(False)
-        self.neutron_sld_real_ctl.SetToolTipString("Neutron SLD real.")
+        self.neutron_sld_real_ctl.SetToolTipString("Neutron SLD real")
         self.neutron_sld_im_ctl = wx.TextCtrl(self, -1,
                                               size=(_BOX_WIDTH, -1))
         self.neutron_sld_im_ctl.SetEditable(False)
-        self.neutron_sld_im_ctl.SetToolTipString("Neutron SLD imaginary.")
+        self.neutron_sld_im_ctl.SetToolTipString("Neutron SLD imaginary")
         neutron_sld_units_txt = wx.StaticText(self, -1, unit_sld)
 
-        cu_ka_sld_txt = wx.StaticText(self, -1, 'Cu Ka SLD')
-        self.cu_ka_sld_real_ctl = wx.TextCtrl(self, -1,
+        xray_sld_txt = wx.StaticText(self, -1, 'X-ray SLD')
+        self.xray_sld_real_ctl = wx.TextCtrl(self, -1,
                                                size=(_BOX_WIDTH, -1))
-        self.cu_ka_sld_real_ctl.SetEditable(False)
-        self.cu_ka_sld_real_ctl.SetToolTipString("Cu Ka SLD real.")
-        self.cu_ka_sld_im_ctl = wx.TextCtrl(self, -1,
+        self.xray_sld_real_ctl.SetEditable(False)
+        self.xray_sld_real_ctl.SetToolTipString("X-ray SLD real")
+        self.xray_sld_im_ctl = wx.TextCtrl(self, -1,
                                             size=(_BOX_WIDTH, -1))
-        self.cu_ka_sld_im_ctl.SetEditable(False)
-        self.cu_ka_sld_im_ctl.SetToolTipString("Cu Ka SLD imaginary.")
-        cu_ka_sld_units_txt = wx.StaticText(self, -1, unit_sld)
-
-        mo_ka_sld_txt = wx.StaticText(self, -1, 'Mo Ka SLD')
-        self.mo_ka_sld_real_ctl = wx.TextCtrl(self, -1,
-                                               size=(_BOX_WIDTH, -1))
-        self.mo_ka_sld_real_ctl.SetEditable(False)
-        self.mo_ka_sld_real_ctl.SetToolTipString("Mo Ka SLD real.")
-        self.mo_ka_sld_im_ctl = wx.TextCtrl(self, -1,
-                                             size=(_BOX_WIDTH, -1))
-        self.mo_ka_sld_im_ctl.SetEditable(False)
-        self.mo_ka_sld_im_ctl.SetToolTipString("Mo Ka SLD imaginary.")
-        mo_ka_sld_units_txt = wx.StaticText(self, -1, unit_sld)
+        self.xray_sld_im_ctl.SetEditable(False)
+        self.xray_sld_im_ctl.SetToolTipString("X-ray SLD imaginary")
+        xray_sld_units_txt = wx.StaticText(self, -1, unit_sld)
 
         neutron_inc_txt = wx.StaticText(self, -1, 'Neutron Inc. Xs')
@@ -219,8 +230,8 @@
         iy += 1
         ix = 0
-        sizer_output.Add(cu_ka_sld_txt, (iy, ix), (1, 1),
-                             wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
-        ix += 1
-        sizer_output.Add(self.cu_ka_sld_real_ctl, (iy, ix), (1, 1),
+        sizer_output.Add(xray_sld_txt, (iy, ix), (1, 1),
+                             wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer_output.Add(self.xray_sld_real_ctl, (iy, ix), (1, 1),
                             wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         ix += 1
@@ -228,24 +239,8 @@
                          (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         ix += 1
-        sizer_output.Add(self.cu_ka_sld_im_ctl,
+        sizer_output.Add(self.xray_sld_im_ctl,
                          (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         ix += 1
-        sizer_output.Add(cu_ka_sld_units_txt,
-                         (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0)
-        iy += 1
-        ix = 0
-        sizer_output.Add(mo_ka_sld_txt, (iy, ix), (1, 1),
-                             wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
-        ix += 1
-        sizer_output.Add(self.mo_ka_sld_real_ctl, (iy, ix), (1, 1),
-                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
-        ix += 1
-        sizer_output.Add(wx.StaticText(self, -1, i_complex),
-                         (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0)
-        ix += 1
-        sizer_output.Add(self.mo_ka_sld_im_ctl,
-                         (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0)
-        ix += 1
-        sizer_output.Add(mo_ka_sld_units_txt,
+        sizer_output.Add(xray_sld_units_txt,
                          (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         iy += 1
@@ -310,4 +305,29 @@
         self.SetSizer(vbox)
 
+    def fill_xray_cbox(self):
+        """
+        fill the x-ray combobox with the sources
+        """
+        source_list = ['[A]', '[keV]', 'Element']
+        for source in source_list:
+            pos = self.xray_cbox.Append(str(source))
+            self.xray_cbox.SetClientData(pos, str(source.strip()))
+        self.xray_cbox.SetSelection(0)
+        self.xray_source = source_list[0]
+
+    def on_select_xray(self, event=None):
+        """
+        On Selecting a source
+        """
+        item = event.GetEventObject()
+        self.xray_source = item.GetValue().strip()
+
+        if self.xray_source == "[A]":
+            self.xray_source_input_txt.SetLabel("X-ray wavelength")
+        elif self.xray_source == "[keV]":
+            self.xray_source_input_txt.SetLabel("X-ray energy")
+        elif self.xray_source == "Element":
+            self.xray_source_input_txt.SetLabel("X-ray source")
+
     def on_help(self, event):
         """
@@ -363,17 +383,42 @@
             msg += "Error for Density value :expect float"
 
-        self.wavelength = self.wavelength_ctl.GetValue()
-        if str(self.wavelength).lstrip().rstrip() == "":
-            self.wavelength = WAVELENGTH
-            self.wavelength_ctl.SetValue(str(WAVELENGTH))
-            self.wavelength_ctl.SetBackgroundColour(wx.WHITE)
-            self.wavelength_ctl.Refresh()
+        self.neutron_wavelength = self.neutron_wavelength_ctl.GetValue()
+        self.xray_source_input = self.xray_source_input_ctl.GetValue()
+
+        if str(self.neutron_wavelength).lstrip().rstrip() == "":
+            self.neutron_wavelength = WAVELENGTH
+            self.neutron_wavelength_ctl.SetValue(str(WAVELENGTH))
+            self.neutron_wavelength_ctl.SetBackgroundColour(wx.WHITE)
+            self.neutron_wavelength_ctl.Refresh()
             msg += "Default value for wavelength is 6.0"
         else:
-            if check_float(self.wavelength_ctl):
-                self.wavelength = float(self.wavelength)
+            if check_float(self.neutron_wavelength_ctl):
+                self.neutron_wavelength = float(self.neutron_wavelength)
             else:
                 flag = False
                 msg += "Error for wavelength value :expect float"
+
+        if str(self.xray_source_input).lstrip().rstrip() == "":
+            self.xray_source_input = WAVELENGTH
+            self.xray_source_input_ctl.SetValue(str(WAVELENGTH))
+            self.xray_source_input_ctl.SetBackgroundColour(wx.WHITE)
+            self.xray_source_input_ctl.Refresh()
+            msg += "Default value for wavelength is 6.0"
+        else:
+            if (self.xray_source == '[A]') or (self.xray_source == '[keV]'):
+                if check_float(self.xray_source_input_ctl):
+                    self.xray_source_input = float(self.xray_source_input)
+                else:
+                    flag = False
+                    msg += "Error for wavelength value :expect float"
+            elif (self.xray_source == 'Element'):
+                try:
+                    import periodictable
+                    exec("periodictable." + self.xray_source_input)
+                except AttributeError:
+                    flag = False
+                    msg += "X-ray element supplied isn't in the database"
+
+
 
         self.compound = self.compound_ctl.GetValue().lstrip().rstrip()
@@ -410,5 +455,4 @@
         return xray_sld_from_atoms(atom, density=density, energy=energy)
 
-
     def calculateSld(self, event):
         """
@@ -430,11 +474,18 @@
                         length = neutron_scattering(compound=self.compound,
                                    density=self.density,
-                                   wavelength=self.wavelength)
-            cu_real, cu_im = self.calculate_sld_helper(element="Cu",
-                                                 density=self.density,
-                                        molecule_formula=self.sld_formula)
-            mo_real, mo_im = self.calculate_sld_helper(element="Mo",
-                                                       density=self.density,
-                                     molecule_formula=self.sld_formula)
+                                   wavelength=self.neutron_wavelength)
+            if self.xray_source == "[A]":
+                energy = xray_energy(self.xray_source_input)
+                xray_real, xray_im = xray_sld_from_atoms(self.sld_formula.atoms,
+                                                         density=self.density,
+                                                         energy=energy)
+            elif self.xray_source == "[keV]":
+                xray_real, xray_im = xray_sld_from_atoms(self.sld_formula.atoms,
+                                                         density=self.density,
+                                                         energy=self.xray_source_input)
+            elif self.xray_source == "Element":
+                xray_real, xray_im = self.calculate_sld_helper(element=self.xray_source_input,
+                                                               density=self.density,
+                                                               molecule_formula=self.sld_formula)
             # set neutron sld values
             val = format_number(sld_real * _SCALE)
@@ -443,11 +494,7 @@
             self.neutron_sld_im_ctl.SetValue(val)
             # Compute the Cu SLD
-            self.cu_ka_sld_real_ctl.SetValue(format_number(cu_real * _SCALE))
-            val = format_number(math.fabs(cu_im) * _SCALE)
-            self.cu_ka_sld_im_ctl.SetValue(val)
-            # Compute the Mo SLD
-            self.mo_ka_sld_real_ctl.SetValue(format_number(mo_real * _SCALE))
-            val = format_number(math.fabs(mo_im) * _SCALE)
-            self.mo_ka_sld_im_ctl.SetValue(val)
+            self.xray_sld_real_ctl.SetValue(format_number(xray_real * _SCALE))
+            val = format_number(math.fabs(xray_im) * _SCALE)
+            self.xray_sld_im_ctl.SetValue(val)
             # set incoherence and absorption
             self.neutron_inc_ctl.SetValue(format_number(incoh))
@@ -456,5 +503,6 @@
             self.neutron_length_ctl.SetValue(format_number(length))
             # display wavelength
-            self.wavelength_ctl.SetValue(str(self.wavelength))
+            #self.wavelength_ctl.SetValue(str(self.wavelength))
+            #self.wavelength_ctl.SetValue(str(self.wavelength))
         except:
             if self.base is not None:
@@ -470,8 +518,6 @@
         self.neutron_sld_real_ctl.SetValue("")
         self.neutron_sld_im_ctl.SetValue("")
-        self.mo_ka_sld_real_ctl.SetValue("")
-        self.mo_ka_sld_im_ctl.SetValue("")
-        self.cu_ka_sld_real_ctl.SetValue("")
-        self.cu_ka_sld_im_ctl.SetValue("")
+        self.xray_sld_real_ctl.SetValue("")
+        self.xray_sld_im_ctl.SetValue("")
         self.neutron_abs_ctl.SetValue("")
         self.neutron_inc_ctl.SetValue("")
Index: src/sas/sasgui/perspectives/fitting/basepage.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/basepage.py	(revision 463e7ffce130ae386f93cd18b87a1120743e88b5)
+++ src/sas/sasgui/perspectives/fitting/basepage.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -2,4 +2,6 @@
 Base Page for fitting
 """
+from __future__ import print_function
+
 import sys
 import os
@@ -657,8 +659,8 @@
         # It seems MAC needs wxCallAfter
         if event.GetId() == GUIFRAME_ID.COPYEX_ID:
-            print "copy excel"
+            print("copy excel")
             wx.CallAfter(self.get_copy_excel)
         elif event.GetId() == GUIFRAME_ID.COPYLAT_ID:
-            print "copy latex"
+            print("copy latex")
             wx.CallAfter(self.get_copy_latex)
         else:
@@ -3368,6 +3370,6 @@
         except Exception:
             logger.error(traceback.format_exc())
-            print "Error in BasePage._paste_poly_help: %s" % \
-                  sys.exc_info()[1]
+            print("Error in BasePage._paste_poly_help: %s" % \
+                  sys.exc_info()[1])
 
     def _set_disp_cb(self, isarray, item):
@@ -3398,5 +3400,5 @@
             Moveit; This method doesn't belong here
         """
-        print "BasicPage.update_pinhole_smear was called: skipping"
+        print("BasicPage.update_pinhole_smear was called: skipping")
         return
 
@@ -3574,5 +3576,5 @@
         # check model type to show sizer
         if self.model is not None:
-            print "_set_model_sizer_selection: disabled."
+            print("_set_model_sizer_selection: disabled.")
             # self._set_model_sizer_selection(self.model)
 
Index: src/sas/sasgui/perspectives/fitting/fitting.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/fitting.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/fitting/fitting.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -11,4 +11,6 @@
 #copyright 2009, University of Tennessee
 ################################################################################
+from __future__ import print_function
+
 import re
 import sys
@@ -1253,5 +1255,5 @@
         """
         """
-        print "update_fit result", result
+        print("update_fit result", result)
 
     def _batch_fit_complete(self, result, pars, page_id,
@@ -2046,5 +2048,5 @@
             res = (fn - gn) / en
         except ValueError:
-            print "Unmatch lengths %s, %s, %s" % (len(fn), len(gn), len(en))
+            print("Unmatch lengths %s, %s, %s" % (len(fn), len(gn), len(en)))
             return
 
Index: src/sas/sasgui/perspectives/fitting/media/plugin.rst
===================================================================
--- src/sas/sasgui/perspectives/fitting/media/plugin.rst	(revision 984f3fc674aba45cfbaea60989743bfcf9507987)
+++ src/sas/sasgui/perspectives/fitting/media/plugin.rst	(revision 72100ee7baecfd5d180a35d3c9f34a0b02fa5726)
@@ -538,5 +538,5 @@
     sin, cos, tan, asin, acos, atan:
         Trigonometry functions and inverses, operating on radians.
-    sinh, cos, tanh, asinh, acosh, atanh:
+    sinh, cosh, tanh, asinh, acosh, atanh:
         Hyperbolic trigonometry functions.
     atan2(y,x):
Index: src/sas/sasgui/perspectives/fitting/models.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/models.py	(revision 463e7ffce130ae386f93cd18b87a1120743e88b5)
+++ src/sas/sasgui/perspectives/fitting/models.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -2,4 +2,6 @@
     Utilities to manage models
 """
+from __future__ import print_function
+
 import traceback
 import os
@@ -141,5 +143,5 @@
         type, value, tb = sys.exc_info()
         if type is not None and issubclass(type, py_compile.PyCompileError):
-            print "Problem with", repr(value)
+            print("Problem with", repr(value))
             raise type, value, tb
         return 1
Index: src/sas/sasgui/perspectives/pr/pr.py
===================================================================
--- src/sas/sasgui/perspectives/pr/pr.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/pr/pr.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -15,4 +15,5 @@
 # Make sure the option of saving each curve is available
 # Use the I(q) curve as input and compare the output to P(r)
+from __future__ import print_function
 
 import sys
@@ -230,5 +231,5 @@
         out, cov = pr.pr_fit()
         for i in range(len(out)):
-            print "%g +- %g" % (out[i], math.sqrt(cov[i][i]))
+            print("%g +- %g" % (out[i], math.sqrt(cov[i][i])))
 
         # Show input P(r)
@@ -318,5 +319,5 @@
             except:
                 err[i] = 1.0
-                print "Error getting error", value, x[i]
+                print("Error getting error", value, x[i])
 
         new_plot = Data1D(x, y)
Index: src/sas/sasgui/perspectives/simulation/ShapeParameters.py
===================================================================
--- src/sas/sasgui/perspectives/simulation/ShapeParameters.py	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sasgui/perspectives/simulation/ShapeParameters.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -8,4 +8,6 @@
 copyright 2009, University of Tennessee
 """
+from __future__ import print_function
+
 import wx
 import sys
@@ -312,5 +314,5 @@
             self.parent.GetSizer().Layout()
         except:
-            print "TODO: move the Layout call of editShape up to the caller"
+            print("TODO: move the Layout call of editShape up to the caller")
 
     def _readCtrlFloat(self, ctrl):
@@ -392,6 +394,6 @@
                     self.current_shape.params[item[0]] = tmp 
         except:
-            print "Could not create"
-            print sys.exc_value
+            print("Could not create")
+            print(sys.exc_value)
                 
     def _onCreate(self, evt):
@@ -485,5 +487,5 @@
         indices = self.shape_listbox.GetSelections()
         if len(indices)>0:
-            print "NOT YET IMPLMENTED"
-            print "renaming", self.shape_listbox.GetString(indices[0])
-                
+            print("NOT YET IMPLMENTED")
+            print("renaming", self.shape_listbox.GetString(indices[0]))
+                
Index: src/sas/sasgui/plottools/PlotPanel.py
===================================================================
--- src/sas/sasgui/plottools/PlotPanel.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/plottools/PlotPanel.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -2,4 +2,6 @@
     Plot panel.
 """
+from __future__ import print_function
+
 import logging
 import traceback
@@ -38,5 +40,5 @@
 def show_tree(obj, d=0):
     """Handy function for displaying a tree of graph objects"""
-    print "%s%s" % ("-"*d, obj.__class__.__name__)
+    print("%s%s" % ("-"*d, obj.__class__.__name__))
     if 'get_children' in dir(obj):
         for a in obj.get_children(): show_tree(a, d + 1)
@@ -2014,5 +2016,5 @@
             self.toolbar.copy_figure(self.canvas)
         except:
-            print "Error in copy Image"
+            print("Error in copy Image")
 
 
Index: src/sas/sasgui/plottools/binder.py
===================================================================
--- src/sas/sasgui/plottools/binder.py	(revision 463e7ffce130ae386f93cd18b87a1120743e88b5)
+++ src/sas/sasgui/plottools/binder.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -2,4 +2,6 @@
 Extension to MPL to support the binding of artists to key/mouse events.
 """
+from __future__ import print_function
+
 import sys
 import logging
@@ -63,5 +65,5 @@
             ]
         except:
-            print "bypassing scroll_event: wrong matplotlib version"
+            print("bypassing scroll_event: wrong matplotlib version")
             self._connections = [
                 canvas.mpl_connect('motion_notify_event', self._onMotion),
Index: src/sas/sasgui/plottools/convert_units.py
===================================================================
--- src/sas/sasgui/plottools/convert_units.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/plottools/convert_units.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -3,4 +3,6 @@
     This is a cleaned up version of unitConverter.py
 """
+from __future__ import print_function
+
 import re
 import string
@@ -68,11 +70,11 @@
     unit8 = "m/s^{4}"  #         x^2               (m/s^{4})^{2}
 
-    print "this unit1 %s ,its powerer %s , and value %s" % (unit1, 1, convert_unit(1, unit1))
-    print "this unit2 %s ,its powerer %s , and value %s" % (unit2, 1, convert_unit(1, unit2))
-    print "this unit3 %s ,its powerer %s , and value %s" % (unit3, 2, convert_unit(2, unit3))
-    print "this unit4 %s ,its powerer %s , and value %s" % (unit4, -1, convert_unit(-1, unit4))
-    print "this unit5 %s ,its powerer %s , and value %s" % (unit5, 2, convert_unit(2, unit5))
-    print "this unit6 %s ,its powerer %s , and value %s" % (unit6, 2, convert_unit(2, unit6))
-    print "this unit7 %s ,its powerer %s , and value %s" % (unit7, -1, convert_unit(-1, unit7))
-    print "this unit8 %s ,its powerer %s , and value %s" % (unit8, 2, convert_unit(2, unit8))
-    print "this unit9 %s ,its powerer %s , and value %s" % (unit9, 2, convert_unit(2, unit9))
+    print("this unit1 %s ,its powerer %s , and value %s" % (unit1, 1, convert_unit(1, unit1)))
+    print("this unit2 %s ,its powerer %s , and value %s" % (unit2, 1, convert_unit(1, unit2)))
+    print("this unit3 %s ,its powerer %s , and value %s" % (unit3, 2, convert_unit(2, unit3)))
+    print("this unit4 %s ,its powerer %s , and value %s" % (unit4, -1, convert_unit(-1, unit4)))
+    print("this unit5 %s ,its powerer %s , and value %s" % (unit5, 2, convert_unit(2, unit5)))
+    print("this unit6 %s ,its powerer %s , and value %s" % (unit6, 2, convert_unit(2, unit6)))
+    print("this unit7 %s ,its powerer %s , and value %s" % (unit7, -1, convert_unit(-1, unit7)))
+    print("this unit8 %s ,its powerer %s , and value %s" % (unit8, 2, convert_unit(2, unit8)))
+    print("this unit9 %s ,its powerer %s , and value %s" % (unit9, 2, convert_unit(2, unit9)))
Index: src/sas/sasgui/plottools/fittings.py
===================================================================
--- src/sas/sasgui/plottools/fittings.py	(revision ac07a3acc20dbf79c564bf642aece71a02c2c862)
+++ src/sas/sasgui/plottools/fittings.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -14,4 +14,6 @@
 
 """
+from __future__ import print_function
+
 from scipy import optimize
 
@@ -106,4 +108,4 @@
     chisqr, out, cov = sasfit(line, [cstA, cstB], event.x, y, 0)
     # print "Output parameters:", out
-    print "The right answer is [70.0, 1.0]"
-    print chisqr, out, cov
+    print("The right answer is [70.0, 1.0]")
+    print(chisqr, out, cov)
Index: src/sas/sasgui/plottools/plottable_interactor.py
===================================================================
--- src/sas/sasgui/plottools/plottable_interactor.py	(revision 45dffa69cb5935e2da7c77a2f040debb07ceb1c6)
+++ src/sas/sasgui/plottools/plottable_interactor.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
@@ -2,5 +2,8 @@
     This module allows more interaction with the plot
 """
+from __future__ import print_function
+
 from BaseInteractor import _BaseInteractor
+
 
 class PointInteractor(_BaseInteractor):
@@ -156,5 +159,5 @@
 
     def clear(self):
-        print "plottable_interactor.clear()"
+        print("plottable_interactor.clear()")
 
     def _on_click(self, evt):
Index: test/fileconverter/test/utest_nxcansas_writer.py
===================================================================
--- test/fileconverter/test/utest_nxcansas_writer.py	(revision c476457a8268dc70465327ac7898306c6c214bb4)
+++ test/fileconverter/test/utest_nxcansas_writer.py	(revision 17c943656cb7c598b2d5cf9530ed6227d88ae6f9)
@@ -66,2 +66,4 @@
         if os.path.isfile(self.write_file_1d):
             os.remove(self.write_file_1d)
+        if os.path.isfile(self.write_file_2d):
+            os.remove(self.write_file_2d)
Index: test/pr_inversion/test/utest_invertor.py
===================================================================
--- test/pr_inversion/test/utest_invertor.py	(revision ac07a3acc20dbf79c564bf642aece71a02c2c862)
+++ test/pr_inversion/test/utest_invertor.py	(revision aaf5e497ff1af2aa7b8b3d361ab951e2a0ca7c93)
@@ -6,9 +6,14 @@
 # Disable "too many methods" complaint 
 # pylint: disable-msg=R0904 
-
-
-import unittest, math, numpy
+from __future__ import print_function
+
+
+import os
+import unittest
+import math
+import numpy
 from sas.sascalc.pr.invertor import Invertor
-        
+
+
 class TestFiguresOfMerit(unittest.TestCase):
             
@@ -235,5 +240,5 @@
             self.assertTrue(chi2/51.0<10.0)
         except:
-            print "chi2 =", chi2/51.0
+            print("chi2 =", chi2/51.0)
             raise
         
@@ -263,5 +268,5 @@
             self.assertTrue(self.invertor.chi2/len(x)<200.00)
         except:
-            print "Chi2(I(q)) =", self.invertor.chi2/len(x)
+            print("Chi2(I(q)) =", self.invertor.chi2/len(x))
             raise
         
@@ -297,5 +302,5 @@
             self.assertTrue(chi2/51.0<50.0)
         except:
-            print "chi2(P(r)) =", chi2/51.0
+            print("chi2(P(r)) =", chi2/51.0)
             raise
         
@@ -341,5 +346,5 @@
             self.assertTrue(self.invertor.chi2>0)
         except:
-            print "Chi2 =", self.invertor.chi2
+            print("Chi2 =", self.invertor.chi2)
             raise
                             
@@ -365,5 +370,5 @@
             self.assertTrue(self.invertor.chi2>0)
         except:
-            print "Chi2 =", self.invertor.chi2
+            print("Chi2 =", self.invertor.chi2)
             raise
         
@@ -416,12 +421,15 @@
         
         # Save
-        self.invertor.to_file("test_output.txt")
+        f_name = "test_output.txt"
+        self.invertor.to_file(f_name)
     
         # Load
-        self.invertor.from_file("test_output.txt")
+        self.invertor.from_file(f_name)
         self.assertEqual(self.invertor.d_max, 160.0)
         self.assertEqual(self.invertor.alpha, 0.0007)
         self.assertEqual(self.invertor.chi2, 836.797)
         self.assertAlmostEqual(self.invertor.pr(self.invertor.out, 10.0), 903.31577041, 4)
+        if os.path.isfile(f_name):
+            os.remove(f_name)
         
     def test_qmin(self):
Index: test/run_one.py
===================================================================
--- test/run_one.py	(revision aaad4c950340dd661ea6ea88902bb2c1a895de57)
+++ test/run_one.py	(revision aaf5e497ff1af2aa7b8b3d361ab951e2a0ca7c93)
@@ -1,3 +1,4 @@
 #!/usr/bin/env python
+from __future__ import print_function
 
 import os
@@ -24,5 +25,5 @@
 #print "\n".join(sys.path)
 test_path,test_file = splitpath(abspath(sys.argv[1]))
-print "=== testing:",sys.argv[1]
+print("=== testing:",sys.argv[1])
 #print test_path, test_file
 sys.argv = [sys.argv[0]]
Index: test/sasdataloader/plugins/test_reader.py
===================================================================
--- test/sasdataloader/plugins/test_reader.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ test/sasdataloader/plugins/test_reader.py	(revision aaf5e497ff1af2aa7b8b3d361ab951e2a0ca7c93)
@@ -8,4 +8,6 @@
 copyright 2008, University of Tennessee
 """
+from __future__ import print_function
+
 import os
 import numpy as np
@@ -59,5 +61,5 @@
     reader = Reader()
     output = reader.read("../test/test_data.test")
-    print output.x
+    print(output.x)
     
     
Index: st/sasdataloader/test/isis_1_0_write_test.xml
===================================================================
--- test/sasdataloader/test/isis_1_0_write_test.xml	(revision c155a16ca3fb1da7057f151c62510d780700b9e8)
+++ 	(revision )
@@ -1,865 +1,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<?xml-stylesheet type="text/xsl" href="cansasxml-html.xsl" ?>
-<SASroot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="cansas1d/1.0" version="1.0" xsi:schemaLocation="cansas1d/1.0 http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd">
-  <SASentry>
-    <Title>TK49 c10_SANS</Title>
-    <Run>79680</Run>
-    <SASdata>
-      <Idata>
-        <Q unit="Q | 1/A">0.009</Q>
-        <I unit="Intensity | 1/cm">85.3333</I>
-        <Idev unit="Intensity | 1/cm">0.852491</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.011</Q>
-        <I unit="Intensity | 1/cm">72.5398</I>
-        <Idev unit="Intensity | 1/cm">0.639548</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.013</Q>
-        <I unit="Intensity | 1/cm">63.3582</I>
-        <Idev unit="Intensity | 1/cm">0.494127</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.015</Q>
-        <I unit="Intensity | 1/cm">57.0952</I>
-        <Idev unit="Intensity | 1/cm">0.414116</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.017</Q>
-        <I unit="Intensity | 1/cm">51.0139</I>
-        <Idev unit="Intensity | 1/cm">0.35145</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.019</Q>
-        <I unit="Intensity | 1/cm">46.4746</I>
-        <Idev unit="Intensity | 1/cm">0.308755</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.021</Q>
-        <I unit="Intensity | 1/cm">41.7191</I>
-        <Idev unit="Intensity | 1/cm">0.271641</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.023</Q>
-        <I unit="Intensity | 1/cm">37.4208</I>
-        <Idev unit="Intensity | 1/cm">0.244658</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.025</Q>
-        <I unit="Intensity | 1/cm">33.7352</I>
-        <Idev unit="Intensity | 1/cm">0.219594</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.027</Q>
-        <I unit="Intensity | 1/cm">30.6073</I>
-        <Idev unit="Intensity | 1/cm">0.203138</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.029</Q>
-        <I unit="Intensity | 1/cm">27.7309</I>
-        <Idev unit="Intensity | 1/cm">0.185859</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.031</Q>
-        <I unit="Intensity | 1/cm">25.2579</I>
-        <Idev unit="Intensity | 1/cm">0.171356</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.033</Q>
-        <I unit="Intensity | 1/cm">22.7712</I>
-        <Idev unit="Intensity | 1/cm">0.159062</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.035</Q>
-        <I unit="Intensity | 1/cm">20.5323</I>
-        <Idev unit="Intensity | 1/cm">0.146135</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.037</Q>
-        <I unit="Intensity | 1/cm">19.0744</I>
-        <Idev unit="Intensity | 1/cm">0.136393</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.039</Q>
-        <I unit="Intensity | 1/cm">17.2832</I>
-        <Idev unit="Intensity | 1/cm">0.127623</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.041</Q>
-        <I unit="Intensity | 1/cm">15.7399</I>
-        <Idev unit="Intensity | 1/cm">0.118288</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.043</Q>
-        <I unit="Intensity | 1/cm">14.5598</I>
-        <Idev unit="Intensity | 1/cm">0.111759</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.045</Q>
-        <I unit="Intensity | 1/cm">13.5906</I>
-        <Idev unit="Intensity | 1/cm">0.105148</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.047</Q>
-        <I unit="Intensity | 1/cm">12.6707</I>
-        <Idev unit="Intensity | 1/cm">0.0996579</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.049</Q>
-        <I unit="Intensity | 1/cm">11.5247</I>
-        <Idev unit="Intensity | 1/cm">0.0929646</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.051</Q>
-        <I unit="Intensity | 1/cm">10.7089</I>
-        <Idev unit="Intensity | 1/cm">0.0888575</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.053</Q>
-        <I unit="Intensity | 1/cm">10.1436</I>
-        <Idev unit="Intensity | 1/cm">0.0849394</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.055</Q>
-        <I unit="Intensity | 1/cm">9.49446</I>
-        <Idev unit="Intensity | 1/cm">0.0811205</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.057</Q>
-        <I unit="Intensity | 1/cm">8.80775</I>
-        <Idev unit="Intensity | 1/cm">0.0773967</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.059</Q>
-        <I unit="Intensity | 1/cm">8.33366</I>
-        <Idev unit="Intensity | 1/cm">0.0748147</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.061</Q>
-        <I unit="Intensity | 1/cm">7.79157</I>
-        <Idev unit="Intensity | 1/cm">0.0720107</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.063</Q>
-        <I unit="Intensity | 1/cm">7.25902</I>
-        <Idev unit="Intensity | 1/cm">0.0693582</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.065</Q>
-        <I unit="Intensity | 1/cm">7.04789</I>
-        <Idev unit="Intensity | 1/cm">0.0677591</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.067</Q>
-        <I unit="Intensity | 1/cm">6.53311</I>
-        <Idev unit="Intensity | 1/cm">0.0652207</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.069</Q>
-        <I unit="Intensity | 1/cm">6.2453</I>
-        <Idev unit="Intensity | 1/cm">0.0642016</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.071</Q>
-        <I unit="Intensity | 1/cm">5.94152</I>
-        <Idev unit="Intensity | 1/cm">0.0625768</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.073</Q>
-        <I unit="Intensity | 1/cm">5.70816</I>
-        <Idev unit="Intensity | 1/cm">0.0612955</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.075</Q>
-        <I unit="Intensity | 1/cm">5.24449</I>
-        <Idev unit="Intensity | 1/cm">0.060141</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.077</Q>
-        <I unit="Intensity | 1/cm">5.08291</I>
-        <Idev unit="Intensity | 1/cm">0.0582239</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.079</Q>
-        <I unit="Intensity | 1/cm">4.88135</I>
-        <Idev unit="Intensity | 1/cm">0.057969</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.081</Q>
-        <I unit="Intensity | 1/cm">4.60942</I>
-        <Idev unit="Intensity | 1/cm">0.056813</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.083</Q>
-        <I unit="Intensity | 1/cm">4.46606</I>
-        <Idev unit="Intensity | 1/cm">0.0569381</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.085</Q>
-        <I unit="Intensity | 1/cm">4.32473</I>
-        <Idev unit="Intensity | 1/cm">0.0558766</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.087</Q>
-        <I unit="Intensity | 1/cm">4.14144</I>
-        <Idev unit="Intensity | 1/cm">0.0552525</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.089</Q>
-        <I unit="Intensity | 1/cm">3.86504</I>
-        <Idev unit="Intensity | 1/cm">0.0544569</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.091</Q>
-        <I unit="Intensity | 1/cm">3.74272</I>
-        <Idev unit="Intensity | 1/cm">0.0529596</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.093</Q>
-        <I unit="Intensity | 1/cm">3.68281</I>
-        <Idev unit="Intensity | 1/cm">0.052891</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.095</Q>
-        <I unit="Intensity | 1/cm">3.46991</I>
-        <Idev unit="Intensity | 1/cm">0.0517565</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.097</Q>
-        <I unit="Intensity | 1/cm">3.37244</I>
-        <Idev unit="Intensity | 1/cm">0.0509328</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.099</Q>
-        <I unit="Intensity | 1/cm">3.27074</I>
-        <Idev unit="Intensity | 1/cm">0.0505183</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.101</Q>
-        <I unit="Intensity | 1/cm">3.13326</I>
-        <Idev unit="Intensity | 1/cm">0.0490847</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.103</Q>
-        <I unit="Intensity | 1/cm">3.01387</I>
-        <Idev unit="Intensity | 1/cm">0.0487012</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.105</Q>
-        <I unit="Intensity | 1/cm">2.87628</I>
-        <Idev unit="Intensity | 1/cm">0.0484307</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.107</Q>
-        <I unit="Intensity | 1/cm">2.85043</I>
-        <Idev unit="Intensity | 1/cm">0.0476786</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.109</Q>
-        <I unit="Intensity | 1/cm">2.72799</I>
-        <Idev unit="Intensity | 1/cm">0.0475526</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.111</Q>
-        <I unit="Intensity | 1/cm">2.61206</I>
-        <Idev unit="Intensity | 1/cm">0.0467475</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.113</Q>
-        <I unit="Intensity | 1/cm">2.58895</I>
-        <Idev unit="Intensity | 1/cm">0.0469767</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.115</Q>
-        <I unit="Intensity | 1/cm">2.45987</I>
-        <Idev unit="Intensity | 1/cm">0.0460139</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.117</Q>
-        <I unit="Intensity | 1/cm">2.37723</I>
-        <Idev unit="Intensity | 1/cm">0.045272</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.119</Q>
-        <I unit="Intensity | 1/cm">2.34122</I>
-        <Idev unit="Intensity | 1/cm">0.0453741</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.121</Q>
-        <I unit="Intensity | 1/cm">2.21745</I>
-        <Idev unit="Intensity | 1/cm">0.0444485</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.123</Q>
-        <I unit="Intensity | 1/cm">2.12646</I>
-        <Idev unit="Intensity | 1/cm">0.0438385</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.125</Q>
-        <I unit="Intensity | 1/cm">2.11264</I>
-        <Idev unit="Intensity | 1/cm">0.0441662</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.127</Q>
-        <I unit="Intensity | 1/cm">2.07523</I>
-        <Idev unit="Intensity | 1/cm">0.0438979</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.129</Q>
-        <I unit="Intensity | 1/cm">2.03548</I>
-        <Idev unit="Intensity | 1/cm">0.0442422</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.131</Q>
-        <I unit="Intensity | 1/cm">1.92452</I>
-        <Idev unit="Intensity | 1/cm">0.0435959</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.133</Q>
-        <I unit="Intensity | 1/cm">1.90866</I>
-        <Idev unit="Intensity | 1/cm">0.0437401</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.135</Q>
-        <I unit="Intensity | 1/cm">1.91252</I>
-        <Idev unit="Intensity | 1/cm">0.0443163</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.137</Q>
-        <I unit="Intensity | 1/cm">1.80405</I>
-        <Idev unit="Intensity | 1/cm">0.043466</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.139</Q>
-        <I unit="Intensity | 1/cm">1.72166</I>
-        <Idev unit="Intensity | 1/cm">0.0429246</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.141</Q>
-        <I unit="Intensity | 1/cm">1.67199</I>
-        <Idev unit="Intensity | 1/cm">0.042469</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.143</Q>
-        <I unit="Intensity | 1/cm">1.63282</I>
-        <Idev unit="Intensity | 1/cm">0.0430074</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.145</Q>
-        <I unit="Intensity | 1/cm">1.63712</I>
-        <Idev unit="Intensity | 1/cm">0.0438557</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.147</Q>
-        <I unit="Intensity | 1/cm">1.5862</I>
-        <Idev unit="Intensity | 1/cm">0.0434135</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.149</Q>
-        <I unit="Intensity | 1/cm">1.56121</I>
-        <Idev unit="Intensity | 1/cm">0.0432591</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.151</Q>
-        <I unit="Intensity | 1/cm">1.49764</I>
-        <Idev unit="Intensity | 1/cm">0.0426577</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.153</Q>
-        <I unit="Intensity | 1/cm">1.53828</I>
-        <Idev unit="Intensity | 1/cm">0.0446481</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.155</Q>
-        <I unit="Intensity | 1/cm">1.47366</I>
-        <Idev unit="Intensity | 1/cm">0.0441973</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.157</Q>
-        <I unit="Intensity | 1/cm">1.40582</I>
-        <Idev unit="Intensity | 1/cm">0.0430461</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.159</Q>
-        <I unit="Intensity | 1/cm">1.40491</I>
-        <Idev unit="Intensity | 1/cm">0.0439883</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.161</Q>
-        <I unit="Intensity | 1/cm">1.34639</I>
-        <Idev unit="Intensity | 1/cm">0.044193</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.163</Q>
-        <I unit="Intensity | 1/cm">1.32238</I>
-        <Idev unit="Intensity | 1/cm">0.0438008</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.165</Q>
-        <I unit="Intensity | 1/cm">1.33885</I>
-        <Idev unit="Intensity | 1/cm">0.0445383</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.167</Q>
-        <I unit="Intensity | 1/cm">1.29608</I>
-        <Idev unit="Intensity | 1/cm">0.0451575</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.169</Q>
-        <I unit="Intensity | 1/cm">1.30562</I>
-        <Idev unit="Intensity | 1/cm">0.0460656</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.171</Q>
-        <I unit="Intensity | 1/cm">1.17147</I>
-        <Idev unit="Intensity | 1/cm">0.0435717</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.173</Q>
-        <I unit="Intensity | 1/cm">1.18565</I>
-        <Idev unit="Intensity | 1/cm">0.0449072</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.175</Q>
-        <I unit="Intensity | 1/cm">1.18944</I>
-        <Idev unit="Intensity | 1/cm">0.0465319</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.177</Q>
-        <I unit="Intensity | 1/cm">1.17055</I>
-        <Idev unit="Intensity | 1/cm">0.0456562</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.179</Q>
-        <I unit="Intensity | 1/cm">1.08571</I>
-        <Idev unit="Intensity | 1/cm">0.0453852</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.181</Q>
-        <I unit="Intensity | 1/cm">1.06208</I>
-        <Idev unit="Intensity | 1/cm">0.0463335</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.183</Q>
-        <I unit="Intensity | 1/cm">1.06187</I>
-        <Idev unit="Intensity | 1/cm">0.0458284</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.185</Q>
-        <I unit="Intensity | 1/cm">1.02727</I>
-        <Idev unit="Intensity | 1/cm">0.0472613</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.187</Q>
-        <I unit="Intensity | 1/cm">0.995169</I>
-        <Idev unit="Intensity | 1/cm">0.0465526</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.189</Q>
-        <I unit="Intensity | 1/cm">1.02569</I>
-        <Idev unit="Intensity | 1/cm">0.0483728</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.191</Q>
-        <I unit="Intensity | 1/cm">0.981154</I>
-        <Idev unit="Intensity | 1/cm">0.0490559</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.193</Q>
-        <I unit="Intensity | 1/cm">1.01831</I>
-        <Idev unit="Intensity | 1/cm">0.0502348</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.195</Q>
-        <I unit="Intensity | 1/cm">0.968102</I>
-        <Idev unit="Intensity | 1/cm">0.0504426</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.197</Q>
-        <I unit="Intensity | 1/cm">0.940656</I>
-        <Idev unit="Intensity | 1/cm">0.0512734</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.199</Q>
-        <I unit="Intensity | 1/cm">1.05762</I>
-        <Idev unit="Intensity | 1/cm">0.0547469</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.201</Q>
-        <I unit="Intensity | 1/cm">0.949872</I>
-        <Idev unit="Intensity | 1/cm">0.055229</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.203</Q>
-        <I unit="Intensity | 1/cm">0.891716</I>
-        <Idev unit="Intensity | 1/cm">0.0531346</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.205</Q>
-        <I unit="Intensity | 1/cm">0.876084</I>
-        <Idev unit="Intensity | 1/cm">0.0548681</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.207</Q>
-        <I unit="Intensity | 1/cm">0.932101</I>
-        <Idev unit="Intensity | 1/cm">0.0576812</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.209</Q>
-        <I unit="Intensity | 1/cm">0.927755</I>
-        <Idev unit="Intensity | 1/cm">0.0593404</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.211</Q>
-        <I unit="Intensity | 1/cm">0.87669</I>
-        <Idev unit="Intensity | 1/cm">0.0600369</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.213</Q>
-        <I unit="Intensity | 1/cm">0.809125</I>
-        <Idev unit="Intensity | 1/cm">0.0588107</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.215</Q>
-        <I unit="Intensity | 1/cm">0.941202</I>
-        <Idev unit="Intensity | 1/cm">0.0659121</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.217</Q>
-        <I unit="Intensity | 1/cm">0.946175</I>
-        <Idev unit="Intensity | 1/cm">0.0690784</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.219</Q>
-        <I unit="Intensity | 1/cm">0.859875</I>
-        <Idev unit="Intensity | 1/cm">0.0674435</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.221</Q>
-        <I unit="Intensity | 1/cm">0.959508</I>
-        <Idev unit="Intensity | 1/cm">0.0718856</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.223</Q>
-        <I unit="Intensity | 1/cm">0.763222</I>
-        <Idev unit="Intensity | 1/cm">0.0702866</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.225</Q>
-        <I unit="Intensity | 1/cm">0.785467</I>
-        <Idev unit="Intensity | 1/cm">0.0742144</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.227</Q>
-        <I unit="Intensity | 1/cm">0.81876</I>
-        <Idev unit="Intensity | 1/cm">0.074266</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.229</Q>
-        <I unit="Intensity | 1/cm">0.678311</I>
-        <Idev unit="Intensity | 1/cm">0.0722578</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.231</Q>
-        <I unit="Intensity | 1/cm">0.761442</I>
-        <Idev unit="Intensity | 1/cm">0.0814516</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.233</Q>
-        <I unit="Intensity | 1/cm">0.757076</I>
-        <Idev unit="Intensity | 1/cm">0.0825262</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.235</Q>
-        <I unit="Intensity | 1/cm">0.600636</I>
-        <Idev unit="Intensity | 1/cm">0.075041</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.237</Q>
-        <I unit="Intensity | 1/cm">0.685635</I>
-        <Idev unit="Intensity | 1/cm">0.0842392</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.239</Q>
-        <I unit="Intensity | 1/cm">0.799186</I>
-        <Idev unit="Intensity | 1/cm">0.0974365</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.241</Q>
-        <I unit="Intensity | 1/cm">0.737526</I>
-        <Idev unit="Intensity | 1/cm">0.0957286</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.243</Q>
-        <I unit="Intensity | 1/cm">0.716415</I>
-        <Idev unit="Intensity | 1/cm">0.0970448</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.245</Q>
-        <I unit="Intensity | 1/cm">0.720413</I>
-        <Idev unit="Intensity | 1/cm">0.0981996</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.247</Q>
-        <I unit="Intensity | 1/cm">0.604059</I>
-        <Idev unit="Intensity | 1/cm">0.100869</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.249</Q>
-        <I unit="Intensity | 1/cm">0.649073</I>
-        <Idev unit="Intensity | 1/cm">0.109281</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.251</Q>
-        <I unit="Intensity | 1/cm">0.700691</I>
-        <Idev unit="Intensity | 1/cm">0.114325</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.253</Q>
-        <I unit="Intensity | 1/cm">0.586789</I>
-        <Idev unit="Intensity | 1/cm">0.108324</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.255</Q>
-        <I unit="Intensity | 1/cm">0.765838</I>
-        <Idev unit="Intensity | 1/cm">0.139579</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.257</Q>
-        <I unit="Intensity | 1/cm">0.828968</I>
-        <Idev unit="Intensity | 1/cm">0.156723</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.259</Q>
-        <I unit="Intensity | 1/cm">0.616499</I>
-        <Idev unit="Intensity | 1/cm">0.137866</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.261</Q>
-        <I unit="Intensity | 1/cm">0.526011</I>
-        <Idev unit="Intensity | 1/cm">0.126209</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.263</Q>
-        <I unit="Intensity | 1/cm">0.51277</I>
-        <Idev unit="Intensity | 1/cm">0.126339</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.265</Q>
-        <I unit="Intensity | 1/cm">0.604189</I>
-        <Idev unit="Intensity | 1/cm">0.166393</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.267</Q>
-        <I unit="Intensity | 1/cm">0.738765</I>
-        <Idev unit="Intensity | 1/cm">0.194006</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.269</Q>
-        <I unit="Intensity | 1/cm">0.462803</I>
-        <Idev unit="Intensity | 1/cm">0.155354</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.271</Q>
-        <I unit="Intensity | 1/cm">0.478694</I>
-        <Idev unit="Intensity | 1/cm">0.171676</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.273</Q>
-        <I unit="Intensity | 1/cm">0.711983</I>
-        <Idev unit="Intensity | 1/cm">0.255539</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.275</Q>
-        <I unit="Intensity | 1/cm">0.473304</I>
-        <Idev unit="Intensity | 1/cm">0.230752</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.277</Q>
-        <I unit="Intensity | 1/cm">0.536817</I>
-        <Idev unit="Intensity | 1/cm">0.262627</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.279</Q>
-        <I unit="Intensity | 1/cm">0.660654</I>
-        <Idev unit="Intensity | 1/cm">0.297519</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.281</Q>
-        <I unit="Intensity | 1/cm">0.408902</I>
-        <Idev unit="Intensity | 1/cm">0.24585</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.283</Q>
-        <I unit="Intensity | 1/cm">0.0</I>
-        <Idev unit="Intensity | 1/cm">0.0</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-    </SASdata>
-    <SASsample name="">
-      <ID>TK49 c10_SANS</ID>
-    </SASsample>
-    <SASinstrument>
-      <name>LOQ</name>
-      <SASsource>
-        <radiation>neutron</radiation>
-      </SASsource>
-      <SAScollimation/>
-      <SASdetector>
-        <name>HAB</name>
-        <SDD unit="mm">575.0</SDD>
-      </SASdetector>
-      <SASdetector>
-        <name>main-detector-bank</name>
-        <SDD unit="mm">4145.02</SDD>
-      </SASdetector>
-    </SASinstrument>
-    <SASprocess>
-      <name>Mantid generated CanSAS1D XML</name>
-      <date>02-Aug-2013 16:54:14</date>
-      <description></description>
-      <term unit="" name="svn">2.5.3</term>
-      <term unit="" name="user_file">K:/masks/MASKLOQ_MAN_132E_Lu_Banjo_12mm.txt</term>
-      <SASprocessnote></SASprocessnote>
-    </SASprocess>
-    <SASnote></SASnote>
-  </SASentry>
-</SASroot>
Index: st/sasdataloader/test/isis_1_1_write_test.xml
===================================================================
--- test/sasdataloader/test/isis_1_1_write_test.xml	(revision c155a16ca3fb1da7057f151c62510d780700b9e8)
+++ 	(revision )
@@ -1,865 +1,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<?xml-stylesheet type="text/xsl" href="cansas1d.xsl" ?>
-<SASroot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:cansas1d:1.1" version="1.1" xsi:schemaLocation="urn:cansas1d:1.1 http://www.cansas.org/formats/1.1/cansas1d.xsd">
-  <SASentry>
-    <Title>TK49 c10_SANS</Title>
-    <Run>79680</Run>
-    <SASdata>
-      <Idata>
-        <Q unit="Q | 1/A">0.009</Q>
-        <I unit="Intensity | 1/cm">85.3333</I>
-        <Idev unit="Intensity | 1/cm">0.852491</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.011</Q>
-        <I unit="Intensity | 1/cm">72.5398</I>
-        <Idev unit="Intensity | 1/cm">0.639548</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.013</Q>
-        <I unit="Intensity | 1/cm">63.3582</I>
-        <Idev unit="Intensity | 1/cm">0.494127</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.015</Q>
-        <I unit="Intensity | 1/cm">57.0952</I>
-        <Idev unit="Intensity | 1/cm">0.414116</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.017</Q>
-        <I unit="Intensity | 1/cm">51.0139</I>
-        <Idev unit="Intensity | 1/cm">0.35145</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.019</Q>
-        <I unit="Intensity | 1/cm">46.4746</I>
-        <Idev unit="Intensity | 1/cm">0.308755</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.021</Q>
-        <I unit="Intensity | 1/cm">41.7191</I>
-        <Idev unit="Intensity | 1/cm">0.271641</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.023</Q>
-        <I unit="Intensity | 1/cm">37.4208</I>
-        <Idev unit="Intensity | 1/cm">0.244658</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.025</Q>
-        <I unit="Intensity | 1/cm">33.7352</I>
-        <Idev unit="Intensity | 1/cm">0.219594</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.027</Q>
-        <I unit="Intensity | 1/cm">30.6073</I>
-        <Idev unit="Intensity | 1/cm">0.203138</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.029</Q>
-        <I unit="Intensity | 1/cm">27.7309</I>
-        <Idev unit="Intensity | 1/cm">0.185859</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.031</Q>
-        <I unit="Intensity | 1/cm">25.2579</I>
-        <Idev unit="Intensity | 1/cm">0.171356</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.033</Q>
-        <I unit="Intensity | 1/cm">22.7712</I>
-        <Idev unit="Intensity | 1/cm">0.159062</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.035</Q>
-        <I unit="Intensity | 1/cm">20.5323</I>
-        <Idev unit="Intensity | 1/cm">0.146135</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.037</Q>
-        <I unit="Intensity | 1/cm">19.0744</I>
-        <Idev unit="Intensity | 1/cm">0.136393</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.039</Q>
-        <I unit="Intensity | 1/cm">17.2832</I>
-        <Idev unit="Intensity | 1/cm">0.127623</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.041</Q>
-        <I unit="Intensity | 1/cm">15.7399</I>
-        <Idev unit="Intensity | 1/cm">0.118288</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.043</Q>
-        <I unit="Intensity | 1/cm">14.5598</I>
-        <Idev unit="Intensity | 1/cm">0.111759</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.045</Q>
-        <I unit="Intensity | 1/cm">13.5906</I>
-        <Idev unit="Intensity | 1/cm">0.105148</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.047</Q>
-        <I unit="Intensity | 1/cm">12.6707</I>
-        <Idev unit="Intensity | 1/cm">0.0996579</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.049</Q>
-        <I unit="Intensity | 1/cm">11.5247</I>
-        <Idev unit="Intensity | 1/cm">0.0929646</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.051</Q>
-        <I unit="Intensity | 1/cm">10.7089</I>
-        <Idev unit="Intensity | 1/cm">0.0888575</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.053</Q>
-        <I unit="Intensity | 1/cm">10.1436</I>
-        <Idev unit="Intensity | 1/cm">0.0849394</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.055</Q>
-        <I unit="Intensity | 1/cm">9.49446</I>
-        <Idev unit="Intensity | 1/cm">0.0811205</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.057</Q>
-        <I unit="Intensity | 1/cm">8.80775</I>
-        <Idev unit="Intensity | 1/cm">0.0773967</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.059</Q>
-        <I unit="Intensity | 1/cm">8.33366</I>
-        <Idev unit="Intensity | 1/cm">0.0748147</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.061</Q>
-        <I unit="Intensity | 1/cm">7.79157</I>
-        <Idev unit="Intensity | 1/cm">0.0720107</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.063</Q>
-        <I unit="Intensity | 1/cm">7.25902</I>
-        <Idev unit="Intensity | 1/cm">0.0693582</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.065</Q>
-        <I unit="Intensity | 1/cm">7.04789</I>
-        <Idev unit="Intensity | 1/cm">0.0677591</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.067</Q>
-        <I unit="Intensity | 1/cm">6.53311</I>
-        <Idev unit="Intensity | 1/cm">0.0652207</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.069</Q>
-        <I unit="Intensity | 1/cm">6.2453</I>
-        <Idev unit="Intensity | 1/cm">0.0642016</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.071</Q>
-        <I unit="Intensity | 1/cm">5.94152</I>
-        <Idev unit="Intensity | 1/cm">0.0625768</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.073</Q>
-        <I unit="Intensity | 1/cm">5.70816</I>
-        <Idev unit="Intensity | 1/cm">0.0612955</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.075</Q>
-        <I unit="Intensity | 1/cm">5.24449</I>
-        <Idev unit="Intensity | 1/cm">0.060141</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.077</Q>
-        <I unit="Intensity | 1/cm">5.08291</I>
-        <Idev unit="Intensity | 1/cm">0.0582239</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.079</Q>
-        <I unit="Intensity | 1/cm">4.88135</I>
-        <Idev unit="Intensity | 1/cm">0.057969</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.081</Q>
-        <I unit="Intensity | 1/cm">4.60942</I>
-        <Idev unit="Intensity | 1/cm">0.056813</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.083</Q>
-        <I unit="Intensity | 1/cm">4.46606</I>
-        <Idev unit="Intensity | 1/cm">0.0569381</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.085</Q>
-        <I unit="Intensity | 1/cm">4.32473</I>
-        <Idev unit="Intensity | 1/cm">0.0558766</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.087</Q>
-        <I unit="Intensity | 1/cm">4.14144</I>
-        <Idev unit="Intensity | 1/cm">0.0552525</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.089</Q>
-        <I unit="Intensity | 1/cm">3.86504</I>
-        <Idev unit="Intensity | 1/cm">0.0544569</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.091</Q>
-        <I unit="Intensity | 1/cm">3.74272</I>
-        <Idev unit="Intensity | 1/cm">0.0529596</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.093</Q>
-        <I unit="Intensity | 1/cm">3.68281</I>
-        <Idev unit="Intensity | 1/cm">0.052891</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.095</Q>
-        <I unit="Intensity | 1/cm">3.46991</I>
-        <Idev unit="Intensity | 1/cm">0.0517565</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.097</Q>
-        <I unit="Intensity | 1/cm">3.37244</I>
-        <Idev unit="Intensity | 1/cm">0.0509328</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.099</Q>
-        <I unit="Intensity | 1/cm">3.27074</I>
-        <Idev unit="Intensity | 1/cm">0.0505183</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.101</Q>
-        <I unit="Intensity | 1/cm">3.13326</I>
-        <Idev unit="Intensity | 1/cm">0.0490847</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.103</Q>
-        <I unit="Intensity | 1/cm">3.01387</I>
-        <Idev unit="Intensity | 1/cm">0.0487012</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.105</Q>
-        <I unit="Intensity | 1/cm">2.87628</I>
-        <Idev unit="Intensity | 1/cm">0.0484307</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.107</Q>
-        <I unit="Intensity | 1/cm">2.85043</I>
-        <Idev unit="Intensity | 1/cm">0.0476786</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.109</Q>
-        <I unit="Intensity | 1/cm">2.72799</I>
-        <Idev unit="Intensity | 1/cm">0.0475526</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.111</Q>
-        <I unit="Intensity | 1/cm">2.61206</I>
-        <Idev unit="Intensity | 1/cm">0.0467475</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.113</Q>
-        <I unit="Intensity | 1/cm">2.58895</I>
-        <Idev unit="Intensity | 1/cm">0.0469767</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.115</Q>
-        <I unit="Intensity | 1/cm">2.45987</I>
-        <Idev unit="Intensity | 1/cm">0.0460139</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.117</Q>
-        <I unit="Intensity | 1/cm">2.37723</I>
-        <Idev unit="Intensity | 1/cm">0.045272</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.119</Q>
-        <I unit="Intensity | 1/cm">2.34122</I>
-        <Idev unit="Intensity | 1/cm">0.0453741</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.121</Q>
-        <I unit="Intensity | 1/cm">2.21745</I>
-        <Idev unit="Intensity | 1/cm">0.0444485</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.123</Q>
-        <I unit="Intensity | 1/cm">2.12646</I>
-        <Idev unit="Intensity | 1/cm">0.0438385</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.125</Q>
-        <I unit="Intensity | 1/cm">2.11264</I>
-        <Idev unit="Intensity | 1/cm">0.0441662</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.127</Q>
-        <I unit="Intensity | 1/cm">2.07523</I>
-        <Idev unit="Intensity | 1/cm">0.0438979</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.129</Q>
-        <I unit="Intensity | 1/cm">2.03548</I>
-        <Idev unit="Intensity | 1/cm">0.0442422</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.131</Q>
-        <I unit="Intensity | 1/cm">1.92452</I>
-        <Idev unit="Intensity | 1/cm">0.0435959</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.133</Q>
-        <I unit="Intensity | 1/cm">1.90866</I>
-        <Idev unit="Intensity | 1/cm">0.0437401</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.135</Q>
-        <I unit="Intensity | 1/cm">1.91252</I>
-        <Idev unit="Intensity | 1/cm">0.0443163</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.137</Q>
-        <I unit="Intensity | 1/cm">1.80405</I>
-        <Idev unit="Intensity | 1/cm">0.043466</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.139</Q>
-        <I unit="Intensity | 1/cm">1.72166</I>
-        <Idev unit="Intensity | 1/cm">0.0429246</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.141</Q>
-        <I unit="Intensity | 1/cm">1.67199</I>
-        <Idev unit="Intensity | 1/cm">0.042469</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.143</Q>
-        <I unit="Intensity | 1/cm">1.63282</I>
-        <Idev unit="Intensity | 1/cm">0.0430074</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.145</Q>
-        <I unit="Intensity | 1/cm">1.63712</I>
-        <Idev unit="Intensity | 1/cm">0.0438557</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.147</Q>
-        <I unit="Intensity | 1/cm">1.5862</I>
-        <Idev unit="Intensity | 1/cm">0.0434135</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.149</Q>
-        <I unit="Intensity | 1/cm">1.56121</I>
-        <Idev unit="Intensity | 1/cm">0.0432591</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.151</Q>
-        <I unit="Intensity | 1/cm">1.49764</I>
-        <Idev unit="Intensity | 1/cm">0.0426577</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.153</Q>
-        <I unit="Intensity | 1/cm">1.53828</I>
-        <Idev unit="Intensity | 1/cm">0.0446481</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.155</Q>
-        <I unit="Intensity | 1/cm">1.47366</I>
-        <Idev unit="Intensity | 1/cm">0.0441973</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.157</Q>
-        <I unit="Intensity | 1/cm">1.40582</I>
-        <Idev unit="Intensity | 1/cm">0.0430461</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.159</Q>
-        <I unit="Intensity | 1/cm">1.40491</I>
-        <Idev unit="Intensity | 1/cm">0.0439883</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.161</Q>
-        <I unit="Intensity | 1/cm">1.34639</I>
-        <Idev unit="Intensity | 1/cm">0.044193</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.163</Q>
-        <I unit="Intensity | 1/cm">1.32238</I>
-        <Idev unit="Intensity | 1/cm">0.0438008</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.165</Q>
-        <I unit="Intensity | 1/cm">1.33885</I>
-        <Idev unit="Intensity | 1/cm">0.0445383</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.167</Q>
-        <I unit="Intensity | 1/cm">1.29608</I>
-        <Idev unit="Intensity | 1/cm">0.0451575</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.169</Q>
-        <I unit="Intensity | 1/cm">1.30562</I>
-        <Idev unit="Intensity | 1/cm">0.0460656</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.171</Q>
-        <I unit="Intensity | 1/cm">1.17147</I>
-        <Idev unit="Intensity | 1/cm">0.0435717</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.173</Q>
-        <I unit="Intensity | 1/cm">1.18565</I>
-        <Idev unit="Intensity | 1/cm">0.0449072</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.175</Q>
-        <I unit="Intensity | 1/cm">1.18944</I>
-        <Idev unit="Intensity | 1/cm">0.0465319</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.177</Q>
-        <I unit="Intensity | 1/cm">1.17055</I>
-        <Idev unit="Intensity | 1/cm">0.0456562</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.179</Q>
-        <I unit="Intensity | 1/cm">1.08571</I>
-        <Idev unit="Intensity | 1/cm">0.0453852</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.181</Q>
-        <I unit="Intensity | 1/cm">1.06208</I>
-        <Idev unit="Intensity | 1/cm">0.0463335</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.183</Q>
-        <I unit="Intensity | 1/cm">1.06187</I>
-        <Idev unit="Intensity | 1/cm">0.0458284</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.185</Q>
-        <I unit="Intensity | 1/cm">1.02727</I>
-        <Idev unit="Intensity | 1/cm">0.0472613</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.187</Q>
-        <I unit="Intensity | 1/cm">0.995169</I>
-        <Idev unit="Intensity | 1/cm">0.0465526</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.189</Q>
-        <I unit="Intensity | 1/cm">1.02569</I>
-        <Idev unit="Intensity | 1/cm">0.0483728</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.191</Q>
-        <I unit="Intensity | 1/cm">0.981154</I>
-        <Idev unit="Intensity | 1/cm">0.0490559</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.193</Q>
-        <I unit="Intensity | 1/cm">1.01831</I>
-        <Idev unit="Intensity | 1/cm">0.0502348</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.195</Q>
-        <I unit="Intensity | 1/cm">0.968102</I>
-        <Idev unit="Intensity | 1/cm">0.0504426</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.197</Q>
-        <I unit="Intensity | 1/cm">0.940656</I>
-        <Idev unit="Intensity | 1/cm">0.0512734</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.199</Q>
-        <I unit="Intensity | 1/cm">1.05762</I>
-        <Idev unit="Intensity | 1/cm">0.0547469</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.201</Q>
-        <I unit="Intensity | 1/cm">0.949872</I>
-        <Idev unit="Intensity | 1/cm">0.055229</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.203</Q>
-        <I unit="Intensity | 1/cm">0.891716</I>
-        <Idev unit="Intensity | 1/cm">0.0531346</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.205</Q>
-        <I unit="Intensity | 1/cm">0.876084</I>
-        <Idev unit="Intensity | 1/cm">0.0548681</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.207</Q>
-        <I unit="Intensity | 1/cm">0.932101</I>
-        <Idev unit="Intensity | 1/cm">0.0576812</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.209</Q>
-        <I unit="Intensity | 1/cm">0.927755</I>
-        <Idev unit="Intensity | 1/cm">0.0593404</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.211</Q>
-        <I unit="Intensity | 1/cm">0.87669</I>
-        <Idev unit="Intensity | 1/cm">0.0600369</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.213</Q>
-        <I unit="Intensity | 1/cm">0.809125</I>
-        <Idev unit="Intensity | 1/cm">0.0588107</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.215</Q>
-        <I unit="Intensity | 1/cm">0.941202</I>
-        <Idev unit="Intensity | 1/cm">0.0659121</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.217</Q>
-        <I unit="Intensity | 1/cm">0.946175</I>
-        <Idev unit="Intensity | 1/cm">0.0690784</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.219</Q>
-        <I unit="Intensity | 1/cm">0.859875</I>
-        <Idev unit="Intensity | 1/cm">0.0674435</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.221</Q>
-        <I unit="Intensity | 1/cm">0.959508</I>
-        <Idev unit="Intensity | 1/cm">0.0718856</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.223</Q>
-        <I unit="Intensity | 1/cm">0.763222</I>
-        <Idev unit="Intensity | 1/cm">0.0702866</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.225</Q>
-        <I unit="Intensity | 1/cm">0.785467</I>
-        <Idev unit="Intensity | 1/cm">0.0742144</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.227</Q>
-        <I unit="Intensity | 1/cm">0.81876</I>
-        <Idev unit="Intensity | 1/cm">0.074266</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.229</Q>
-        <I unit="Intensity | 1/cm">0.678311</I>
-        <Idev unit="Intensity | 1/cm">0.0722578</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.231</Q>
-        <I unit="Intensity | 1/cm">0.761442</I>
-        <Idev unit="Intensity | 1/cm">0.0814516</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.233</Q>
-        <I unit="Intensity | 1/cm">0.757076</I>
-        <Idev unit="Intensity | 1/cm">0.0825262</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.235</Q>
-        <I unit="Intensity | 1/cm">0.600636</I>
-        <Idev unit="Intensity | 1/cm">0.075041</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.237</Q>
-        <I unit="Intensity | 1/cm">0.685635</I>
-        <Idev unit="Intensity | 1/cm">0.0842392</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.239</Q>
-        <I unit="Intensity | 1/cm">0.799186</I>
-        <Idev unit="Intensity | 1/cm">0.0974365</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.241</Q>
-        <I unit="Intensity | 1/cm">0.737526</I>
-        <Idev unit="Intensity | 1/cm">0.0957286</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.243</Q>
-        <I unit="Intensity | 1/cm">0.716415</I>
-        <Idev unit="Intensity | 1/cm">0.0970448</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.245</Q>
-        <I unit="Intensity | 1/cm">0.720413</I>
-        <Idev unit="Intensity | 1/cm">0.0981996</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.247</Q>
-        <I unit="Intensity | 1/cm">0.604059</I>
-        <Idev unit="Intensity | 1/cm">0.100869</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.249</Q>
-        <I unit="Intensity | 1/cm">0.649073</I>
-        <Idev unit="Intensity | 1/cm">0.109281</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.251</Q>
-        <I unit="Intensity | 1/cm">0.700691</I>
-        <Idev unit="Intensity | 1/cm">0.114325</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.253</Q>
-        <I unit="Intensity | 1/cm">0.586789</I>
-        <Idev unit="Intensity | 1/cm">0.108324</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.255</Q>
-        <I unit="Intensity | 1/cm">0.765838</I>
-        <Idev unit="Intensity | 1/cm">0.139579</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.257</Q>
-        <I unit="Intensity | 1/cm">0.828968</I>
-        <Idev unit="Intensity | 1/cm">0.156723</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.259</Q>
-        <I unit="Intensity | 1/cm">0.616499</I>
-        <Idev unit="Intensity | 1/cm">0.137866</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.261</Q>
-        <I unit="Intensity | 1/cm">0.526011</I>
-        <Idev unit="Intensity | 1/cm">0.126209</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.263</Q>
-        <I unit="Intensity | 1/cm">0.51277</I>
-        <Idev unit="Intensity | 1/cm">0.126339</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.265</Q>
-        <I unit="Intensity | 1/cm">0.604189</I>
-        <Idev unit="Intensity | 1/cm">0.166393</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.267</Q>
-        <I unit="Intensity | 1/cm">0.738765</I>
-        <Idev unit="Intensity | 1/cm">0.194006</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.269</Q>
-        <I unit="Intensity | 1/cm">0.462803</I>
-        <Idev unit="Intensity | 1/cm">0.155354</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.271</Q>
-        <I unit="Intensity | 1/cm">0.478694</I>
-        <Idev unit="Intensity | 1/cm">0.171676</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.273</Q>
-        <I unit="Intensity | 1/cm">0.711983</I>
-        <Idev unit="Intensity | 1/cm">0.255539</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.275</Q>
-        <I unit="Intensity | 1/cm">0.473304</I>
-        <Idev unit="Intensity | 1/cm">0.230752</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.277</Q>
-        <I unit="Intensity | 1/cm">0.536817</I>
-        <Idev unit="Intensity | 1/cm">0.262627</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.279</Q>
-        <I unit="Intensity | 1/cm">0.660654</I>
-        <Idev unit="Intensity | 1/cm">0.297519</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.281</Q>
-        <I unit="Intensity | 1/cm">0.408902</I>
-        <Idev unit="Intensity | 1/cm">0.24585</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.283</Q>
-        <I unit="Intensity | 1/cm">0.0</I>
-        <Idev unit="Intensity | 1/cm">0.0</Idev>
-        <Qdev unit="Q | 1/A">0.0</Qdev>
-      </Idata>
-    </SASdata>
-    <SASsample name="">
-      <ID>TK49 c10_SANS</ID>
-    </SASsample>
-    <SASinstrument>
-      <name>LOQ</name>
-      <SASsource>
-        <radiation>neutron</radiation>
-      </SASsource>
-      <SAScollimation/>
-      <SASdetector>
-        <name>HAB</name>
-        <SDD unit="mm">575.0</SDD>
-      </SASdetector>
-      <SASdetector>
-        <name>main-detector-bank</name>
-        <SDD unit="mm">4145.02</SDD>
-      </SASdetector>
-    </SASinstrument>
-    <SASprocess>
-      <name>Mantid generated CanSAS1D XML</name>
-      <date>02-Aug-2013 16:53:56</date>
-      <description></description>
-      <term unit="" name="svn">2.5.3</term>
-      <term unit="" name="user_file">K:/masks/MASKLOQ_MAN_132E_Lu_Banjo_12mm.txt</term>
-      <SASprocessnote></SASprocessnote>
-    </SASprocess>
-    <SASnote></SASnote>
-  </SASentry>
-</SASroot>
Index: test/sasdataloader/test/sequence_tests.py
===================================================================
--- test/sasdataloader/test/sequence_tests.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ test/sasdataloader/test/sequence_tests.py	(revision aaf5e497ff1af2aa7b8b3d361ab951e2a0ca7c93)
@@ -1,2 +1,4 @@
+from __future__ import print_function
+
 from DataLoader.loader import Loader
 from DataLoader.readers.IgorReader import Reader as igor_reader
@@ -8,5 +10,5 @@
     out2 = Loader().load("MAR07232_rest.ASC")
     if len(out2.detector)>1:
-        print "Consecutive reads using Loader failed"
+        print("Consecutive reads using Loader failed")
 
 def consecutive_reader():
@@ -14,7 +16,7 @@
     out2 = igor_reader().read("MAR07232_rest.ASC")
     if len(out2.detector)>1:
-        print "Consecutive reads using Readers failed"
-        print out1
-        print out2
+        print("Consecutive reads using Readers failed")
+        print(out1)
+        print(out2)
 
 def single_abs():
@@ -29,3 +31,3 @@
     single_igor()
     single_abs()
-    print "Test passed"
+    print("Test passed")
Index: test/sasdataloader/test/testplugings.py
===================================================================
--- test/sasdataloader/test/testplugings.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ test/sasdataloader/test/testplugings.py	(revision 17c943656cb7c598b2d5cf9530ed6227d88ae6f9)
@@ -3,4 +3,5 @@
 """
 
+import os
 import unittest
 from sas.sascalc.dataloader.loader import  Loader, Registry
@@ -41,7 +42,10 @@
         # Create module
         import zipfile
-        z = zipfile.PyZipFile("plugins.zip", 'w')
+        f_name = "plugins.zip"
+        z = zipfile.PyZipFile(f_name, 'w')
         z.writepy("../plugins", "")
         z.close()
+        if os.path.isfile(f_name):
+            os.remove(f_name)
         
     def testplugin_checksetup(self):
Index: test/sasdataloader/test/utest_abs_reader.py
===================================================================
--- test/sasdataloader/test/utest_abs_reader.py	(revision dd11014add466ed4ba0564fcf61e5880d53e6c8b)
+++ test/sasdataloader/test/utest_abs_reader.py	(revision c551bb3b1844a2c446021559f24b790187450d46)
@@ -2,4 +2,5 @@
     Unit tests for data manipulations
 """
+from __future__ import print_function
 
 import unittest
@@ -8,14 +9,20 @@
 from sas.sascalc.dataloader.loader import Loader
 from sas.sascalc.dataloader.readers.IgorReader import Reader as IgorReader
+from sas.sascalc.dataloader.readers.abs_reader import Reader as AbsReader
+from sas.sascalc.dataloader.readers.hfir1d_reader import Reader as HFIRReader
+from sas.sascalc.dataloader.readers.danse_reader import Reader as DANSEReader
+from sas.sascalc.dataloader.readers.cansas_reader import Reader as CANSASReader
+
 from sas.sascalc.dataloader.data_info import Data1D
  
 import os.path
 
+
 class abs_reader(unittest.TestCase):
     
     def setUp(self):
-        from sas.sascalc.dataloader.readers.abs_reader import Reader
-        self.data = Reader().read("jan08002.ABS")
-        
+        reader = AbsReader()
+        self.data = reader.read("jan08002.ABS")
+
     def test_abs_checkdata(self):
         """
@@ -61,10 +68,17 @@
     def test_checkdata2(self):
         self.assertEqual(self.data.dy[126], 1)
-        
+
+    def test_generic_loader(self):
+        # the generic loader should work as well
+        data = Loader().load("jan08002.ABS")
+        self.assertEqual(data.meta_data['loader'], "IGOR 1D")
+
+
 class hfir_reader(unittest.TestCase):
-    
+
     def setUp(self):
-        self.data = Loader().load("S2-30dq.d1d")
-        
+        reader = HFIRReader()
+        self.data = reader.read("S2-30dq.d1d")
+
     def test_hfir_checkdata(self):
         """
@@ -83,5 +97,10 @@
         self.assertEqual(self.data.dy[1], 0.000315)
         self.assertEqual(self.data.dx[1], 0.008249)
-        
+
+    def test_generic_loader(self):
+        # the generic loader should work as well
+        data = Loader().load("S2-30dq.d1d")
+        self.assertEqual(data.meta_data['loader'], "HFIR 1D")
+
 
 class igor_reader(unittest.TestCase):
@@ -137,5 +156,6 @@
     
     def setUp(self):
-        self.data = Loader().load("MP_New.sans")
+        reader = DANSEReader()
+        self.data = reader.read("MP_New.sans")
 
     def test_checkdata(self):
@@ -171,11 +191,22 @@
         self.assertEqual(self.data.err_data[2], 2.06313)
 
+    def test_generic_loader(self):
+        # the generic loader should work as well
+        data = Loader().load("MP_New.sans")
+        self.assertEqual(data.meta_data['loader'], "DANSE")
+
  
 class cansas_reader(unittest.TestCase):
     
     def setUp(self):
+        reader = CANSASReader()
+        data = reader.read("cansas1d.xml")
+        self.data = data[0]
+
+    def test_generic_loader(self):
+        # the generic loader should work as well
         data = Loader().load("cansas1d.xml")
-        self.data = data[0]
- 
+        self.assertEqual(data[0].meta_data['loader'], "CanSAS XML 1D")
+
     def test_cansas_checkdata(self):
         self.assertEqual(self.data.filename, "cansas1d.xml")
@@ -190,5 +221,4 @@
             tests won't pass
         """
-        
         self.assertEqual(self.data.run[0], "1234")
         self.assertEqual(self.data.meta_data['loader'], "CanSAS XML 1D")
@@ -264,15 +294,15 @@
             self.assertEqual(item.distance_unit,'mm')
 
-            if item.size.x==50 \
-                and item.distance==11000.0 \
-                and item.name=='source' \
-                and item.type=='radius':
+            if item.size.x == 50 \
+                and item.distance == 11000.0 \
+                and item.name == 'source' \
+                and item.type == 'radius':
                 _found1 = True
-            elif item.size.x==1.0 \
-                and item.name=='sample' \
-                and item.type=='radius':
+            elif item.size.x == 1.0 \
+                and item.name == 'sample' \
+                and item.type == 'radius':
                 _found2 = True
                 
-        if _found1==False or _found2==False:
+        if _found1 == False or _found2 == False:
             raise RuntimeError, "Could not find all data %s %s" % (_found1, _found2) 
             
@@ -309,28 +339,21 @@
             self.assertTrue(item.date in ['04-Sep-2007 18:35:02',
                                           '03-SEP-2006 11:42:47'])
-            print item.term
+            print(item.term)
             for t in item.term:
-                if t['name']=="ABS:DSTAND" \
-                    and t['unit']=='mm' \
-                    and float(t['value'])==1.0:
+                if (t['name'] == "ABS:DSTAND"
+                    and t['unit'] == 'mm'
+                    and float(t['value']) == 1.0):
                     _found_term2 = True
-                elif t['name']=="radialstep" \
-                    and t['unit']=='mm' \
-                    and float(t['value'])==10.0:
+                elif (t['name'] == "radialstep"
+                      and t['unit'] == 'mm'
+                      and float(t['value']) == 10.0):
                     _found_term1 = True
                     
-        if _found_term1==False or _found_term2==False:
-            raise RuntimeError, "Could not find all process terms %s %s" % (_found_term1, _found_term2) 
-            
-        
-        
+        if _found_term1 == False or _found_term2 == False:
+            raise RuntimeError, "Could not find all process terms %s %s" % (_found_term1, _found_term2)
         
     def test_writer(self):
-        from sas.sascalc.dataloader.readers.cansas_reader import Reader
-        r = Reader()
-        x = np.ones(5)
-        y = np.ones(5)
-        dy = np.ones(5)
-        
+        r = CANSASReader()
+
         filename = "write_test.xml"
         r.write(filename, self.data)
@@ -339,4 +362,6 @@
         self.assertEqual(self.data.filename, filename)
         self._checkdata()
+        if os.path.isfile(filename):
+            os.remove(filename)
         
     def test_units(self):
@@ -346,5 +371,5 @@
         """
         filename = "cansas1d_units.xml"
-        data = Loader().load(filename)
+        data = CANSASReader().read(filename)
         self.data = data[0]
         self.assertEqual(self.data.filename, filename)
@@ -357,5 +382,5 @@
         """
         filename = "cansas1d_badunits.xml"
-        data = Loader().load(filename)
+        data = CANSASReader().read(filename)
         self.data = data[0]
         self.assertEqual(self.data.filename, filename)
@@ -366,8 +391,7 @@
         
         self.assertEqual(self.data.meta_data['loader'], "CanSAS XML 1D")
-        print self.data.errors
+        print(self.data.errors)
         self.assertEqual(len(self.data.errors), 1)
-        
-        
+
     def test_slits(self):
         """
@@ -375,5 +399,5 @@
         """
         filename = "cansas1d_slit.xml"
-        data = Loader().load(filename)
+        data = CANSASReader().read(filename)
         self.data = data[0]
         self.assertEqual(self.data.filename, filename)
@@ -397,6 +421,5 @@
         self.assertEqual(self.data.run_name['1234'], 'run name')
         self.assertEqual(self.data.title, "Test title")
-        
-            
+
 
 if __name__ == '__main__':
Index: test/sasdataloader/test/utest_cansas.py
===================================================================
--- test/sasdataloader/test/utest_cansas.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ test/sasdataloader/test/utest_cansas.py	(revision 1fc50fb2f9e67f986acaa06fc7cbcba6b1edd00a)
@@ -46,5 +46,6 @@
         self.schema_1_0 = "cansas1d_v1_0.xsd"
         self.schema_1_1 = "cansas1d_v1_1.xsd"
-
+        self.write_1_0_filename = "isis_1_0_write_test.xml"
+        self.write_1_1_filename = "isis_1_1_write_test.xml"
 
     def get_number_of_entries(self, dictionary, name, i):
@@ -56,5 +57,4 @@
         return name
 
-
     def test_invalid_xml(self):
         """
@@ -62,6 +62,5 @@
         """
         invalid = StringIO.StringIO('<a><c></b></a>')
-        reader = XMLreader(invalid)
-
+        XMLreader(invalid)
 
     def test_xml_validate(self):
@@ -82,5 +81,4 @@
         self.assertFalse(xmlschema.validate(invalid))
 
-
     def test_real_xml(self):
         reader = XMLreader(self.xml_valid, self.schema_1_0)
@@ -90,5 +88,4 @@
         else:
             self.assertFalse(valid)
-
 
     def _check_data(self, data):
@@ -105,18 +102,13 @@
         self.assertTrue(data.meta_data["xmlpreprocess"] is not None)
 
-
     def _check_data_1_1(self, data):
         spectrum = data.trans_spectrum[0]
         self.assertTrue(len(spectrum.wavelength) == 138)
 
-
     def test_cansas_xml(self):
-        filename = "isis_1_1_write_test.xml"
         xmlreader = XMLreader(self.isis_1_1, self.schema_1_1)
         valid = xmlreader.validate_xml()
         xmlreader.set_processing_instructions()
         self.assertTrue(valid)
-        fo = open(self.isis_1_1)
-        str = fo.read()
         reader_generic = Loader()
         dataloader = reader_generic.load(self.isis_1_1)
@@ -128,12 +120,12 @@
             self._check_data(cansasreader[i])
             self._check_data_1_1(cansasreader[i])
-            reader_generic.save(filename, dataloader[i], None)
-            fo = open(filename)
-            str = fo.read()
+            reader_generic.save(self.write_1_1_filename, dataloader[i], None)
             reader2 = Loader()
-            return_data = reader2.load(filename)
+            self.assertTrue(os.path.isfile(self.write_1_1_filename))
+            return_data = reader2.load(self.write_1_1_filename)
             written_data = return_data[0]
             self._check_data(written_data)
-
+        if os.path.isfile(self.write_1_1_filename):
+            os.remove(self.write_1_1_filename)
 
     def test_double_trans_spectra(self):
@@ -144,5 +136,4 @@
         for item in data:
             self._check_data(item)
-
 
     def test_entry_name_recurse(self):
@@ -155,7 +146,5 @@
         self.assertTrue(len(d) == 6)
 
-
     def test_load_cansas_file(self):
-        valid = []
         reader1 = XMLreader(self.xml_valid, self.schema_1_0)
         self.assertTrue(reader1.validate_xml())
@@ -173,5 +162,4 @@
         self.assertFalse(reader7.validate_xml())
 
-
     def test_invalid_cansas(self):
         list = self.loader.load(self.cansas1d_notitle)
@@ -184,10 +172,9 @@
         self.assertTrue(data.detector[0].distance == 4150)
 
-
     def test_old_cansas_files(self):
         reader1 = XMLreader(self.cansas1d, self.schema_1_0)
         self.assertTrue(reader1.validate_xml())
         file_loader = Loader()
-        file1 = file_loader.load(self.cansas1d)
+        file_loader.load(self.cansas1d)
         reader2 = XMLreader(self.cansas1d_units, self.schema_1_0)
         self.assertTrue(reader2.validate_xml())
@@ -197,7 +184,5 @@
         self.assertTrue(reader4.validate_xml())
 
-
     def test_save_cansas_v1_0(self):
-        filename = "isis_1_0_write_test.xml"
         xmlreader = XMLreader(self.isis_1_0, self.schema_1_0)
         valid = xmlreader.validate_xml()
@@ -210,13 +195,15 @@
             self._check_data(dataloader[i])
             self._check_data(cansasreader[i])
-            reader_generic.save(filename, dataloader[i], None)
+            reader_generic.save(self.write_1_0_filename, dataloader[i], None)
             reader2 = Reader()
-            return_data = reader2.read(filename)
+            self.assertTrue(os.path.isfile(self.write_1_0_filename))
+            return_data = reader2.read(self.write_1_0_filename)
             written_data = return_data[0]
-            xmlwrite = XMLreader(filename, self.schema_1_0)
+            XMLreader(self.write_1_0_filename, self.schema_1_0)
             valid = xmlreader.validate_xml()
             self.assertTrue(valid)
             self._check_data(written_data)
-
+        if os.path.isfile(self.write_1_0_filename):
+            os.remove(self.write_1_0_filename)
 
     def test_processing_instructions(self):
@@ -224,5 +211,5 @@
         valid = reader.validate_xml()
         if valid:
-            ## find the processing instructions and make into a dictionary
+            # find the processing instructions and make into a dictionary
             dic = self.get_processing_instructions(reader)
             self.assertTrue(dic == {'xml-stylesheet': \
@@ -232,8 +219,7 @@
             xmldoc = minidom.parseString(xml)
 
-            ## take the processing instructions and put them back in
+            # take the processing instructions and put them back in
             xmldoc = self.set_processing_instructions(xmldoc, dic)
-            xml_output = xmldoc.toprettyxml()
-
+            xmldoc.toprettyxml()
 
     def set_processing_instructions(self, minidom_object, dic):
@@ -243,5 +229,4 @@
             minidom_object.insertBefore(pi, xmlroot)
         return minidom_object
-
 
     def get_processing_instructions(self, xml_reader_object):
Index: st/sasdataloader/test/write_test.xml
===================================================================
--- test/sasdataloader/test/write_test.xml	(revision c155a16ca3fb1da7057f151c62510d780700b9e8)
+++ 	(revision )
@@ -1,116 +1,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<SASroot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="cansas1d/1.0" version="1.0" xsi:schemaLocation="cansas1d/1.0 http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd">
-  <SASentry>
-    <Title>Test title</Title>
-    <Run name="run name">1234</Run>
-    <SASdata>
-      <Idata>
-        <Q unit="Q | 1/A">0.02</Q>
-        <I unit="Intensity | 1/cm">1000.0</I>
-        <Idev unit="Intensity | 1/cm">3.0</Idev>
-        <Qdev unit="Q | 1/A">0.01</Qdev>
-      </Idata>
-      <Idata>
-        <Q unit="Q | 1/A">0.03</Q>
-        <I unit="Intensity | 1/cm">1001.0</I>
-        <Idev unit="Intensity | 1/cm">4.0</Idev>
-        <Qdev unit="Q | 1/A">0.02</Qdev>
-      </Idata>
-    </SASdata>
-    <SASsample name="my sample">
-      <ID>SI600-new-long</ID>
-      <thickness unit="mm">1.03</thickness>
-      <transmission>0.327</transmission>
-      <temperature unit="C">0.0</temperature>
-      <position>
-        <x unit="mm">10.0</x>
-        <y unit="mm">0.0</y>
-      </position>
-      <orientation>
-        <roll unit="degree">22.5</roll>
-        <pitch unit="degree">0.02</pitch>
-      </orientation>
-      <details>http://chemtools.chem.soton.ac.uk/projects/blog/blogs.php/bit_id/2720</details>
-      <details>Some text here</details>
-    </SASsample>
-    <SASinstrument>
-      <name>canSAS instrument</name>
-      <SASsource>
-        <radiation>neutron</radiation>
-        <beam_size name="bm">
-          <x unit="mm">12.0</x>
-          <y unit="mm">13.0</y>
-        </beam_size>
-        <beam_shape>disc</beam_shape>
-        <wavelength unit="A">6.0</wavelength>
-        <wavelength_min unit="nm">0.22</wavelength_min>
-        <wavelength_max unit="nm">1.0</wavelength_max>
-        <wavelength_spread unit="percent">14.3</wavelength_spread>
-      </SASsource>
-      <SAScollimation name="test coll name">
-        <length unit="mm">123.0</length>
-        <aperture name="source" type="radius">
-          <size>
-            <x unit="mm">50.0</x>
-          </size>
-          <distance unit="mm">11000.0</distance>
-        </aperture>
-        <aperture name="sample" type="radius">
-          <size>
-            <x unit="mm">1.0</x>
-          </size>
-        </aperture>
-      </SAScollimation>
-      <SASdetector>
-        <name>fictional hybrid</name>
-        <SDD unit="mm">4150.0</SDD>
-        <offset>
-          <x unit="m">0.001</x>
-          <y unit="m">0.002</y>
-        </offset>
-        <orientation>
-          <roll unit="degree">1.0</roll>
-          <pitch unit="degree">0.0</pitch>
-          <yaw unit="degree">0.0</yaw>
-        </orientation>
-        <beam_center>
-          <x unit="mm">322.64</x>
-          <y unit="mm">327.68</y>
-        </beam_center>
-        <pixel_size>
-          <x unit="mm">5.0</x>
-          <y unit="mm">5.0</y>
-        </pixel_size>
-      </SASdetector>
-    </SASinstrument>
-    <SASprocess>
-      <name>spol</name>
-      <date>04-Sep-2007 18:35:02</date>
-      <description></description>
-      <term unit="mm" name="radialstep">10.000</term>
-      <term unit="degree" name="sector_width">180.0</term>
-      <term unit="degree" name="sector_orient">0.0</term>
-      <term unit="" name="MASK_file">USER:MASK.COM</term>
-      <SASprocessnote>AvA1 0.0000E+00 AsA2 1.0000E+00 XvA3 1.0526E+03 XsA4 5.2200E-02 XfA5 0.0000E+00</SASprocessnote>
-      <SASprocessnote>S... 13597 0 2.26E+02 2A 5mM 0%D2O Sbak 13594 0 1.13E+02 H2O Buffer</SASprocessnote>
-      <SASprocessnote>V... 13552 3 1.00E+00 H2O5m</SASprocessnote>
-    </SASprocess>
-    <SASprocess>
-      <name>NCNR-IGOR</name>
-      <date>03-SEP-2006 11:42:47</date>
-      <description></description>
-      <term unit="" name="average_type">Circular</term>
-      <term unit="" name="SAM_file">SEP06064.SA3_AJJ_L205</term>
-      <term unit="" name="BKD_file">SEP06064.SA3_AJJ_L205</term>
-      <term unit="" name="EMP_file">SEP06064.SA3_AJJ_L205</term>
-      <term unit="" name="DIV_file">SEP06064.SA3_AJJ_L205</term>
-      <term unit="" name="MASK_file">SEP06064.SA3_AJJ_L205</term>
-      <term unit="" name="ABS:TSTAND">1</term>
-      <term unit="mm" name="ABS:DSTAND">1</term>
-      <term unit="" name="ABS:IZERO">230.09</term>
-      <term unit="mm" name="ABS:XSECT">1</term>
-      <SASprocessnote>No Information</SASprocessnote>
-    </SASprocess>
-    <SASnote></SASnote>
-  </SASentry>
-</SASroot>
Index: test/sasrealspace/test/early_test.py
===================================================================
--- test/sasrealspace/test/early_test.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ test/sasrealspace/test/early_test.py	(revision aaf5e497ff1af2aa7b8b3d361ab951e2a0ca7c93)
@@ -1,2 +1,3 @@
+from __future__ import print_function
 
 import VolumeCanvas
@@ -30,16 +31,16 @@
         t_0 = time.time()
         value_1 = 1.0e8*canvas.getIq(0.1)
-        print "density = 0.1:  output=%g  time=%g" % (value_1, time.time()-t_0)
+        print("density = 0.1:  output=%g  time=%g" % (value_1, time.time()-t_0))
         
         t_0 = time.time()
         canvas.setParam('lores_density', 1)
         value_1 = 1.0e8*canvas.getIq(0.1)
-        print "density = 1000:  output=%g  time=%g" % (value_1, time.time()-t_0)
+        print("density = 1000:  output=%g  time=%g" % (value_1, time.time()-t_0))
         
         t_0 = time.time()
         canvas.setParam('lores_density', 0.01)
         value_1 = 1.0e8*canvas.getIq(0.1)
-        print "density = 0.00001:  output=%g  time=%g" % (value_1, time.time()-t_0)
-        print
+        print("density = 0.00001:  output=%g  time=%g" % (value_1, time.time()-t_0))
+        print()
     
     
@@ -63,5 +64,5 @@
         #ana_1 = form_factor(q, radius)
         
-        print "q=%g  sim=%g  ana=%g   ratio=%g" % (q, sim_1, ana_1, sim_1/ana_1)
+        print("q=%g  sim=%g  ana=%g   ratio=%g" % (q, sim_1, ana_1, sim_1/ana_1))
     
 def test_2():
@@ -73,5 +74,5 @@
     shell_vol = 4.0/3.0*math.pi*outer_radius*outer_radius*outer_radius - core_vol
     shell_sld = -1.0*core_vol/shell_vol
-    print "Shell SLD", shell_sld
+    print("Shell SLD", shell_sld)
 
     
@@ -126,5 +127,5 @@
         ana_1 = sphere.run(q)
         
-        print "q=%g  sim=%g  ana=%g   ratio=%g" % (q, sim_1, ana_1, sim_1/ana_1)
+        print("q=%g  sim=%g  ana=%g   ratio=%g" % (q, sim_1, ana_1, sim_1/ana_1))
         out.write( "%g  %g  %g\n" % (q, sim_1, ana_1))
 
@@ -168,5 +169,5 @@
         #ana_1 = form_factor(q, radius)
         
-        print "q=%g  sim=%g  ana=%g   ratio=%g" % (q, sim_1, ana_1, sim_1/ana_1)
+        print("q=%g  sim=%g  ana=%g   ratio=%g" % (q, sim_1, ana_1, sim_1/ana_1))
 
 def test_5():
@@ -193,5 +194,5 @@
     ana = ana.runXY([0.1, 0.1])
     sim = model.getIq2D(0.1, 0.1)
-    print ana, sim, sim/ana, ana/sim
+    print(ana, sim, sim/ana, ana/sim)
 
 def test_6():
@@ -232,5 +233,5 @@
     
     
-    print model.npts
+    print(model.npts)
     for i in range(40):
         qmax = 0.5
@@ -240,9 +241,9 @@
         anaY = ana.runXY([0, qmax*i/40.0])
         simY = model.getIq2D(0, qmax*i/40.0)
-        print anaX, simX, simX/anaX, '|', anaY, simY, simY/anaY
+        print(anaX, simX, simX/anaX, '|', anaY, simY, simY/anaY)
     
 def test_7():
     from sas.models.CoreShellModel import CoreShellModel
-    print "Testing core-shell"
+    print("Testing core-shell")
     radius = 15
     thickness = 5
@@ -287,5 +288,5 @@
         ana_val = ana.runXY([q, 0.2])
         sim_val, err = canvas.getIq2DError(q, 0.2)
-        print ana_val, sim_val, sim_val/ana_val, err, (sim_val-ana_val)/err
+        print(ana_val, sim_val, sim_val/ana_val, err, (sim_val-ana_val)/err)
     
     
Index: test/sasrealspace/test/sim_validation.py
===================================================================
--- test/sasrealspace/test/sim_validation.py	(revision ac07a3acc20dbf79c564bf642aece71a02c2c862)
+++ test/sasrealspace/test/sim_validation.py	(revision aaf5e497ff1af2aa7b8b3d361ab951e2a0ca7c93)
@@ -5,11 +5,13 @@
     @license: This software is provided as part of the DANSE project
 """
+from __future__ import print_function
+
 import math, time, pylab
 
 try:
     import VolumeCanvas
-    print "Testing local version"
+    print("Testing local version")
 except:
-    print "Testing installed version"
+    print("Testing installed version")
     import sas.sascalc.realspace.VolumeCanvas as VolumeCanvas
      
@@ -250,6 +252,6 @@
         ana = validator.run_ana(q)
         sim, err = validator.run_sim(q)
-        print "q=%-g  ana=%-g  sim=%-g  err=%-g  diff=%-g (%-g) %s" % (q, ana, sim, err, 
-                        (sim-ana), sim/ana, str(math.fabs(sim-ana)>err))
+        print("q=%-g  ana=%-g  sim=%-g  err=%-g  diff=%-g (%-g) %s" % (q, ana, sim, err, 
+                        (sim-ana), sim/ana, str(math.fabs(sim-ana)>err)))
         output.write("%g  %g  %g  %g\n" % (q, ana, sim, err))
     output.close()
@@ -278,8 +280,8 @@
         ana = validator.run_ana2D(q*math.cos(phi), q*math.sin(phi))
         sim, err = validator.run_sim2D(q*math.cos(phi), q*math.sin(phi))
-        print "q=%-g  ana=%-g  sim=%-g  err=%-g  diff=%-g (%-g) %s" % (q, ana, sim, err, 
-                        (sim-ana), sim/ana, str(math.fabs(sim-ana)>err))
+        print("q=%-g  ana=%-g  sim=%-g  err=%-g  diff=%-g (%-g) %s" % (q, ana, sim, err, 
+                        (sim-ana), sim/ana, str(math.fabs(sim-ana)>err)))
         output.write("%g  %g  %g  %g\n" % (q, ana, sim, err))
-    print "Time elapsed: ", time.time()-t_0
+    print("Time elapsed: ", time.time()-t_0)
     output.close()
        
@@ -306,7 +308,7 @@
     for d in d_list:
         sim, err = validator.run_sim(q, density=d)
-        print "d=%-g  ana=%-g  sim=%-g  err=%-g  diff=%-g (%g) %s" % \
+        print("d=%-g  ana=%-g  sim=%-g  err=%-g  diff=%-g (%g) %s" % \
             (d, ana, sim, err, (sim-ana), (sim-ana)/ana, 
-             str(math.fabs(sim-ana)>err))
+             str(math.fabs(sim-ana)>err)))
         output.write("%g  %g  %g  %g \n" % (d, ana, sim, err))
     output.close()
Index: test/sasrealspace/test/utest_oriented.py
===================================================================
--- test/sasrealspace/test/utest_oriented.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ test/sasrealspace/test/utest_oriented.py	(revision aaf5e497ff1af2aa7b8b3d361ab951e2a0ca7c93)
@@ -3,4 +3,5 @@
     @copyright: University of Tennessee, for the DANSE project
 """
+from __future__ import print_function
 
 import unittest, math, sys
@@ -16,9 +17,9 @@
 try:
     import VolumeCanvas
-    print "Testing local version"
+    print("Testing local version")
 except:
-    print sys.exc_value
+    print(sys.exc_value)
     #testing the version that is working on
-    print "Testing installed version"
+    print("Testing installed version")
     import sas.sascalc.realspace.VolumeCanvas as VolumeCanvas
  
@@ -241,5 +242,5 @@
             self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
         except:
-            print "Error", ana_val, sim_val, sim_val/ana_val
+            print("Error", ana_val, sim_val, sim_val/ana_val)
             raise sys.exc_type, sys.exc_value
 
@@ -395,5 +396,5 @@
             self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
         except:
-            print "Error", ana_val, sim_val, sim_val/ana_val
+            print("Error", ana_val, sim_val, sim_val/ana_val)
             raise sys.exc_type, sys.exc_value
 
@@ -407,5 +408,5 @@
             self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
         except:
-            print "Error", ana_val, sim_val, sim_val/ana_val
+            print("Error", ana_val, sim_val, sim_val/ana_val)
             raise sys.exc_type, sys.exc_value
 
@@ -419,5 +420,5 @@
             self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
         except:
-            print "Error", ana_val, sim_val, sim_val/ana_val
+            print("Error", ana_val, sim_val, sim_val/ana_val)
             raise sys.exc_type, sys.exc_value
 
@@ -431,5 +432,5 @@
             self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
         except:
-            print "Error", ana_val, sim_val, sim_val/ana_val
+            print("Error", ana_val, sim_val, sim_val/ana_val)
             raise sys.exc_type, sys.exc_value
 
Index: test/sasrealspace/test/utest_realspace.py
===================================================================
--- test/sasrealspace/test/utest_realspace.py	(revision 45dffa69cb5935e2da7c77a2f040debb07ceb1c6)
+++ test/sasrealspace/test/utest_realspace.py	(revision aaf5e497ff1af2aa7b8b3d361ab951e2a0ca7c93)
@@ -3,4 +3,5 @@
     @author: Mathieu Doucet / UTK
 """
+from __future__ import print_function
 
 import unittest, math, time
@@ -15,10 +16,10 @@
 try:
     import VolumeCanvas
-    print "Testing local version"
+    print("Testing local version")
 except:
     import sys
-    print sys.exc_value
+    print(sys.exc_value)
     #testing the version that is working on
-    print "Testing installed version"
+    print("Testing installed version")
     import sas.sascalc.realspace.VolumeCanvas as VolumeCanvas
      
Index: test/utest_sasview.py
===================================================================
--- test/utest_sasview.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ test/utest_sasview.py	(revision aaf5e497ff1af2aa7b8b3d361ab951e2a0ca7c93)
@@ -1,3 +1,5 @@
 #!/usr/bin/env python
+from __future__ import print_function
+
 import os
 import subprocess
@@ -80,24 +82,24 @@
                     if has_failed:
                         failed += 1
-                        print "Result for %s (%s): FAILED" % (module_name, module_dir)
-                        print std_out
+                        print("Result for %s (%s): FAILED" % (module_name, module_dir))
+                        print(std_out)
                     else:
                         passed += 1
-                        print "Result for %s: SUCCESS" % module_name
+                        print("Result for %s: SUCCESS" % module_name)
 
-    print "\n----------------------------------------------"
+    print("\n----------------------------------------------")
     if n_tests == 0:
-        print "No tests."
+        print("No tests.")
     else:
-        print "Results by test modules:"
-        print "    PASSED: %d" % passed
+        print("Results by test modules:")
+        print("    PASSED: %d" % passed)
         ratio = 100.0*failed/(failed+passed)
-        print "    FAILED: %d    (%.0f%%)" % (failed,ratio)
+        print("    FAILED: %d    (%.0f%%)" % (failed,ratio))
 
-        print "Results by tests:"
-        print "    Tests run:    %d" % n_tests
-        print "    Tests failed: %d" % n_failures
-        print "    Test errors:  %d" % n_errors
-    print "----------------------------------------------"
+        print("Results by tests:")
+        print("    Tests run:    %d" % n_tests)
+        print("    Tests failed: %d" % n_failures)
+        print("    Test errors:  %d" % n_errors)
+    print("----------------------------------------------")
     
     return failed
