Index: .travis.yml
===================================================================
--- .travis.yml	(revision ed8f27e726252e8ed527ff9e4180eac97d44c6cf)
+++ .travis.yml	(revision 4636f5795f612185f98f35b02e7ea25990089a28)
@@ -2,34 +2,77 @@
 
 language: python
-python:
-  - "2.7"
+
+matrix:
+  include:
+    - os: linux
+      env:
+        - PY=2.7
+        - NUMPYSPEC=numpy
+    - os: osx
+      language: generic
+      env:
+        - PY=2.7
+        - NUMPYSPEC=numpy
+
 # whitelist
 branches:
   only:
     - master
-# command to install dependencies
-virtualenv:
-  system_site_packages: true
+
+addons:
+  apt:
+    packages:
+      - opencl-headers
+      - fglrx
+      - libblas-dev
+      - libatlas-dev
+      - libatlas-base-dev
+      - liblapack-dev
+      - gfortran
+      - libhdf5-serial-dev
+
 before_install:
-  - 'if [ $TRAVIS_PYTHON_VERSION == "2.7" ]; then sudo apt-get update;sudo apt-get install python-matplotlib libhdf5-serial-dev python-h5py fglrx opencl-headers python-pyopencl gfortran libblas-dev liblapack-dev libatlas-dev; fi'
+  - echo $TRAVIS_OS_NAME
+  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
+        wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
+        sudo apt-get update; sudo apt-get install python-pyopencl;
+    elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
+        wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
+    fi
+
+  - bash miniconda.sh -b -p $HOME/miniconda
+  - export PATH="$HOME/miniconda/bin:$PATH"
+  - hash -r
+  - conda update --yes conda
+
+  # Useful for debugging any issues with conda
+  - conda info -a
+
+  # could install other dependencies, but they're locked to specific
+  # versions in build/requirements.txt
+  - conda install --yes python=$PY $NUMPYSPEC scipy cython pylint wxpython
 
 install:
   - pip install -r build_tools/requirements.txt
+  - pip install matplotlib
 
-before_script:
-  - "export DISPLAY=:99.0"
-  - "sh -e /etc/init.d/xvfb start"
-  - sleep 3 # give xvfb some time to start
-  
+#before_script:
+#  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
+#        "export DISPLAY=:99.0"; "sh -e /etc/init.d/xvfb start"; sleep 3; # give xvfb some time to start
+#    fi
+
 script:
-  - export WORKSPACE=/home/travis/build/SasView/
-  - cd $WORKSPACE
+  - cd ..
+  # this should be the directory above the sasview directory, where we want to
+  # clone the sasmodels
+  - export WORKSPACE=$(pwd)
   - git clone --depth=50 --branch=master https://github.com/SasView/sasmodels.git sasmodels
-  - export PYTHONPATH=$WORKSPACE/sasview-install:$WORKSPACE/utils:$PYTHONPATH
-  - cd $WORKSPACE
+
+  # required for documentation
+  - git clone --depth=50 --branch=master https://github.com/bumps/bumps.git
+
   - ls -ltr
   - if [ ! -d "utils" ]; then mkdir utils; fi
   - /bin/sh -xe sasview/build_tools/travis_build.sh
-#  - /bin/sh -xe sasview/build_tools/jenkins_linux_test.sh
   - export LC_ALL=en_US.UTF-8
   - export LANG=en_US.UTF-8
Index: INSTALL.txt
===================================================================
--- INSTALL.txt	(revision 26c9b85eb05ac83c648348fc7879e08e3225ceb1)
+++ INSTALL.txt	(revision 26c9b85eb05ac83c648348fc7879e08e3225ceb1)
@@ -0,0 +1,51 @@
+Quick Intro for Building Sasview
+================================
+
+Note - at the current time sasview will only run in gui form under Python 2.
+
+Before trying to install and run sasview you'll need to check what
+dependencies are required:
+
+$ python check_packages.py
+
+Many of these are available from PyPi, but some (e.g. h5py) may require more
+involvement to build and install. If you use the conda package manager then
+many of the pre-built dependencies are available there. This may be the easiest
+route if you are on windows.
+
+The build works in the pythonic way:
+
+$ python setup.py build      # will build the package underneath 'build/'
+$ python setup.py install    # will install the package into site-packages
+
+
+If you want to check the build without installing:
+
+$ python run.py              # will run the code in place (building the C code once, if required)
+
+On OSX or windows you may need to use:
+
+$ pythonw run.py
+
+
+Build scripts that are used on http://build.sasview.org/ are in
+build_tools. Make sure the build is run first obviously.
+
+$ build_tools/jenkins_linux_build.sh
+$ build_tools/jenkins_linux_test.sh
+$ build_tools/jenkins_linux_pylint.sh
+
+The scripts can be customized using environment variables, but 
+should do a reasonable job as is in a sane setup.
+
+
+
+To build just the Sphinx docs:
+build_sphinx.py
+
+
+More information can be found here:
+
+http://www.sasview.org/help.html
+http://www.sasview.org/faq.html
+http://www.sasview.org/trac/wiki/DevNotes
Index: LICENSE.TXT
===================================================================
--- LICENSE.TXT	(revision 7c05b63b782997e4f04fe015fe6ec523b26bdb7c)
+++ LICENSE.TXT	(revision a3e3ef589b5480f01cfe7c9d68b47e807fa7f49c)
@@ -1,3 +1,3 @@
-Copyright (c) 2009-2016, SasView Developers
+Copyright (c) 2009-2017, SasView Developers
 All rights reserved.
 
Index: build_tools/travis_build.sh
===================================================================
--- build_tools/travis_build.sh	(revision 68e6ac8dfb8e0ac6022e1d579d09bf5e755c908e)
+++ build_tools/travis_build.sh	(revision 8374dc04dcade42e82b8c371a4f20df5806a5552)
@@ -1,3 +1,3 @@
-# Simplified build for Travic CI
+# Simplified build for Travis CI
 # No documentation is built
 export PATH=$PATH:/usr/local/bin/
@@ -38,5 +38,6 @@
 cd $WORKSPACE/sasview
 $PYTHON setup.py clean
-$PYTHON setup.py build docs bdist_egg
+# $PYTHON setup.py build docs bdist_egg
+$PYTHON setup.py bdist_egg
 
 # INSTALL SASVIEW
Index: check_packages.py
===================================================================
--- check_packages.py	(revision 131d94baf369cee4465f39be26ad9c294608b35f)
+++ check_packages.py	(revision f433e6a338b824ad42f53f2b0bc1a9eac91d8faf)
@@ -2,5 +2,6 @@
 Checking and reinstalling the external packages
 """
-import os
+from __future__ import print_function
+
 import sys
 
@@ -14,91 +15,93 @@
     sys.modules['Image'] = PIL.Image
 
+if sys.version_info[0] > 2:
+    print("To use the sasview GUI you must use Python 2\n")
 
 common_required_package_list = {
-    'setuptools':{'version':'0.6c11','import_name':'setuptools','test':'__version__'},
-    'pyparsing':{'version':'1.5.5','import_name':'pyparsing','test':'__version__'},
-    'html5lib':{'version':'0.95','import_name':'html5lib','test':'__version__'},
-    'reportlab':{'version':'2.5','import_name':'reportlab','test':'Version'},
-    'h5py':{'version':'2.5','import_name':'h5py','test':'__version__'},
-    'lxml':{'version':'2.3','import_name':'lxml.etree','test':'LXML_VERSION'},
-    'PIL':{'version':'1.1.7','import_name':'Image','test':'VERSION'},
-    'pylint':{'version':None,'import_name':'pylint','test':None},
-    'periodictable':{'version':'1.3.0','import_name':'periodictable','test':'__version__'},
-    'bumps':{'version':'0.7.5.9','import_name':'bumps','test':'__version__'},
-    'numpy':{'version':'1.7.1','import_name':'numpy','test':'__version__'},
-    'scipy':{'version':'0.18.0','import_name':'scipy','test':'__version__'},
-    'wx':{'version':'2.8.12.1','import_name':'wx','test':'__version__'},
-    'matplotlib':{'version':'1.1.0','import_name':'matplotlib','test':'__version__'},
-    'xhtml2pdf':{'version':'3.0.33','import_name':'xhtml2pdf','test':'__version__'},
-    'sphinx':{'version':'1.2.1','import_name':'sphinx','test':'__version__'},
-    'unittest-xml-reporting':{'version':'1.10.0','import_name':'xmlrunner','test':'__version__'},
-    'pyopencl':{'version':'2015.1','import_name':'pyopencl','test':'VERSION_TEXT'},
+    'setuptools': {'version': '0.6c11', 'import_name': 'setuptools', 'test': '__version__'},
+    'pyparsing': {'version': '1.5.5', 'import_name': 'pyparsing', 'test': '__version__'},
+    'html5lib': {'version': '0.95', 'import_name': 'html5lib', 'test': '__version__'},
+    'reportlab': {'version': '2.5', 'import_name': 'reportlab', 'test': 'Version'},
+    'h5py': {'version': '2.5', 'import_name': 'h5py', 'test': '__version__'},
+    'lxml': {'version': '2.3', 'import_name': 'lxml.etree', 'test': 'LXML_VERSION'},
+    'PIL': {'version': '1.1.7', 'import_name': 'Image', 'test': 'VERSION'},
+    'pylint': {'version': None, 'import_name': 'pylint', 'test': None},
+    'periodictable': {'version': '1.3.0', 'import_name': 'periodictable', 'test': '__version__'},
+    'bumps': {'version': '0.7.5.9', 'import_name': 'bumps', 'test': '__version__'},
+    'numpy': {'version': '1.7.1', 'import_name': 'numpy', 'test': '__version__'},
+    'scipy': {'version': '0.18.0', 'import_name': 'scipy', 'test': '__version__'},
+    'wx': {'version': '2.8.12.1', 'import_name': 'wx', 'test': '__version__'},
+    'matplotlib': {'version': '1.1.0', 'import_name': 'matplotlib', 'test': '__version__'},
+    'xhtml2pdf': {'version': '3.0.33', 'import_name': 'xhtml2pdf', 'test': '__version__'},
+    'sphinx': {'version': '1.2.1', 'import_name': 'sphinx', 'test': '__version__'},
+    'unittest-xml-reporting': {'version': '1.10.0', 'import_name': 'xmlrunner', 'test': '__version__'},
+    'pyopencl': {'version': '2015.1', 'import_name': 'pyopencl', 'test': 'VERSION_TEXT'},
 }
 win_required_package_list = {
-    'comtypes':{'version':'0.6.2','import_name':'comtypes','test':'__version__'},
-    'pywin':{'version':'217','import_name':'pywin','test':'__version__'},
-    'py2exe':{'version':'0.6.9','import_name':'py2exe','test':'__version__'},
+    'comtypes': {'version': '0.6.2', 'import_name': 'comtypes', 'test': '__version__'},
+    'pywin': {'version': '217', 'import_name': 'pywin', 'test': '__version__'},
+    'py2exe': {'version': '0.6.9', 'import_name': 'py2exe', 'test': '__version__'},
 }
 mac_required_package_list = {
-    'py2app':{'version':None,'import_name':'py2app','test':'__version__'},
+    'py2app': {'version': None, 'import_name': 'py2app', 'test': '__version__'},
 }
 
 deprecated_package_list = {
-    'pyPdf':{'version':'1.13','import_name':'pyPdf','test':'__version__'},
+    'pyPdf': {'version': '1.13', 'import_name': 'pyPdf', 'test': '__version__'},
 }
 
-print "Checking Required Package Versions...."
-print
-print "Common Packages"
-for package_name,test_vals in common_required_package_list.iteritems():
+print("Checking Required Package Versions....\n")
+print("Common Packages")
+
+for package_name, test_vals in common_required_package_list.items():
     try:
-        i = __import__(test_vals['import_name'],fromlist=[''])
+        i = __import__(test_vals['import_name'], fromlist=[''])
         if test_vals['test'] == None:
-            print "%s Installed (Unknown version)" % package_name
+            print("%s Installed (Unknown version)" % package_name)
         elif package_name == 'lxml':
-            verstring = str(getattr(i,'LXML_VERSION'))
-            print "%s Version Installed: %s"% (package_name,verstring.replace(', ','.').lstrip('(').rstrip(')'))
+            verstring = str(getattr(i, 'LXML_VERSION'))
+            print("%s Version Installed: %s"% (package_name, verstring.replace(', ', '.').lstrip('(').rstrip(')')))
         else:
-            print "%s Version Installed: %s"% (package_name,getattr(i,test_vals['test']))
-    except:
-        print '%s NOT INSTALLED'% package_name
+            print("%s Version Installed: %s"% (package_name, getattr(i, test_vals['test'])))
+    except ImportError:
+        print('%s NOT INSTALLED'% package_name)
 
 if sys.platform == 'win32':
-    print
-    print "Windows Specific Packages:"
-    for package_name,test_vals in win_required_package_list.iteritems():
+    print("")
+    print("Windows Specific Packages:")
+    for package_name, test_vals in win_required_package_list.items():
         try:
             if package_name == "pywin":
                 import win32api
-                fixed_file_info = win32api.GetFileVersionInfo(win32api.__file__,'\\')
-                print "%s Version Installed: %s"% (package_name,fixed_file_info['FileVersionLS'] >> 16)
+                fixed_file_info = win32api.GetFileVersionInfo(win32api.__file__, '\\')
+                print("%s Version Installed: %s"% (package_name, fixed_file_info['FileVersionLS'] >> 16))
             else:
-                i = __import__(test_vals['import_name'],fromlist=[''])
-                print "%s Version Installed: %s"% (package_name,getattr(i,test_vals['test']))
-        except:
-            print '%s NOT INSTALLED'% package_name
+                i = __import__(test_vals['import_name'], fromlist=[''])
+                print("%s Version Installed: %s"% (package_name, getattr(i, test_vals['test'])))
+        except ImportError:
+            print('%s NOT INSTALLED'% package_name)
 
 if sys.platform == 'darwin':
-    print
-    print "MacOS Specific Packages:"
-    for package_name,test_vals in mac_required_package_list.iteritems():
+    print("")
+    print("MacOS Specific Packages:")
+    for package_name, test_vals in mac_required_package_list.items():
         try:
-            i = __import__(test_vals['import_name'],fromlist=[''])
-            print "%s Version Installed: %s"% (package_name,getattr(i,test_vals['test']))
-        except:
-            print '%s NOT INSTALLED'% package_name
+            i = __import__(test_vals['import_name'], fromlist=[''])
+            print("%s Version Installed: %s"% (package_name, getattr(i, test_vals['test'])))
+        except ImportError:
+            print('%s NOT INSTALLED'% package_name)
 
 
-print
-print "Deprecated Packages"
-print "You can remove these unless you need them for other reasons!"
-for package_name,test_vals in deprecated_package_list.iteritems():
+print("")
+print("Deprecated Packages")
+print("You can remove these unless you need them for other reasons!")
+for package_name, test_vals in deprecated_package_list.items():
     try:
-        i = __import__(test_vals['import_name'],fromlist=[''])
+        i = __import__(test_vals['import_name'], fromlist=[''])
         if package_name == 'pyPdf':
-            #pyPdf doesn't have the version number internally
-            print 'pyPDF Installed (Version unknown)'
+            # pyPdf doesn't have the version number internally
+            print('pyPDF Installed (Version unknown)')
         else:
-            print "%s Version Installed: %s"% (package_name,getattr(i,test_vals['test']))
-    except:
-        print '%s NOT INSTALLED'% package_name
+            print("%s Version Installed: %s"% (package_name, getattr(i, test_vals['test'])))
+    except ImportError:
+        print('%s NOT INSTALLED'% package_name)
Index: cs/README-BUILD-TIPS.TXT
===================================================================
--- docs/README-BUILD-TIPS.TXT	(revision d09f0ae18fc84c04aebd2d791c2fca44dba326dd)
+++ 	(revision )
@@ -1,47 +1,0 @@
-Quick Intro for Building Sasview
-================================
-
-
-The build works in the usualy pythonic way:
-
-$ python setup.py build      # will build the package underneath 'build/'
-$ python setup.py install    # will install the package
-
-
-
-If you want to check the build without installing:
-
-$ python run.py              # will run the code in place (building the C code once, if required)
-
-
-
-To check all dependencies are met:
-
-$ python deps.py
-$ python check_packages.py 
-
-Both tell you different parts of the story, unfortunately.
-
-
-
-Build scripts that are used on http://build.sasview.org/ are in
-build_tools. Make sure the build is run first obviously.
-
-$ build_tools/jenkins_linux_build.sh
-$ build_tools/jenkins_linux_test.sh
-$ build_tools/jenkins_linux_pylint.sh
-
-The scripts can be customized using environment variables, but 
-should do a reasonable job as is in a sane setup.
-
-
-
-To build just the Sphinx docs:
-build_sphinx.py
-
-
-More information can be found here:
-
-http://www.sasview.org/help.html
-http://www.sasview.org/faq.html
-http://www.sasview.org/trac/wiki/DevNotes
Index: mac_setup_homebrew.sh
===================================================================
--- mac_setup_homebrew.sh	(revision 05d167ef2ab3e7387108012b48f31ca0d71a1cef)
+++ mac_setup_homebrew.sh	(revision 05d167ef2ab3e7387108012b48f31ca0d71a1cef)
@@ -0,0 +1,7 @@
+#!/bin/bash
+sudo pip install Pillow
+brew tap homebrew/science
+brew install hdf5
+sudo pip install h5py
+xcode-select --install
+sudo python setup.py install
Index: run.py
===================================================================
--- run.py	(revision 18e73093a1cac56cb9c9fb237df8a08062ab6d5f)
+++ run.py	(revision 05a9d29f434dd8684ab874ce9ac9c205aa00683b)
@@ -20,4 +20,18 @@
 from os.path import abspath, dirname, join as joinpath
 
+class TeeStream:
+    def __init__(self, filename):
+        self.logfile = open(filename, 'a')
+        self.console = sys.stderr
+    def write(self, buf):
+        self.logfile.write(buf)
+        self.console.write(buf)
+
+def tee_logging():
+    import logging
+    stream = TeeStream(os.path.join(os.path.expanduser("~"), 'sasview.log'))
+    logging.basicConfig(level=logging.INFO,
+                        format='%(asctime)s %(levelname)s %(message)s',
+                        stream=stream)
 
 def addpath(path):
@@ -139,4 +153,5 @@
 if __name__ == "__main__":
     prepare()
+    tee_logging()
     from sas.sasview.sasview import run
     run()
Index: sasview/README.txt
===================================================================
--- sasview/README.txt	(revision 220b1e78c0098906e14ad2dd815fdf5a862912fd)
+++ sasview/README.txt	(revision 311d00ac4610077e51142b4b69182cd5b95f3211)
@@ -4,4 +4,61 @@
 1- Features
 ===========
+    - New in Version 4.1.0
+      ------------------
+      This incremental release brings a series of new features and improvements,
+      and a host of bug fixes. Of particular note are:
+      
+      - Correlation Function Analysis (Corfunc)
+      	This performs a correlation function analysis of one-dimensional SAXS/SANS data, 
+	or generates a model-independent volume fraction profile from the SANS from an 
+	adsorbed polymer/surfactant layer.
+
+	A correlation function may be interpreted in terms of an imaginary rod moving 
+	through the structure of the material. Î1D(R) is the probability that a rod of 
+	length R moving through the material has equal electron/neutron scattering 
+	length density at either end. Hence a frequently occurring spacing within a 
+	structure manifests itself as a peak.
+
+	A volume fraction profile \Phi(z) describes how the density of polymer 
+	segments/surfactant molecules varies with distance from an (assumed locally flat)
+	interface.
+
+      - Fitting of SESANS Data
+      	Data from Spin-Echo SANS measurements can now be loaded and fitted. The data will 
+	be plotted against the correct axes and models will automatically perform a Hankel 
+	transform in order to calculate SESANS from a SANS model.
+
+      - Documentation
+      	The documentation has undergone significant checking and updating.
+
+      - Improvements
+        - Correlation function (corfunc) analysis of 1D SAS data added from CCP13
+        - File converter tool for multi-file single column data sets
+        - SESANS data loading and direct fitting using the Hankel transformation
+        - Saving and loading of simultaneous and constrained fits now supported
+        - Save states from SasView v3.x.y now loaded using sasmodel model names
+        - Saving and loading of projects with 2D fits now supported
+        - Loading a project removes all existing data, fits, and plots
+        - Structure factor and form factor can be plotted independently
+        - OpenCL is disabled by default and can be enabled through a fit menu
+        - Data and theory fields are now independently expandable
+      - Bug Fixes
+        - Fixes #667: Models computed multiple times on parameters changes
+        - Fixes #673: Custom models override built in models of same name
+        - Fixes #678: Hard crash when running complex models on GPU
+        - Fixes $774: Old style plugin models unloadable
+        - Fixes #789: stacked disk scale doesn't match cylinder model
+        - Fixes #792: core_shell_fractal uses wrong effective radius
+        - Fixes #800: Plot range reset on plot redraws
+        - Fixes #811 and #825: 2D smearing broken
+        - Fixes #815: Integer model parameter handling
+        - Fixes #824: Cannot apply sector averaging when no detector data present
+        - Fixes #830: Cansas HDF5 reader fully compliant with NXCanSAS v1.0 format
+        - Fixes #835: Fractal model breaks with negative Q values
+        - Fixes #843: Multilayer vesicle does not define effective radius
+        - Fixes #858: Hayter MSA S(Q) returns errors
+        - Numerous grammatical and contexual errors in documention
+
+
     - New in Version 4.0.1
       ------------------
@@ -426,4 +483,42 @@
 ===============
 
+
+   4.1- All systems:
+      The conversion to sasmodels infrastructure is ongoing and should be
+      completed in the next release. In the meantime this leads to a few known
+      issues:
+        - The way that orientation is defined is being refactored to address
+        long standing issues and comments.  In release 4.1 however only models
+        with symmetry (e.g. a=b) have been converted to the new definitions.
+        The rest (a <> b <> c - e.g. parellelepiped) maintain the same
+        definition as before and will be converted in 4.2.  Note that
+        orientational distribution also makes much more sense in the new
+        framework.  The documentation should indicate which definition is being
+        used for a given model.
+        - The infrastructure currently handles internal conversion of old style
+        models so that user created models in previous versions should continue
+        to work for now. At some point in the future such support will go away.
+        Everyone is encouraged to convert to the new structure which should be
+        relatively straight forward and provides a number of benefits. 
+        - In that vein, the distributed models and those generated by the new
+        plugin model editor are in the new format, however those generated by
+        sum|multiply models are the old style sum|multiply models. This should
+        also disappear in the near future 
+        - The on the fly discovery of plugin models and changes thereto behave
+        inconsistently.  If a change to a plugin model does not seem to
+        register, the Load Plugin Models (under fitting -> Plugin Model
+        Operations) can be used.  However, after calling Load Plugin Models, the
+        active plugin will no longer be loaded (even though the GUI looks like
+        it is) unless it is a sum|multiply model which works properly.  All
+        others will need to be recalled from the model dropdown menu to reload
+        the model into the calculation engine.  While it might be annoying it
+        does not appear to prevent SasView from working..
+        - The model code and documentation review is ongoing. At this time the
+        core shell parellelepiped is known to have the C shell effectively fixed
+        at 0 (noted in documentation) while the triaxial ellipsoid does not seem
+        to reproduce the limit of the oblate or prolate ellipsoid. If errors are
+        found and corrected, corrected versions will be uploaded to the
+        marketplace. 
+   
    3.1- All systems:
         - The documentation window may take a few seconds to load the first time
Index: sasview/local_config.py
===================================================================
--- sasview/local_config.py	(revision 73cbeec4f3f2dfd3c530e5782984529dc2c133b2)
+++ sasview/local_config.py	(revision 1779e727216b236f9fc4d683fa29295ad44ed2ed)
@@ -33,21 +33,19 @@
 ''' remember to:'''
 _acknowledgement_preamble_bullet1 =\
-'''Acknowledge its use in your publications as suggested below;'''
+'''Acknowledge its use in your publications as :'''
 _acknowledgement_preamble_bullet2 =\
-'''Reference SasView as : M. Doucet, et al. SasView Version 4.0, Zenodo''' +\
-''', http://doi.org/10.5281/zenodo.159083;'''
+'''Reference SasView as:'''
 _acknowledgement_preamble_bullet3 =\
-'''Reference the model you used if appropriate (see documentation for refs);'''
+'''Reference the model you used if appropriate (see documentation for refs)'''
 _acknowledgement_preamble_bullet4 =\
 '''Send us your reference for our records: developers@sasview.org'''
 _acknowledgement_publications = \
-'''This work benefited from the use of the SasView application, originally developed under NSF Award 
-DMR-0520547. SasView also contains code developed with funding from the EU Horizon 2020 programme 
-under the SINE2020 project Grant No 654000, and by Patrick O'Brien & Adam Washington.'''
+'''This work benefited from the use of the SasView application, originally developed under NSF Award DMR-0520547. SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project Grant No 654000.'''
+_acknowledgement_citation = \
+'''M. Doucet et al. SasView Version 4.1, Zenodo, 10.5281/zenodo.438138'''
 
 _acknowledgement =  \
-'''This work was originally developed as part of the DANSE project funded by the US NSF under Award DMR-0520547, but is currently maintained 
-by a collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO and TU Delft. SasView also contains code developed with funding from the 
-EU Horizon 2020 programme under the SINE2020 project (Grant No 654000), and by Patrick O'Brien (pycrust) and Adam Washington (corfunc-py).'''
+'''This work was originally developed as part of the DANSE project funded by the US NSF under Award DMR-0520547,\n but is currently maintained by a collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, DLS, and the scattering community.\n\n SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project (Grant No 654000).\nA list of individual contributors can be found at: https://github.com/orgs/SasView/people
+'''
 
 _homepage = "http://www.sasview.org"
@@ -72,4 +70,5 @@
 _ansto_logo = os.path.join(icon_path, "ansto_logo.png")
 _tudelft_logo = os.path.join(icon_path, "tudelft_logo.png")
+_dls_logo = os.path.join(icon_path, "dls_logo.png")
 _nsf_logo = os.path.join(icon_path, "nsf_logo.png")
 _danse_logo = os.path.join(icon_path, "danse_logo.png")
@@ -85,9 +84,10 @@
 _ansto_url = "http://www.ansto.gov.au/"
 _tudelft_url = "http://www.tnw.tudelft.nl/en/cooperation/facilities/reactor-instituut-delft/"
+_dls_url = "http://www.diamond.ac.uk/"
 _danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html"
 _inst_url = "http://www.utk.edu"
 _corner_image = os.path.join(icon_path, "angles_flat.png")
 _welcome_image = os.path.join(icon_path, "SVwelcome.png")
-_copyright = "(c) 2009 - 2016, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO and TU Delft"
+_copyright = "(c) 2009 - 2017, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft and DLS"
 marketplace_url = "http://marketplace.sasview.org/"
 
Index: setup.py
===================================================================
--- setup.py	(revision 1e13b539370619f0f420c675af3d469eec215af3)
+++ setup.py	(revision 27109e5cd4b7a9b36dd9bb6e66db62057374322b)
@@ -9,5 +9,5 @@
 from distutils.command.build_ext import build_ext
 from distutils.core import Command
-import numpy
+import numpy as np
 
 # Manage version number ######################################
@@ -225,5 +225,5 @@
 ext_modules.append( Extension("sas.sascalc.file_converter.core.bsl_loader",
                               sources = [os.path.join(mydir, "bsl_loader.c")],
-                              include_dirs=[numpy.get_include()],
+                              include_dirs=[np.get_include()],
                               ) )
 
@@ -315,7 +315,12 @@
                                'test/1d_data/*',
                                'test/2d_data/*',
+                               'test/convertible_files/*',
+                               'test/coordinate_data/*',
+                               'test/image_data/*',
+                               'test/media/*',
+                               'test/other_files/*',
                                'test/save_states/*',
-                               'test/upcoming_formats/*',
-                                 'default_categories.json']
+                               'test/sesans_data/*'
+                               ]
 packages.append("sas.sasview")
 
Index: src/examples/test_chisq_panel.py
===================================================================
--- src/examples/test_chisq_panel.py	(revision c10d9d6c8667422d3db329ac32d0528a6cce3fc6)
+++ src/examples/test_chisq_panel.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -30,5 +30,5 @@
 from sas.sasgui.plottools.plottables import Plottable, Graph, Data1D, Theory1D
 import  sys
-import numpy
+import numpy as np
 
 
@@ -78,11 +78,11 @@
     # Construct a simple graph
     if False:
-        x = numpy.array([1,2,3,4,5,6],'d')
-        y = numpy.array([4,5,26,5,4,-1],'d')
-        dy = numpy.array([0.2, 0.3, 0.1, 0.2, 0.9, 0.3])
+        x = np.array([1,2,3,4,5,6],'d')
+        y = np.array([4,5,26,5,4,-1],'d')
+        dy = np.array([0.2, 0.3, 0.1, 0.2, 0.9, 0.3])
     else:
-        x = numpy.linspace(0,2.0, 50)
-        y = numpy.sin(2*numpy.pi*x*2.8)
-        dy = numpy.sqrt(100*numpy.abs(y))/100
+        x = np.linspace(0,2.0, 50)
+        y = np.sin(2*np.pi*x*2.8)
+        dy = np.sqrt(100*np.abs(y))/100
 
     from sas.sasgui.plottools.plottables import Data1D, Theory1D, Chisq , Graph
Index: src/examples/test_copy_print.py
===================================================================
--- src/examples/test_copy_print.py	(revision d7bb5267934b5676c90b1655346a3793a8022965)
+++ src/examples/test_copy_print.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -30,5 +30,5 @@
 import  sys
 sys.platform = 'win95'
-import numpy
+import numpy as np
 
 
@@ -81,7 +81,7 @@
 def sample_graph():
     # Construct a simple graph
-    x = numpy.linspace(0,2.0, 50)
-    y = numpy.sin(2*numpy.pi*x*2.8)
-    dy = numpy.sqrt(100*numpy.abs(y))/100
+    x = np.linspace(0,2.0, 50)
+    y = np.sin(2*np.pi*x*2.8)
+    dy = np.sqrt(100*np.abs(y))/100
     
     data = Data1D(x,y,dy=dy)
Index: src/examples/test_panel.py
===================================================================
--- src/examples/test_panel.py	(revision d7bb5267934b5676c90b1655346a3793a8022965)
+++ src/examples/test_panel.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -39,6 +39,6 @@
 from sas.sasgui.plottools.PlotPanel import PlotPanel
 from sas.sasgui.plottools.plottables import Data1D
-import  sys
-import numpy
+import sys
+import numpy as np
 import random, math
 
@@ -157,12 +157,12 @@
     def _add_data(self, event):
         data_len = 50
-        x  = numpy.zeros(data_len)
-        y  = numpy.zeros(data_len)
-        x2  = numpy.zeros(data_len)
-        y2  = numpy.zeros(data_len)
-        dy2  = numpy.zeros(data_len)
-        x3  = numpy.zeros(data_len)
-        y3  = numpy.zeros(data_len)
-        dy3  = numpy.zeros(data_len)
+        x  = np.zeros(data_len)
+        y  = np.zeros(data_len)
+        x2  = np.zeros(data_len)
+        y2  = np.zeros(data_len)
+        dy2  = np.zeros(data_len)
+        x3  = np.zeros(data_len)
+        y3  = np.zeros(data_len)
+        dy3  = np.zeros(data_len)
         for i in range(len(x)):
             x[i] = i
Index: src/examples/test_panel2D.py
===================================================================
--- src/examples/test_panel2D.py	(revision d7bb5267934b5676c90b1655346a3793a8022965)
+++ src/examples/test_panel2D.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -40,5 +40,5 @@
 from sas.sasgui.plottools.plottables import Data1D, Theory1D, Data2D
 import  sys,os
-import numpy
+import numpy as np
 import random, math
 
@@ -226,12 +226,12 @@
     def _add_data(self, event):
         data_len = 50
-        x  = numpy.zeros(data_len)
-        y  = numpy.zeros(data_len)
-        x2  = numpy.zeros(data_len)
-        y2  = numpy.zeros(data_len)
-        dy2  = numpy.zeros(data_len)
-        x3  = numpy.zeros(data_len)
-        y3  = numpy.zeros(data_len)
-        dy3  = numpy.zeros(data_len)
+        x  = np.zeros(data_len)
+        y  = np.zeros(data_len)
+        x2  = np.zeros(data_len)
+        y2  = np.zeros(data_len)
+        dy2  = np.zeros(data_len)
+        x3  = np.zeros(data_len)
+        y3  = np.zeros(data_len)
+        dy3  = np.zeros(data_len)
         for i in range(len(x)):
             x[i] = i
Index: src/sas/sascalc/calculator/BaseComponent.py
===================================================================
--- src/sas/sascalc/calculator/BaseComponent.py	(revision deddda187cdcc3d47108e1271351238d33c2fd41)
+++ src/sas/sascalc/calculator/BaseComponent.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -9,5 +9,5 @@
 from collections import OrderedDict
 
-import numpy
+import numpy as np
 #TO DO: that about a way to make the parameter
 #is self return if it is fittable or not
@@ -119,5 +119,5 @@
         Then get ::
 
-            q = numpy.sqrt(qx_prime^2+qy_prime^2)
+            q = np.sqrt(qx_prime^2+qy_prime^2)
 
         that is a qr in 1D array; ::
@@ -150,7 +150,7 @@
 
             # calculate q_r component for 2D isotropic
-            q = numpy.sqrt(qx**2+qy**2)
+            q = np.sqrt(qx**2+qy**2)
             # vectorize the model function runXY
-            v_model = numpy.vectorize(self.runXY, otypes=[float])
+            v_model = np.vectorize(self.runXY, otypes=[float])
             # calculate the scattering
             iq_array = v_model(q)
@@ -160,5 +160,5 @@
         elif qdist.__class__.__name__ == 'ndarray':
             # We have a simple 1D distribution of q-values
-            v_model = numpy.vectorize(self.runXY, otypes=[float])
+            v_model = np.vectorize(self.runXY, otypes=[float])
             iq_array = v_model(qdist)
             return iq_array
Index: src/sas/sascalc/calculator/instrument.py
===================================================================
--- src/sas/sascalc/calculator/instrument.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/calculator/instrument.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -3,5 +3,5 @@
 control instrumental parameters
 """
-import numpy
+import numpy as np
 
 # defaults in cgs unit
@@ -168,5 +168,5 @@
         self.spectrum = self.get_default_spectrum()
         # intensity in counts/sec
-        self.intensity = numpy.interp(self.wavelength,
+        self.intensity = np.interp(self.wavelength,
                                       self.spectrum[0],
                                       self.spectrum[1],
@@ -203,5 +203,5 @@
         """
         spectrum = self.spectrum
-        intensity = numpy.interp(self.wavelength,
+        intensity = np.interp(self.wavelength,
                                  spectrum[0],
                                  spectrum[1],
@@ -244,5 +244,5 @@
         self.wavelength = wavelength
         validate(wavelength)
-        self.intensity = numpy.interp(self.wavelength,
+        self.intensity = np.interp(self.wavelength,
                                       self.spectrum[0],
                                       self.spectrum[1],
@@ -305,5 +305,5 @@
         get default spectrum
         """
-        return numpy.array(_LAMBDA_ARRAY)
+        return np.array(_LAMBDA_ARRAY)
 
     def get_band(self):
@@ -345,5 +345,5 @@
         get list of the intensity wrt wavelength_list
         """
-        out = numpy.interp(self.wavelength_list,
+        out = np.interp(self.wavelength_list,
                            self.spectrum[0],
                            self.spectrum[1],
Index: src/sas/sascalc/calculator/resolution_calculator.py
===================================================================
--- src/sas/sascalc/calculator/resolution_calculator.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/calculator/resolution_calculator.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -12,5 +12,5 @@
 from math import sqrt
 import math
-import numpy
+import numpy as np
 import sys
 import logging
@@ -393,7 +393,7 @@
         dx_size = (self.qx_max - self.qx_min) / (1000 - 1)
         dy_size = (self.qy_max - self.qy_min) / (1000 - 1)
-        x_val = numpy.arange(self.qx_min, self.qx_max, dx_size)
-        y_val = numpy.arange(self.qy_max, self.qy_min, -dy_size)
-        q_1, q_2 = numpy.meshgrid(x_val, y_val)
+        x_val = np.arange(self.qx_min, self.qx_max, dx_size)
+        y_val = np.arange(self.qy_max, self.qy_min, -dy_size)
+        q_1, q_2 = np.meshgrid(x_val, y_val)
         #q_phi = numpy.arctan(q_1,q_2)
         # check whether polar or cartesian
@@ -887,5 +887,5 @@
         x_value = x_val - x0_val
         y_value = y_val - y0_val
-        phi_i = numpy.arctan2(y_val, x_val)
+        phi_i = np.arctan2(y_val, x_val)
 
         # phi correction due to the gravity shift (in phi)
@@ -893,6 +893,6 @@
         phi_i = phi_i - phi_0 + self.gravity_phi
 
-        sin_phi = numpy.sin(self.gravity_phi)
-        cos_phi = numpy.cos(self.gravity_phi)
+        sin_phi = np.sin(self.gravity_phi)
+        cos_phi = np.cos(self.gravity_phi)
 
         x_p = x_value * cos_phi + y_value * sin_phi
@@ -908,5 +908,5 @@
         nu_value = -0.5 * (new_x * new_x + new_y * new_y)
 
-        gaussian = numpy.exp(nu_value)
+        gaussian = np.exp(nu_value)
         # normalizing factor correction
         gaussian /= gaussian.sum()
@@ -954,5 +954,5 @@
             nu_value *= nu_value
             nu_value *= -0.5
-            gaussian *= numpy.exp(nu_value)
+            gaussian *= np.exp(nu_value)
             gaussian /= sigma
             # normalize
@@ -1026,6 +1026,6 @@
                                                            offset_x, offset_y)
         # distance [cm] from the beam center on detector plane
-        detector_ind_x = numpy.arange(detector_pix_nums_x)
-        detector_ind_y = numpy.arange(detector_pix_nums_y)
+        detector_ind_x = np.arange(detector_pix_nums_x)
+        detector_ind_y = np.arange(detector_pix_nums_y)
 
         # shif 0.5 pixel so that pix position is at the center of the pixel
@@ -1041,6 +1041,6 @@
         detector_ind_y = detector_ind_y * pix_y_size
 
-        qx_value = numpy.zeros(len(detector_ind_x))
-        qy_value = numpy.zeros(len(detector_ind_y))
+        qx_value = np.zeros(len(detector_ind_x))
+        qy_value = np.zeros(len(detector_ind_y))
         i = 0
 
@@ -1061,8 +1061,8 @@
 
         # p min and max values among the center of pixels
-        self.qx_min = numpy.min(qx_value)
-        self.qx_max = numpy.max(qx_value)
-        self.qy_min = numpy.min(qy_value)
-        self.qy_max = numpy.max(qy_value)
+        self.qx_min = np.min(qx_value)
+        self.qx_max = np.max(qx_value)
+        self.qy_min = np.min(qy_value)
+        self.qy_max = np.max(qy_value)
 
         # Appr. min and max values of the detector display limits
@@ -1088,5 +1088,5 @@
             from sas.sascalc.dataloader.data_info import Data2D
             output = Data2D()
-            inten = numpy.zeros_like(qx_value)
+            inten = np.zeros_like(qx_value)
             output.data = inten
             output.qx_data = qx_value
@@ -1107,6 +1107,6 @@
         plane_dist = dx_size
         # full scattering angle on the x-axis
-        theta = numpy.arctan(plane_dist / det_dist)
-        qx_value = (2.0 * pi / wavelength) * numpy.sin(theta)
+        theta = np.arctan(plane_dist / det_dist)
+        qx_value = (2.0 * pi / wavelength) * np.sin(theta)
         return qx_value
 
Index: src/sas/sascalc/calculator/sas_gen.py
===================================================================
--- src/sas/sascalc/calculator/sas_gen.py	(revision d2fd8fc62a44e402ef17815b5b0bf932d5332ff0)
+++ src/sas/sascalc/calculator/sas_gen.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -7,5 +7,5 @@
 from periodictable import formula
 from periodictable import nsf
-import numpy
+import numpy as np
 import os
 import copy
@@ -80,11 +80,11 @@
         ## Parameter details [units, min, max]
         self.details = {}
-        self.details['scale'] = ['', 0.0, numpy.inf]
-        self.details['background'] = ['[1/cm]', 0.0, numpy.inf]
-        self.details['solvent_SLD'] = ['1/A^(2)', -numpy.inf, numpy.inf]
-        self.details['total_volume'] = ['A^(3)', 0.0, numpy.inf]
+        self.details['scale'] = ['', 0.0, np.inf]
+        self.details['background'] = ['[1/cm]', 0.0, np.inf]
+        self.details['solvent_SLD'] = ['1/A^(2)', -np.inf, np.inf]
+        self.details['total_volume'] = ['A^(3)', 0.0, np.inf]
         self.details['Up_frac_in'] = ['[u/(u+d)]', 0.0, 1.0]
         self.details['Up_frac_out'] = ['[u/(u+d)]', 0.0, 1.0]
-        self.details['Up_theta'] = ['[deg]', -numpy.inf, numpy.inf]
+        self.details['Up_theta'] = ['[deg]', -np.inf, np.inf]
         # fixed parameters
         self.fixed = []
@@ -171,5 +171,5 @@
                 msg = "Not a 1D."
                 raise ValueError, msg
-            i_out = numpy.zeros_like(x[0])
+            i_out = np.zeros_like(x[0])
             # 1D I is found at y =0 in the 2D pattern
             out = self._gen(x[0], [], i_out)
@@ -187,5 +187,5 @@
         """
         if x.__class__.__name__ == 'list':
-            i_out = numpy.zeros_like(x[0])
+            i_out = np.zeros_like(x[0])
             out = self._gen(x[0], x[1], i_out)
             return out
@@ -237,32 +237,32 @@
         self.omfdata = omfdata
         length = int(omfdata.xnodes * omfdata.ynodes * omfdata.znodes)
-        pos_x = numpy.arange(omfdata.xmin,
+        pos_x = np.arange(omfdata.xmin,
                              omfdata.xnodes*omfdata.xstepsize + omfdata.xmin,
                              omfdata.xstepsize)
-        pos_y = numpy.arange(omfdata.ymin,
+        pos_y = np.arange(omfdata.ymin,
                              omfdata.ynodes*omfdata.ystepsize + omfdata.ymin,
                              omfdata.ystepsize)
-        pos_z = numpy.arange(omfdata.zmin,
+        pos_z = np.arange(omfdata.zmin,
                              omfdata.znodes*omfdata.zstepsize + omfdata.zmin,
                              omfdata.zstepsize)
-        self.pos_x = numpy.tile(pos_x, int(omfdata.ynodes * omfdata.znodes))
+        self.pos_x = np.tile(pos_x, int(omfdata.ynodes * omfdata.znodes))
         self.pos_y = pos_y.repeat(int(omfdata.xnodes))
-        self.pos_y = numpy.tile(self.pos_y, int(omfdata.znodes))
+        self.pos_y = np.tile(self.pos_y, int(omfdata.znodes))
         self.pos_z = pos_z.repeat(int(omfdata.xnodes * omfdata.ynodes))
         self.mx = omfdata.mx
         self.my = omfdata.my
         self.mz = omfdata.mz
-        self.sld_n = numpy.zeros(length)
+        self.sld_n = np.zeros(length)
 
         if omfdata.mx == None:
-            self.mx = numpy.zeros(length)
+            self.mx = np.zeros(length)
         if omfdata.my == None:
-            self.my = numpy.zeros(length)
+            self.my = np.zeros(length)
         if omfdata.mz == None:
-            self.mz = numpy.zeros(length)
+            self.mz = np.zeros(length)
 
         self._check_data_length(length)
         self.remove_null_points(False, False)
-        mask = numpy.ones(len(self.sld_n), dtype=bool)
+        mask = np.ones(len(self.sld_n), dtype=bool)
         if shape.lower() == 'ellipsoid':
             try:
@@ -328,6 +328,6 @@
         """
         if remove:
-            is_nonzero = (numpy.fabs(self.mx) + numpy.fabs(self.my) +
-                          numpy.fabs(self.mz)).nonzero()
+            is_nonzero = (np.fabs(self.mx) + np.fabs(self.my) +
+                          np.fabs(self.mz)).nonzero()
             if len(is_nonzero[0]) > 0:
                 self.pos_x = self.pos_x[is_nonzero]
@@ -369,7 +369,7 @@
         """
         desc = ""
-        mx = numpy.zeros(0)
-        my = numpy.zeros(0)
-        mz = numpy.zeros(0)
+        mx = np.zeros(0)
+        my = np.zeros(0)
+        mz = np.zeros(0)
         try:
             input_f = open(path, 'rb')
@@ -389,7 +389,7 @@
                     _my = mag2sld(_my, valueunit)
                     _mz = mag2sld(_mz, valueunit)
-                    mx = numpy.append(mx, _mx)
-                    my = numpy.append(my, _my)
-                    mz = numpy.append(mz, _mz)
+                    mx = np.append(mx, _mx)
+                    my = np.append(my, _my)
+                    mz = np.append(mz, _mz)
                 except:
                     # Skip non-data lines
@@ -501,13 +501,13 @@
         :raise RuntimeError: when the file can't be opened
         """
-        pos_x = numpy.zeros(0)
-        pos_y = numpy.zeros(0)
-        pos_z = numpy.zeros(0)
-        sld_n = numpy.zeros(0)
-        sld_mx = numpy.zeros(0)
-        sld_my = numpy.zeros(0)
-        sld_mz = numpy.zeros(0)
-        vol_pix = numpy.zeros(0)
-        pix_symbol = numpy.zeros(0)
+        pos_x = np.zeros(0)
+        pos_y = np.zeros(0)
+        pos_z = np.zeros(0)
+        sld_n = np.zeros(0)
+        sld_mx = np.zeros(0)
+        sld_my = np.zeros(0)
+        sld_mz = np.zeros(0)
+        vol_pix = np.zeros(0)
+        pix_symbol = np.zeros(0)
         x_line = []
         y_line = []
@@ -543,23 +543,23 @@
                         _pos_y = float(line[38:46].strip())
                         _pos_z = float(line[46:54].strip())
-                        pos_x = numpy.append(pos_x, _pos_x)
-                        pos_y = numpy.append(pos_y, _pos_y)
-                        pos_z = numpy.append(pos_z, _pos_z)
+                        pos_x = np.append(pos_x, _pos_x)
+                        pos_y = np.append(pos_y, _pos_y)
+                        pos_z = np.append(pos_z, _pos_z)
                         try:
                             val = nsf.neutron_sld(atom_name)[0]
                             # sld in Ang^-2 unit
                             val *= 1.0e-6
-                            sld_n = numpy.append(sld_n, val)
+                            sld_n = np.append(sld_n, val)
                             atom = formula(atom_name)
                             # cm to A units
                             vol = 1.0e+24 * atom.mass / atom.density / NA
-                            vol_pix = numpy.append(vol_pix, vol)
+                            vol_pix = np.append(vol_pix, vol)
                         except:
                             print "Error: set the sld of %s to zero"% atom_name
-                            sld_n = numpy.append(sld_n, 0.0)
-                        sld_mx = numpy.append(sld_mx, 0)
-                        sld_my = numpy.append(sld_my, 0)
-                        sld_mz = numpy.append(sld_mz, 0)
-                        pix_symbol = numpy.append(pix_symbol, atom_name)
+                            sld_n = np.append(sld_n, 0.0)
+                        sld_mx = np.append(sld_mx, 0)
+                        sld_my = np.append(sld_my, 0)
+                        sld_mz = np.append(sld_mz, 0)
+                        pix_symbol = np.append(pix_symbol, atom_name)
                     elif line[0:6].strip().count('CONECT') > 0:
                         toks = line.split()
@@ -630,25 +630,25 @@
         """
         try:
-            pos_x = numpy.zeros(0)
-            pos_y = numpy.zeros(0)
-            pos_z = numpy.zeros(0)
-            sld_n = numpy.zeros(0)
-            sld_mx = numpy.zeros(0)
-            sld_my = numpy.zeros(0)
-            sld_mz = numpy.zeros(0)
+            pos_x = np.zeros(0)
+            pos_y = np.zeros(0)
+            pos_z = np.zeros(0)
+            sld_n = np.zeros(0)
+            sld_mx = np.zeros(0)
+            sld_my = np.zeros(0)
+            sld_mz = np.zeros(0)
             try:
                 # Use numpy to speed up loading
-                input_f = numpy.loadtxt(path, dtype='float', skiprows=1,
+                input_f = np.loadtxt(path, dtype='float', skiprows=1,
                                         ndmin=1, unpack=True)
-                pos_x = numpy.array(input_f[0])
-                pos_y = numpy.array(input_f[1])
-                pos_z = numpy.array(input_f[2])
-                sld_n = numpy.array(input_f[3])
-                sld_mx = numpy.array(input_f[4])
-                sld_my = numpy.array(input_f[5])
-                sld_mz = numpy.array(input_f[6])
+                pos_x = np.array(input_f[0])
+                pos_y = np.array(input_f[1])
+                pos_z = np.array(input_f[2])
+                sld_n = np.array(input_f[3])
+                sld_mx = np.array(input_f[4])
+                sld_my = np.array(input_f[5])
+                sld_mz = np.array(input_f[6])
                 ncols = len(input_f)
                 if ncols == 8:
-                    vol_pix = numpy.array(input_f[7])
+                    vol_pix = np.array(input_f[7])
                 elif ncols == 7:
                     vol_pix = None
@@ -669,14 +669,14 @@
                         _sld_my = float(toks[5])
                         _sld_mz = float(toks[6])
-                        pos_x = numpy.append(pos_x, _pos_x)
-                        pos_y = numpy.append(pos_y, _pos_y)
-                        pos_z = numpy.append(pos_z, _pos_z)
-                        sld_n = numpy.append(sld_n, _sld_n)
-                        sld_mx = numpy.append(sld_mx, _sld_mx)
-                        sld_my = numpy.append(sld_my, _sld_my)
-                        sld_mz = numpy.append(sld_mz, _sld_mz)
+                        pos_x = np.append(pos_x, _pos_x)
+                        pos_y = np.append(pos_y, _pos_y)
+                        pos_z = np.append(pos_z, _pos_z)
+                        sld_n = np.append(sld_n, _sld_n)
+                        sld_mx = np.append(sld_mx, _sld_mx)
+                        sld_my = np.append(sld_my, _sld_my)
+                        sld_mz = np.append(sld_mz, _sld_mz)
                         try:
                             _vol_pix = float(toks[7])
-                            vol_pix = numpy.append(vol_pix, _vol_pix)
+                            vol_pix = np.append(vol_pix, _vol_pix)
                         except:
                             vol_pix = None
@@ -712,10 +712,10 @@
         sld_n = data.sld_n
         if sld_n == None:
-            sld_n = numpy.zeros(length)
+            sld_n = np.zeros(length)
         sld_mx = data.sld_mx
         if sld_mx == None:
-            sld_mx = numpy.zeros(length)
-            sld_my = numpy.zeros(length)
-            sld_mz = numpy.zeros(length)
+            sld_mx = np.zeros(length)
+            sld_my = np.zeros(length)
+            sld_mz = np.zeros(length)
         else:
             sld_my = data.sld_my
@@ -893,8 +893,8 @@
             if self.is_data:
                 # For data, put the value to only the pixels w non-zero M
-                is_nonzero = (numpy.fabs(self.sld_mx) +
-                              numpy.fabs(self.sld_my) +
-                              numpy.fabs(self.sld_mz)).nonzero()
-                self.sld_n = numpy.zeros(len(self.pos_x))
+                is_nonzero = (np.fabs(self.sld_mx) +
+                              np.fabs(self.sld_my) +
+                              np.fabs(self.sld_mz)).nonzero()
+                self.sld_n = np.zeros(len(self.pos_x))
                 if len(self.sld_n[is_nonzero]) > 0:
                     self.sld_n[is_nonzero] = sld_n
@@ -903,5 +903,5 @@
             else:
                 # For non-data, put the value to all the pixels
-                self.sld_n = numpy.ones(len(self.pos_x)) * sld_n
+                self.sld_n = np.ones(len(self.pos_x)) * sld_n
         else:
             self.sld_n = sld_n
@@ -912,17 +912,17 @@
         """
         if sld_mx.__class__.__name__ == 'float':
-            self.sld_mx = numpy.ones(len(self.pos_x)) * sld_mx
+            self.sld_mx = np.ones(len(self.pos_x)) * sld_mx
         else:
             self.sld_mx = sld_mx
         if sld_my.__class__.__name__ == 'float':
-            self.sld_my = numpy.ones(len(self.pos_x)) * sld_my
+            self.sld_my = np.ones(len(self.pos_x)) * sld_my
         else:
             self.sld_my = sld_my
         if sld_mz.__class__.__name__ == 'float':
-            self.sld_mz = numpy.ones(len(self.pos_x)) * sld_mz
+            self.sld_mz = np.ones(len(self.pos_x)) * sld_mz
         else:
             self.sld_mz = sld_mz
 
-        sld_m = numpy.sqrt(sld_mx * sld_mx + sld_my * sld_my + \
+        sld_m = np.sqrt(sld_mx * sld_mx + sld_my * sld_my + \
                                 sld_mz * sld_mz)
         self.sld_m = sld_m
@@ -936,5 +936,5 @@
             return
         if symbol.__class__.__name__ == 'str':
-            self.pix_symbol = numpy.repeat(symbol, len(self.sld_n))
+            self.pix_symbol = np.repeat(symbol, len(self.sld_n))
         else:
             self.pix_symbol = symbol
@@ -950,5 +950,5 @@
             self.vol_pix = vol
         elif vol.__class__.__name__.count('float') > 0:
-            self.vol_pix = numpy.repeat(vol, len(self.sld_n))
+            self.vol_pix = np.repeat(vol, len(self.sld_n))
         else:
             self.vol_pix = None
@@ -993,16 +993,16 @@
                 for x_pos in self.pos_x:
                     if xpos_pre != x_pos:
-                        self.xstepsize = numpy.fabs(x_pos - xpos_pre)
+                        self.xstepsize = np.fabs(x_pos - xpos_pre)
                         break
                 for y_pos in self.pos_y:
                     if ypos_pre != y_pos:
-                        self.ystepsize = numpy.fabs(y_pos - ypos_pre)
+                        self.ystepsize = np.fabs(y_pos - ypos_pre)
                         break
                 for z_pos in self.pos_z:
                     if zpos_pre != z_pos:
-                        self.zstepsize = numpy.fabs(z_pos - zpos_pre)
+                        self.zstepsize = np.fabs(z_pos - zpos_pre)
                         break
                 #default pix volume
-                self.vol_pix = numpy.ones(len(self.pos_x))
+                self.vol_pix = np.ones(len(self.pos_x))
                 vol = self.xstepsize * self.ystepsize * self.zstepsize
                 self.set_pixel_volumes(vol)
@@ -1071,14 +1071,14 @@
     y2 = output.pos_y+output.sld_my/max_m * gap
     z2 = output.pos_z+output.sld_mz/max_m * gap
-    x_arrow = numpy.column_stack((output.pos_x, x2))
-    y_arrow = numpy.column_stack((output.pos_y, y2))
-    z_arrow = numpy.column_stack((output.pos_z, z2))
+    x_arrow = np.column_stack((output.pos_x, x2))
+    y_arrow = np.column_stack((output.pos_y, y2))
+    z_arrow = np.column_stack((output.pos_z, z2))
     unit_x2 = output.sld_mx / max_m
     unit_y2 = output.sld_my / max_m
     unit_z2 = output.sld_mz / max_m
-    color_x = numpy.fabs(unit_x2 * 0.8)
-    color_y = numpy.fabs(unit_y2 * 0.8)
-    color_z = numpy.fabs(unit_z2 * 0.8)
-    colors = numpy.column_stack((color_x, color_y, color_z))
+    color_x = np.fabs(unit_x2 * 0.8)
+    color_y = np.fabs(unit_y2 * 0.8)
+    color_z = np.fabs(unit_z2 * 0.8)
+    colors = np.column_stack((color_x, color_y, color_z))
     plt.show()
 
@@ -1103,7 +1103,7 @@
     model = GenSAS()
     model.set_sld_data(foutput.output)
-    x = numpy.arange(1000)/10000. + 1e-5
-    y = numpy.arange(1000)/10000. + 1e-5
-    i = numpy.zeros(1000)
+    x = np.arange(1000)/10000. + 1e-5
+    y = np.arange(1000)/10000. + 1e-5
+    i = np.zeros(1000)
     model.runXY([x, y, i])
 
Index: src/sas/sascalc/calculator/slit_length_calculator.py
===================================================================
--- src/sas/sascalc/calculator/slit_length_calculator.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/calculator/slit_length_calculator.py	(revision bfba720913704ca9ad2c0e91e8f7a68846bf615a)
@@ -16,5 +16,5 @@
         # y data
         self.y = None
-        #default slit length
+        # default slit length
         self.slit_length = 0.0
 
@@ -42,5 +42,5 @@
         """
         # None data do nothing
-        if self.y == None or self.x == None:
+        if self.y is None or self.x is None:
             return
         # set local variable
@@ -54,5 +54,5 @@
         y_sum = 0.0
         y_max = 0.0
-        ind = 0.0
+        ind = 0
 
         # sum 10 or more y values until getting max_y,
@@ -70,5 +70,5 @@
         # defaults
         y_half_d = 0.0
-        ind = 0.0
+        ind = 0
         # find indices where it crosses y = y_half.
         while True:
@@ -81,9 +81,9 @@
 
         # y value and ind just before passed the spot of the half height
-        y_half_u = y[ind-1]
+        y_half_u = y[ind - 1]
 
         # get corresponding x values
         x_half_d = x[ind]
-        x_half_u = x[ind-1]
+        x_half_u = x[ind - 1]
 
         # calculate x at y = y_half using linear interpolation
@@ -91,7 +91,7 @@
             x_half = (x_half_d + x_half_u)/2.0
         else:
-            x_half = (x_half_u * (y_half - y_half_d)  \
-                       + x_half_d * (y_half_u - y_half)) \
-                        / (y_half_u - y_half_d)
+            x_half = ((x_half_u * (y_half - y_half_d)
+                       + x_half_d * (y_half_u - y_half))
+                       / (y_half_u - y_half_d))
 
         # Our slit length is half width, so just give half beam value
Index: src/sas/sascalc/data_util/err1d.py
===================================================================
--- src/sas/sascalc/data_util/err1d.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/data_util/err1d.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -8,5 +8,5 @@
 """
 from __future__ import division  # Get true division
-import numpy
+import numpy as np
 
 
@@ -59,5 +59,5 @@
 def exp(X, varX):
     """Exponentiation with error propagation"""
-    Z = numpy.exp(X)
+    Z = np.exp(X)
     varZ = varX * Z**2
     return Z, varZ
@@ -66,5 +66,5 @@
 def log(X, varX):
     """Logarithm with error propagation"""
-    Z = numpy.log(X)
+    Z = np.log(X)
     varZ = varX / X**2
     return Z, varZ
@@ -73,5 +73,5 @@
 # def pow(X,varX, Y,varY):
 #    Z = X**Y
-#    varZ = (Y**2 * varX/X**2 + varY * numpy.log(X)**2) * Z**2
+#    varZ = (Y**2 * varX/X**2 + varY * np.log(X)**2) * Z**2
 #    return Z,varZ
 #
Index: src/sas/sascalc/data_util/formatnum.py
===================================================================
--- src/sas/sascalc/data_util/formatnum.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/data_util/formatnum.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -40,5 +40,5 @@
 
 import math
-import numpy
+import numpy as np
 __all__ = ['format_uncertainty', 'format_uncertainty_pm',
            'format_uncertainty_compact']
@@ -102,13 +102,13 @@
     """
     # Handle indefinite value
-    if numpy.isinf(value):
+    if np.isinf(value):
         return "inf" if value > 0 else "-inf"
-    if numpy.isnan(value):
+    if np.isnan(value):
         return "NaN"
 
     # Handle indefinite uncertainty
-    if uncertainty is None or uncertainty <= 0 or numpy.isnan(uncertainty):
+    if uncertainty is None or uncertainty <= 0 or np.isnan(uncertainty):
         return "%g" % value
-    if numpy.isinf(uncertainty):
+    if np.isinf(uncertainty):
         if compact:
             return "%.2g(inf)" % value
@@ -279,15 +279,15 @@
 
     # non-finite values
-    assert value_str(-numpy.inf,None) == "-inf"
-    assert value_str(numpy.inf,None) == "inf"
-    assert value_str(numpy.NaN,None) == "NaN"
+    assert value_str(-np.inf,None) == "-inf"
+    assert value_str(np.inf,None) == "inf"
+    assert value_str(np.NaN,None) == "NaN"
     
     # bad or missing uncertainty
-    assert value_str(-1.23567,numpy.NaN) == "-1.23567"
-    assert value_str(-1.23567,-numpy.inf) == "-1.23567"
+    assert value_str(-1.23567,np.NaN) == "-1.23567"
+    assert value_str(-1.23567,-np.inf) == "-1.23567"
     assert value_str(-1.23567,-0.1) == "-1.23567"
     assert value_str(-1.23567,0) == "-1.23567"
     assert value_str(-1.23567,None) == "-1.23567"
-    assert value_str(-1.23567,numpy.inf) == "-1.2(inf)"
+    assert value_str(-1.23567,np.inf) == "-1.2(inf)"
 
 def test_pm():
@@ -410,15 +410,15 @@
 
     # non-finite values
-    assert value_str(-numpy.inf,None) == "-inf"
-    assert value_str(numpy.inf,None) == "inf"
-    assert value_str(numpy.NaN,None) == "NaN"
+    assert value_str(-np.inf,None) == "-inf"
+    assert value_str(np.inf,None) == "inf"
+    assert value_str(np.NaN,None) == "NaN"
     
     # bad or missing uncertainty
-    assert value_str(-1.23567,numpy.NaN) == "-1.23567"
-    assert value_str(-1.23567,-numpy.inf) == "-1.23567"
+    assert value_str(-1.23567,np.NaN) == "-1.23567"
+    assert value_str(-1.23567,-np.inf) == "-1.23567"
     assert value_str(-1.23567,-0.1) == "-1.23567"
     assert value_str(-1.23567,0) == "-1.23567"
     assert value_str(-1.23567,None) == "-1.23567"
-    assert value_str(-1.23567,numpy.inf) == "-1.2 +/- inf"
+    assert value_str(-1.23567,np.inf) == "-1.2 +/- inf"
 
 def test_default():
Index: src/sas/sascalc/data_util/qsmearing.py
===================================================================
--- src/sas/sascalc/data_util/qsmearing.py	(revision c1c9929d6b02699660b0af8a643376612943deb8)
+++ src/sas/sascalc/data_util/qsmearing.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -9,5 +9,4 @@
 #copyright 2008, University of Tennessee
 ######################################################################
-import numpy
 import math
 import logging
@@ -60,8 +59,8 @@
     if data.dx is not None and data.isSesans:
         #if data.dx[0] > 0.0:
-        if numpy.size(data.dx[data.dx <= 0]) == 0:
+        if np.size(data.dx[data.dx <= 0]) == 0:
             _found_sesans = True
         # if data.dx[0] <= 0.0:
-        if numpy.size(data.dx[data.dx <= 0]) > 0:
+        if np.size(data.dx[data.dx <= 0]) > 0:
             raise ValueError('one or more of your dx values are negative, please check the data file!')
 
@@ -121,5 +120,5 @@
         self.resolution = resolution
         if offset is None:
-            offset = numpy.searchsorted(self.resolution.q_calc, self.resolution.q[0])
+            offset = np.searchsorted(self.resolution.q_calc, self.resolution.q[0])
         self.offset = offset
 
@@ -137,5 +136,5 @@
         start, end = first_bin + self.offset, last_bin + self.offset
         q_calc = self.resolution.q_calc
-        iq_calc = numpy.empty_like(q_calc)
+        iq_calc = np.empty_like(q_calc)
         if start > 0:
             iq_calc[:start] = self.model.evalDistribution(q_calc[:start])
@@ -157,6 +156,6 @@
         """
         q = self.resolution.q
-        first = numpy.searchsorted(q, q_min)
-        last = numpy.searchsorted(q, q_max)
+        first = np.searchsorted(q, q_min)
+        last = np.searchsorted(q, q_max)
         return first, min(last,len(q)-1)
 
Index: src/sas/sascalc/data_util/uncertainty.py
===================================================================
--- src/sas/sascalc/data_util/uncertainty.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/data_util/uncertainty.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -17,5 +17,5 @@
 from __future__ import division
 
-import numpy
+import numpy as np
 import err1d
 from formatnum import format_uncertainty
@@ -27,5 +27,5 @@
 class Uncertainty(object):
     # Make standard deviation available
-    def _getdx(self): return numpy.sqrt(self.variance)
+    def _getdx(self): return np.sqrt(self.variance)
     def _setdx(self,dx): 
         # Direct operation
@@ -144,13 +144,13 @@
         return self
     def __abs__(self):
-        return Uncertainty(numpy.abs(self.x),self.variance)
+        return Uncertainty(np.abs(self.x),self.variance)
 
     def __str__(self):
-        #return str(self.x)+" +/- "+str(numpy.sqrt(self.variance))
-        if numpy.isscalar(self.x):
-            return format_uncertainty(self.x,numpy.sqrt(self.variance))
+        #return str(self.x)+" +/- "+str(np.sqrt(self.variance))
+        if np.isscalar(self.x):
+            return format_uncertainty(self.x,np.sqrt(self.variance))
         else:
             return [format_uncertainty(v,dv) 
-                    for v,dv in zip(self.x,numpy.sqrt(self.variance))]
+                    for v,dv in zip(self.x,np.sqrt(self.variance))]
     def __repr__(self):
         return "Uncertainty(%s,%s)"%(str(self.x),str(self.variance))
@@ -287,12 +287,12 @@
     # =============== vector operations ================
     # Slicing
-    z = Uncertainty(numpy.array([1,2,3,4,5]),numpy.array([2,1,2,3,2]))
+    z = Uncertainty(np.array([1,2,3,4,5]),np.array([2,1,2,3,2]))
     assert z[2].x == 3 and z[2].variance == 2
     assert (z[2:4].x == [3,4]).all()
     assert (z[2:4].variance == [2,3]).all()
-    z[2:4] = Uncertainty(numpy.array([8,7]),numpy.array([4,5]))
+    z[2:4] = Uncertainty(np.array([8,7]),np.array([4,5]))
     assert z[2].x == 8 and z[2].variance == 4
-    A = Uncertainty(numpy.array([a.x]*2),numpy.array([a.variance]*2))
-    B = Uncertainty(numpy.array([b.x]*2),numpy.array([b.variance]*2))
+    A = Uncertainty(np.array([a.x]*2),np.array([a.variance]*2))
+    B = Uncertainty(np.array([b.x]*2),np.array([b.variance]*2))
 
     # TODO complete tests of copy and inplace operations for vectors and slices.
Index: src/sas/sascalc/dataloader/data_info.py
===================================================================
--- src/sas/sascalc/dataloader/data_info.py	(revision 2ffe241a82548f1c3017267ebe33cb91ce512e31)
+++ src/sas/sascalc/dataloader/data_info.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -23,5 +23,5 @@
 #from sas.guitools.plottables import Data1D as plottable_1D
 from sas.sascalc.data_util.uncertainty import Uncertainty
-import numpy
+import numpy as np
 import math
 
@@ -51,18 +51,18 @@
 
     def __init__(self, x, y, dx=None, dy=None, dxl=None, dxw=None, lam=None, dlam=None):
-        self.x = numpy.asarray(x)
-        self.y = numpy.asarray(y)
+        self.x = np.asarray(x)
+        self.y = np.asarray(y)
         if dx is not None:
-            self.dx = numpy.asarray(dx)
+            self.dx = np.asarray(dx)
         if dy is not None:
-            self.dy = numpy.asarray(dy)
+            self.dy = np.asarray(dy)
         if dxl is not None:
-            self.dxl = numpy.asarray(dxl)
+            self.dxl = np.asarray(dxl)
         if dxw is not None:
-            self.dxw = numpy.asarray(dxw)
+            self.dxw = np.asarray(dxw)
         if lam is not None:
-            self.lam = numpy.asarray(lam)
+            self.lam = np.asarray(lam)
         if dlam is not None:
-            self.dlam = numpy.asarray(dlam)
+            self.dlam = np.asarray(dlam)
 
     def xaxis(self, label, unit):
@@ -109,14 +109,14 @@
                  qy_data=None, q_data=None, mask=None,
                  dqx_data=None, dqy_data=None):
-        self.data = numpy.asarray(data)
-        self.qx_data = numpy.asarray(qx_data)
-        self.qy_data = numpy.asarray(qy_data)
-        self.q_data = numpy.asarray(q_data)
-        self.mask = numpy.asarray(mask)
-        self.err_data = numpy.asarray(err_data)
+        self.data = np.asarray(data)
+        self.qx_data = np.asarray(qx_data)
+        self.qy_data = np.asarray(qy_data)
+        self.q_data = np.asarray(q_data)
+        self.mask = np.asarray(mask)
+        self.err_data = np.asarray(err_data)
         if dqx_data is not None:
-            self.dqx_data = numpy.asarray(dqx_data)
+            self.dqx_data = np.asarray(dqx_data)
         if dqy_data is not None:
-            self.dqy_data = numpy.asarray(dqy_data)
+            self.dqy_data = np.asarray(dqy_data)
 
     def xaxis(self, label, unit):
@@ -734,5 +734,5 @@
         """
         def _check(v):
-            if (v.__class__ == list or v.__class__ == numpy.ndarray) \
+            if (v.__class__ == list or v.__class__ == np.ndarray) \
                 and len(v) > 0 and min(v) > 0:
                 return True
@@ -752,10 +752,10 @@
 
         if clone is None or not issubclass(clone.__class__, Data1D):
-            x = numpy.zeros(length)
-            dx = numpy.zeros(length)
-            y = numpy.zeros(length)
-            dy = numpy.zeros(length)
-            lam = numpy.zeros(length)
-            dlam = numpy.zeros(length)
+            x = np.zeros(length)
+            dx = np.zeros(length)
+            y = np.zeros(length)
+            dy = np.zeros(length)
+            lam = np.zeros(length)
+            dlam = np.zeros(length)
             clone = Data1D(x, y, lam=lam, dx=dx, dy=dy, dlam=dlam)
 
@@ -806,10 +806,10 @@
             dy_other = other.dy
             if other.dy == None or (len(other.dy) != len(other.y)):
-                dy_other = numpy.zeros(len(other.y))
+                dy_other = np.zeros(len(other.y))
 
         # Check that we have errors, otherwise create zero vector
         dy = self.dy
         if self.dy == None or (len(self.dy) != len(self.y)):
-            dy = numpy.zeros(len(self.y))
+            dy = np.zeros(len(self.y))
 
         return dy, dy_other
@@ -824,9 +824,9 @@
             result.dxw = None
         else:
-            result.dxw = numpy.zeros(len(self.x))
+            result.dxw = np.zeros(len(self.x))
         if self.dxl == None:
             result.dxl = None
         else:
-            result.dxl = numpy.zeros(len(self.x))
+            result.dxl = np.zeros(len(self.x))
 
         for i in range(len(self.x)):
@@ -886,35 +886,35 @@
             result.dy = None
         else:
-            result.dy = numpy.zeros(len(self.x) + len(other.x))
+            result.dy = np.zeros(len(self.x) + len(other.x))
         if self.dx == None or other.dx is None:
             result.dx = None
         else:
-            result.dx = numpy.zeros(len(self.x) + len(other.x))
+            result.dx = np.zeros(len(self.x) + len(other.x))
         if self.dxw == None or other.dxw is None:
             result.dxw = None
         else:
-            result.dxw = numpy.zeros(len(self.x) + len(other.x))
+            result.dxw = np.zeros(len(self.x) + len(other.x))
         if self.dxl == None or other.dxl is None:
             result.dxl = None
         else:
-            result.dxl = numpy.zeros(len(self.x) + len(other.x))
-
-        result.x = numpy.append(self.x, other.x)
+            result.dxl = np.zeros(len(self.x) + len(other.x))
+
+        result.x = np.append(self.x, other.x)
         #argsorting
-        ind = numpy.argsort(result.x)
+        ind = np.argsort(result.x)
         result.x = result.x[ind]
-        result.y = numpy.append(self.y, other.y)
+        result.y = np.append(self.y, other.y)
         result.y = result.y[ind]
         if result.dy != None:
-            result.dy = numpy.append(self.dy, other.dy)
+            result.dy = np.append(self.dy, other.dy)
             result.dy = result.dy[ind]
         if result.dx is not None:
-            result.dx = numpy.append(self.dx, other.dx)
+            result.dx = np.append(self.dx, other.dx)
             result.dx = result.dx[ind]
         if result.dxw is not None:
-            result.dxw = numpy.append(self.dxw, other.dxw)
+            result.dxw = np.append(self.dxw, other.dxw)
             result.dxw = result.dxw[ind]
         if result.dxl is not None:
-            result.dxl = numpy.append(self.dxl, other.dxl)
+            result.dxl = np.append(self.dxl, other.dxl)
             result.dxl = result.dxl[ind]
         return result
@@ -970,10 +970,10 @@
 
         if clone is None or not issubclass(clone.__class__, Data2D):
-            data = numpy.zeros(length)
-            err_data = numpy.zeros(length)
-            qx_data = numpy.zeros(length)
-            qy_data = numpy.zeros(length)
-            q_data = numpy.zeros(length)
-            mask = numpy.zeros(length)
+            data = np.zeros(length)
+            err_data = np.zeros(length)
+            qx_data = np.zeros(length)
+            qy_data = np.zeros(length)
+            q_data = np.zeros(length)
+            mask = np.zeros(length)
             dqx_data = None
             dqy_data = None
@@ -1031,5 +1031,5 @@
             if other.err_data == None or \
                 (len(other.err_data) != len(other.data)):
-                err_other = numpy.zeros(len(other.data))
+                err_other = np.zeros(len(other.data))
 
         # Check that we have errors, otherwise create zero vector
@@ -1037,5 +1037,5 @@
         if self.err_data == None or \
             (len(self.err_data) != len(self.data)):
-            err = numpy.zeros(len(other.data))
+            err = np.zeros(len(other.data))
         return err, err_other
 
@@ -1049,15 +1049,15 @@
         # First, check the data compatibility
         dy, dy_other = self._validity_check(other)
-        result = self.clone_without_data(numpy.size(self.data))
+        result = self.clone_without_data(np.size(self.data))
         if self.dqx_data == None or self.dqy_data == None:
             result.dqx_data = None
             result.dqy_data = None
         else:
-            result.dqx_data = numpy.zeros(len(self.data))
-            result.dqy_data = numpy.zeros(len(self.data))
-        for i in range(numpy.size(self.data)):
+            result.dqx_data = np.zeros(len(self.data))
+            result.dqy_data = np.zeros(len(self.data))
+        for i in range(np.size(self.data)):
             result.data[i] = self.data[i]
             if self.err_data is not None and \
-                numpy.size(self.data) == numpy.size(self.err_data):
+                            np.size(self.data) == np.size(self.err_data):
                 result.err_data[i] = self.err_data[i]
             if self.dqx_data is not None:
@@ -1118,6 +1118,6 @@
         # First, check the data compatibility
         self._validity_check_union(other)
-        result = self.clone_without_data(numpy.size(self.data) + \
-                                         numpy.size(other.data))
+        result = self.clone_without_data(np.size(self.data) + \
+                                         np.size(other.data))
         result.xmin = self.xmin
         result.xmax = self.xmax
@@ -1129,20 +1129,20 @@
             result.dqy_data = None
         else:
-            result.dqx_data = numpy.zeros(len(self.data) + \
-                                         numpy.size(other.data))
-            result.dqy_data = numpy.zeros(len(self.data) + \
-                                         numpy.size(other.data))
-
-        result.data = numpy.append(self.data, other.data)
-        result.qx_data = numpy.append(self.qx_data, other.qx_data)
-        result.qy_data = numpy.append(self.qy_data, other.qy_data)
-        result.q_data = numpy.append(self.q_data, other.q_data)
-        result.mask = numpy.append(self.mask, other.mask)
+            result.dqx_data = np.zeros(len(self.data) + \
+                                       np.size(other.data))
+            result.dqy_data = np.zeros(len(self.data) + \
+                                       np.size(other.data))
+
+        result.data = np.append(self.data, other.data)
+        result.qx_data = np.append(self.qx_data, other.qx_data)
+        result.qy_data = np.append(self.qy_data, other.qy_data)
+        result.q_data = np.append(self.q_data, other.q_data)
+        result.mask = np.append(self.mask, other.mask)
         if result.err_data is not None:
-            result.err_data = numpy.append(self.err_data, other.err_data)
+            result.err_data = np.append(self.err_data, other.err_data)
         if self.dqx_data is not None:
-            result.dqx_data = numpy.append(self.dqx_data, other.dqx_data)
+            result.dqx_data = np.append(self.dqx_data, other.dqx_data)
         if self.dqy_data is not None:
-            result.dqy_data = numpy.append(self.dqy_data, other.dqy_data)
+            result.dqy_data = np.append(self.dqy_data, other.dqy_data)
 
         return result
Index: src/sas/sascalc/dataloader/manipulations.py
===================================================================
--- src/sas/sascalc/dataloader/manipulations.py	(revision b2b3693291d8e49fd33718753161206c1964548c)
+++ src/sas/sascalc/dataloader/manipulations.py	(revision dd11014add466ed4ba0564fcf61e5880d53e6c8b)
@@ -80,5 +80,5 @@
 
     """
-    if data2d.data == None or data2d.x_bins == None or data2d.y_bins == None:
+    if data2d.data is None or data2d.x_bins is None or data2d.y_bins is None:
         raise ValueError, "Can't convert this data: data=None..."
     new_x = numpy.tile(data2d.x_bins, (len(data2d.y_bins), 1))
@@ -90,5 +90,5 @@
     qy_data = new_y.flatten()
     q_data = numpy.sqrt(qx_data * qx_data + qy_data * qy_data)
-    if data2d.err_data == None or numpy.any(data2d.err_data <= 0):
+    if data2d.err_data is None or numpy.any(data2d.err_data <= 0):
         new_err_data = numpy.sqrt(numpy.abs(new_data))
     else:
Index: src/sas/sascalc/dataloader/readers/IgorReader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/IgorReader.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/dataloader/readers/IgorReader.py	(revision dd11014add466ed4ba0564fcf61e5880d53e6c8b)
@@ -13,10 +13,9 @@
 #############################################################################
 import os
-import numpy
-import math
-#import logging
+
 from sas.sascalc.dataloader.data_info import Data2D
 from sas.sascalc.dataloader.data_info import Detector
 from sas.sascalc.dataloader.manipulations import reader2D_converter
+import numpy as np
 
 # Look for unit converter
@@ -40,205 +39,139 @@
         """ Read file """
         if not os.path.isfile(filename):
-            raise ValueError, \
-            "Specified file %s is not a regular file" % filename
-        
-        # Read file
-        f = open(filename, 'r')
-        buf = f.read()
-        
-        # Instantiate data object
+            raise ValueError("Specified file %s is not a regular "
+                             "file" % filename)
+        
         output = Data2D()
+
         output.filename = os.path.basename(filename)
         detector = Detector()
-        if len(output.detector) > 0:
-            print str(output.detector[0])
+        if len(output.detector):
+            print(str(output.detector[0]))
         output.detector.append(detector)
-                
-        # Get content
-        dataStarted = False
-        
-        lines = buf.split('\n')
-        itot = 0
-        x = []
-        y = []
-        
-        ncounts = 0
-        
-        xmin = None
-        xmax = None
-        ymin = None
-        ymax = None
-        
-        i_x = 0
-        i_y = -1
-        i_tot_row = 0
-        
-        isInfo = False
-        isCenter = False
-       
-        data_conv_q = None
-        data_conv_i = None
-        
-        if has_converter == True and output.Q_unit != '1/A':
+
+        data_conv_q = data_conv_i = None
+        
+        if has_converter and output.Q_unit != '1/A':
             data_conv_q = Converter('1/A')
             # Test it
             data_conv_q(1.0, output.Q_unit)
             
-        if has_converter == True and output.I_unit != '1/cm':
+        if has_converter and output.I_unit != '1/cm':
             data_conv_i = Converter('1/cm')
             # Test it
             data_conv_i(1.0, output.I_unit)
-         
-        for line in lines:
-            
-            # Find setup info line
-            if isInfo:
-                isInfo = False
-                line_toks = line.split()
-                # Wavelength in Angstrom
-                try:
-                    wavelength = float(line_toks[1])
-                except:
-                    msg = "IgorReader: can't read this file, missing wavelength"
-                    raise ValueError, msg
-                
-            #Find # of bins in a row assuming the detector is square.
-            if dataStarted == True:
-                try:
-                    value = float(line)
-                except:
-                    # Found a non-float entry, skip it
-                    continue
-                
-                # Get total bin number
-                
-            i_tot_row += 1
-        i_tot_row = math.ceil(math.sqrt(i_tot_row)) - 1
-        #print "i_tot", i_tot_row
-        size_x = i_tot_row  # 192#128
-        size_y = i_tot_row  # 192#128
-        output.data = numpy.zeros([size_x, size_y])
-        output.err_data = numpy.zeros([size_x, size_y])
-     
-        #Read Header and 2D data
-        for line in lines:
-            # Find setup info line
-            if isInfo:
-                isInfo = False
-                line_toks = line.split()
-                # Wavelength in Angstrom
-                try:
-                    wavelength = float(line_toks[1])
-                except:
-                    msg = "IgorReader: can't read this file, missing wavelength"
-                    raise ValueError, msg
-                # Distance in meters
-                try:
-                    distance = float(line_toks[3])
-                except:
-                    msg = "IgorReader: can't read this file, missing distance"
-                    raise ValueError, msg
-                
-                # Distance in meters
-                try:
-                    transmission = float(line_toks[4])
-                except:
-                    msg = "IgorReader: can't read this file, "
-                    msg += "missing transmission"
-                    raise ValueError, msg
-                                            
-            if line.count("LAMBDA") > 0:
-                isInfo = True
-                
-            # Find center info line
-            if isCenter:
-                isCenter = False
-                line_toks = line.split()
-                
-                # Center in bin number: Must substrate 1 because
-                #the index starts from 1
-                center_x = float(line_toks[0]) - 1
-                center_y = float(line_toks[1]) - 1
-
-            if line.count("BCENT") > 0:
-                isCenter = True
-                
-            # Find data start
-            if line.count("***")>0:
-                dataStarted = True
-                
-                # Check that we have all the info
-                if wavelength == None \
-                    or distance == None \
-                    or center_x == None \
-                    or center_y == None:
-                    msg = "IgorReader:Missing information in data file"
-                    raise ValueError, msg
-                
-            if dataStarted == True:
-                try:
-                    value = float(line)
-                except:
-                    # Found a non-float entry, skip it
-                    continue
-                
-                # Get bin number
-                if math.fmod(itot, i_tot_row) == 0:
-                    i_x = 0
-                    i_y += 1
-                else:
-                    i_x += 1
-                    
-                output.data[i_y][i_x] = value
-                ncounts += 1
-                
-                # Det 640 x 640 mm
-                # Q = 4pi/lambda sin(theta/2)
-                # Bin size is 0.5 cm 
-                #REmoved +1 from theta = (i_x-center_x+1)*0.5 / distance
-                # / 100.0 and 
-                #REmoved +1 from theta = (i_y-center_y+1)*0.5 /
-                # distance / 100.0
-                #ToDo: Need  complete check if the following
-                # covert process is consistent with fitting.py.
-                theta = (i_x - center_x) * 0.5 / distance / 100.0
-                qx = 4.0 * math.pi / wavelength * math.sin(theta/2.0)
-
-                if has_converter == True and output.Q_unit != '1/A':
-                    qx = data_conv_q(qx, units=output.Q_unit)
-
-                if xmin == None or qx < xmin:
-                    xmin = qx
-                if xmax == None or qx > xmax:
-                    xmax = qx
-                
-                theta = (i_y - center_y) * 0.5 / distance / 100.0
-                qy = 4.0 * math.pi / wavelength * math.sin(theta / 2.0)
-
-                if has_converter == True and output.Q_unit != '1/A':
-                    qy = data_conv_q(qy, units=output.Q_unit)
-                
-                if ymin == None or qy < ymin:
-                    ymin = qy
-                if ymax == None or qy > ymax:
-                    ymax = qy
-                
-                if not qx in x:
-                    x.append(qx)
-                if not qy in y:
-                    y.append(qy)
-                
-                itot += 1
-                  
-                  
+
+        data_row = 0
+        wavelength = distance = center_x = center_y = None
+        dataStarted = isInfo = isCenter = False
+
+        with open(filename, 'r') as f:
+            for line in f:
+                data_row += 1
+                # Find setup info line
+                if isInfo:
+                    isInfo = False
+                    line_toks = line.split()
+                    # Wavelength in Angstrom
+                    try:
+                        wavelength = float(line_toks[1])
+                    except ValueError:
+                        msg = "IgorReader: can't read this file, missing wavelength"
+                        raise ValueError(msg)
+                    # Distance in meters
+                    try:
+                        distance = float(line_toks[3])
+                    except ValueError:
+                        msg = "IgorReader: can't read this file, missing distance"
+                        raise ValueError(msg)
+
+                    # Distance in meters
+                    try:
+                        transmission = float(line_toks[4])
+                    except:
+                        msg = "IgorReader: can't read this file, "
+                        msg += "missing transmission"
+                        raise ValueError(msg)
+
+                if line.count("LAMBDA"):
+                    isInfo = True
+
+                # Find center info line
+                if isCenter:
+                    isCenter = False
+                    line_toks = line.split()
+
+                    # Center in bin number: Must subtract 1 because
+                    # the index starts from 1
+                    center_x = float(line_toks[0]) - 1
+                    center_y = float(line_toks[1]) - 1
+
+                if line.count("BCENT"):
+                    isCenter = True
+
+                # Find data start
+                if line.count("***"):
+                    # now have to continue to blank line
+                    dataStarted = True
+
+                    # Check that we have all the info
+                    if (wavelength is None
+                            or distance is None
+                            or center_x is None
+                            or center_y is None):
+                        msg = "IgorReader:Missing information in data file"
+                        raise ValueError(msg)
+
+                if dataStarted:
+                    if len(line.rstrip()):
+                        continue
+                    else:
+                        break
+
+        # The data is loaded in row major order (last index changing most
+        # rapidly). However, the original data is in column major order (first
+        # index changing most rapidly). The swap to column major order is done
+        # in reader2D_converter at the end of this method.
+        data = np.loadtxt(filename, skiprows=data_row)
+        size_x = size_y = int(np.rint(np.sqrt(data.size)))
+        output.data = np.reshape(data, (size_x, size_y))
+        output.err_data = np.zeros_like(output.data)
+
+        # Det 640 x 640 mm
+        # Q = 4 * pi/lambda * sin(theta/2)
+        # Bin size is 0.5 cm
+        # Removed +1 from theta = (i_x - center_x + 1)*0.5 / distance
+        # / 100.0 and
+        # Removed +1 from theta = (i_y - center_y + 1)*0.5 /
+        # distance / 100.0
+        # ToDo: Need  complete check if the following
+        # convert process is consistent with fitting.py.
+
+        # calculate qx, qy bin centers of each pixel in the image
+        theta = (np.arange(size_x) - center_x) * 0.5 / distance / 100.
+        qx = 4 * np.pi / wavelength * np.sin(theta/2)
+
+        theta = (np.arange(size_y) - center_y) * 0.5 / distance / 100.
+        qy = 4 * np.pi / wavelength * np.sin(theta/2)
+
+        if has_converter and output.Q_unit != '1/A':
+            qx = data_conv_q(qx, units=output.Q_unit)
+            qy = data_conv_q(qx, units=output.Q_unit)
+
+        xmax = np.max(qx)
+        xmin = np.min(qx)
+        ymax = np.max(qy)
+        ymin = np.min(qy)
+
+        # calculate edge offset in q.
         theta = 0.25 / distance / 100.0
-        xstep = 4.0 * math.pi / wavelength * math.sin(theta / 2.0)
+        xstep = 4.0 * np.pi / wavelength * np.sin(theta / 2.0)
         
         theta = 0.25 / distance / 100.0
-        ystep = 4.0 * math.pi/ wavelength * math.sin(theta / 2.0)
+        ystep = 4.0 * np.pi/ wavelength * np.sin(theta / 2.0)
         
         # Store all data ######################################
         # Store wavelength
-        if has_converter == True and output.source.wavelength_unit != 'A':
+        if has_converter and output.source.wavelength_unit != 'A':
             conv = Converter('A')
             wavelength = conv(wavelength, units=output.source.wavelength_unit)
@@ -246,5 +179,5 @@
 
         # Store distance
-        if has_converter == True and detector.distance_unit != 'm':
+        if has_converter and detector.distance_unit != 'm':
             conv = Converter('m')
             distance = conv(distance, units=detector.distance_unit)
@@ -254,7 +187,7 @@
         output.sample.transmission = transmission
         
-        # Store pixel size
+        # Store pixel size (mm)
         pixel = 5.0
-        if has_converter == True and detector.pixel_size_unit != 'mm':
+        if has_converter and detector.pixel_size_unit != 'mm':
             conv = Converter('mm')
             pixel = conv(pixel, units=detector.pixel_size_unit)
@@ -267,9 +200,9 @@
         
         # Store limits of the image (2D array)
-        xmin = xmin - xstep / 2.0
-        xmax = xmax + xstep / 2.0
-        ymin = ymin - ystep / 2.0
-        ymax = ymax + ystep / 2.0
-        if has_converter == True and output.Q_unit != '1/A':
+        xmin -= xstep / 2.0
+        xmax += xstep / 2.0
+        ymin -= ystep / 2.0
+        ymax += ystep / 2.0
+        if has_converter and output.Q_unit != '1/A':
             xmin = data_conv_q(xmin, units=output.Q_unit)
             xmax = data_conv_q(xmax, units=output.Q_unit)
@@ -282,6 +215,6 @@
         
         # Store x and y axis bin centers
-        output.x_bins = x
-        output.y_bins = y
+        output.x_bins = qx.tolist()
+        output.y_bins = qy.tolist()
         
         # Units
Index: src/sas/sascalc/dataloader/readers/abs_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/abs_reader.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/dataloader/readers/abs_reader.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -9,5 +9,5 @@
 ######################################################################
 
-import numpy
+import numpy as np
 import os
 from sas.sascalc.dataloader.data_info import Data1D
@@ -53,8 +53,8 @@
                 buff = input_f.read()
                 lines = buff.split('\n')
-                x  = numpy.zeros(0)
-                y  = numpy.zeros(0)
-                dy = numpy.zeros(0)
-                dx = numpy.zeros(0)
+                x  = np.zeros(0)
+                y  = np.zeros(0)
+                dy = np.zeros(0)
+                dx = np.zeros(0)
                 output = Data1D(x, y, dy=dy, dx=dx)
                 detector = Detector()
@@ -204,8 +204,8 @@
                                 _dy = data_conv_i(_dy, units=output.y_unit)
                            
-                            x = numpy.append(x, _x)
-                            y = numpy.append(y, _y)
-                            dy = numpy.append(dy, _dy)
-                            dx = numpy.append(dx, _dx)
+                            x = np.append(x, _x)
+                            y = np.append(y, _y)
+                            dy = np.append(dy, _dy)
+                            dx = np.append(dx, _dx)
                             
                         except:
Index: src/sas/sascalc/dataloader/readers/ascii_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/ascii_reader.py	(revision d2471870e414a3166a1caa621a5cf27a07cacb6d)
+++ src/sas/sascalc/dataloader/readers/ascii_reader.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -14,5 +14,5 @@
 
 
-import numpy
+import numpy as np
 import os
 from sas.sascalc.dataloader.data_info import Data1D
@@ -69,8 +69,8 @@
 
                 # Arrays for data storage
-                tx = numpy.zeros(0)
-                ty = numpy.zeros(0)
-                tdy = numpy.zeros(0)
-                tdx = numpy.zeros(0)
+                tx = np.zeros(0)
+                ty = np.zeros(0)
+                tdy = np.zeros(0)
+                tdx = np.zeros(0)
 
                 # The first good line of data will define whether
@@ -140,17 +140,17 @@
                             is_data == False:
                             try:
-                                tx = numpy.zeros(0)
-                                ty = numpy.zeros(0)
-                                tdy = numpy.zeros(0)
-                                tdx = numpy.zeros(0)
+                                tx = np.zeros(0)
+                                ty = np.zeros(0)
+                                tdy = np.zeros(0)
+                                tdx = np.zeros(0)
                             except:
                                 pass
 
                         if has_error_dy == True:
-                            tdy = numpy.append(tdy, _dy)
+                            tdy = np.append(tdy, _dy)
                         if has_error_dx == True:
-                            tdx = numpy.append(tdx, _dx)
-                        tx = numpy.append(tx, _x)
-                        ty = numpy.append(ty, _y)
+                            tdx = np.append(tdx, _dx)
+                        tx = np.append(tx, _x)
+                        ty = np.append(ty, _y)
 
                         #To remember the # of columns on the current line
@@ -188,9 +188,9 @@
                 #Let's re-order the data to make cal.
                 # curve look better some cases
-                ind = numpy.lexsort((ty, tx))
-                x = numpy.zeros(len(tx))
-                y = numpy.zeros(len(ty))
-                dy = numpy.zeros(len(tdy))
-                dx = numpy.zeros(len(tdx))
+                ind = np.lexsort((ty, tx))
+                x = np.zeros(len(tx))
+                y = np.zeros(len(ty))
+                dy = np.zeros(len(tdy))
+                dx = np.zeros(len(tdx))
                 output = Data1D(x, y, dy=dy, dx=dx)
                 self.filename = output.filename = basename
@@ -212,7 +212,7 @@
                 output.y = y[x != 0]
                 output.dy = dy[x != 0] if has_error_dy == True\
-                    else numpy.zeros(len(output.y))
+                    else np.zeros(len(output.y))
                 output.dx = dx[x != 0] if has_error_dx == True\
-                    else numpy.zeros(len(output.x))
+                    else np.zeros(len(output.x))
 
                 output.xaxis("\\rm{Q}", 'A^{-1}')
Index: src/sas/sascalc/dataloader/readers/cansas_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/cansas_reader.py	(revision c221349bffb81e7d2d9ea29d4fc752f92190c7cc)
+++ src/sas/sascalc/dataloader/readers/cansas_reader.py	(revision 8434365120d0b226f06367f64c21b3bc835e1db5)
@@ -930,5 +930,6 @@
             self._write_data(datainfo, entry_node)
         # Transmission Spectrum Info
-        self._write_trans_spectrum(datainfo, entry_node)
+        # TODO: fix the writer to linearize all data, including T_spectrum
+        # self._write_trans_spectrum(datainfo, entry_node)
         # Sample info
         self._write_sample_info(datainfo, entry_node)
Index: src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py
===================================================================
--- src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py	(revision d0764bfab02091109657cd6607dbfb337e7542f3)
+++ src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py	(revision d0764bfab02091109657cd6607dbfb337e7542f3)
@@ -9,18 +9,20 @@
 import sys
 
-from sas.sascalc.dataloader.data_info import plottable_1D, plottable_2D, Data1D, Data2D, DataInfo, Process, Aperture
-from sas.sascalc.dataloader.data_info import Collimation, TransmissionSpectrum, Detector
+from sas.sascalc.dataloader.data_info import plottable_1D, plottable_2D,\
+    Data1D, Data2D, DataInfo, Process, Aperture, Collimation, \
+    TransmissionSpectrum, Detector
 from sas.sascalc.dataloader.data_info import combine_data_info_with_plottable
-
 
 
 class Reader():
     """
-    A class for reading in CanSAS v2.0 data files. The existing iteration opens Mantid generated HDF5 formatted files
-    with file extension .h5/.H5. Any number of data sets may be present within the file and any dimensionality of data
-    may be used. Currently 1D and 2D SAS data sets are supported, but future implementations will include 1D and 2D
-    SESANS data.
-
-    Any number of SASdata sets may be present in a SASentry and the data within can be either 1D I(Q) or 2D I(Qx, Qy).
+    A class for reading in CanSAS v2.0 data files. The existing iteration opens
+    Mantid generated HDF5 formatted files with file extension .h5/.H5. Any
+    number of data sets may be present within the file and any dimensionality
+    of data may be used. Currently 1D and 2D SAS data sets are supported, but
+    future implementations will include 1D and 2D SESANS data.
+
+    Any number of SASdata sets may be present in a SASentry and the data within
+    can be either 1D I(Q) or 2D I(Qx, Qy).
 
     Also supports reading NXcanSAS formatted HDF5 files
@@ -30,29 +32,29 @@
     """
 
-    ## CanSAS version
+    # CanSAS version
     cansas_version = 2.0
-    ## Logged warnings or messages
+    # Logged warnings or messages
     logging = None
-    ## List of errors for the current data set
+    # List of errors for the current data set
     errors = None
-    ## Raw file contents to be processed
+    # Raw file contents to be processed
     raw_data = None
-    ## Data info currently being read in
+    # Data info currently being read in
     current_datainfo = None
-    ## SASdata set currently being read in
+    # SASdata set currently being read in
     current_dataset = None
-    ## List of plottable1D objects that should be linked to the current_datainfo
+    # List of plottable1D objects that should be linked to the current_datainfo
     data1d = None
-    ## List of plottable2D objects that should be linked to the current_datainfo
+    # List of plottable2D objects that should be linked to the current_datainfo
     data2d = None
-    ## Data type name
+    # Data type name
     type_name = "CanSAS 2.0"
-    ## Wildcards
+    # Wildcards
     type = ["CanSAS 2.0 HDF5 Files (*.h5)|*.h5"]
-    ## List of allowed extensions
+    # List of allowed extensions
     ext = ['.h5', '.H5']
-    ## Flag to bypass extension check
+    # Flag to bypass extension check
     allow_all = True
-    ## List of files to return
+    # List of files to return
     output = None
 
@@ -64,7 +66,7 @@
         :return: List of Data1D/2D objects and/or a list of errors.
         """
-        ## Reinitialize the class when loading a new data file to reset all class variables
+        # Reinitialize when loading a new data file to reset all class variables
         self.reset_class_variables()
-        ## Check that the file exists
+        # Check that the file exists
         if os.path.isfile(filename):
             basename = os.path.basename(filename)
@@ -72,13 +74,13 @@
             # If the file type is not allowed, return empty list
             if extension in self.ext or self.allow_all:
-                ## Load the data file
+                # Load the data file
                 self.raw_data = h5py.File(filename, 'r')
-                ## Read in all child elements of top level SASroot
+                # Read in all child elements of top level SASroot
                 self.read_children(self.raw_data, [])
-                ## Add the last data set to the list of outputs
+                # Add the last data set to the list of outputs
                 self.add_data_set()
-                ## Close the data file
+                # Close the data file
                 self.raw_data.close()
-        ## Return data set(s)
+        # Return data set(s)
         return self.output
 
@@ -110,7 +112,7 @@
         """
 
-        ## Loop through each element of the parent and process accordingly
+        # Loop through each element of the parent and process accordingly
         for key in data.keys():
-            ## Get all information for the current key
+            # Get all information for the current key
             value = data.get(key)
             if value.attrs.get(u'canSAS_class') is not None:
@@ -126,10 +128,11 @@
                 self.parent_class = class_name
                 parent_list.append(key)
-                ## If this is a new sasentry, store the current data sets and create a fresh Data1D/2D object
+                # If a new sasentry, store the current data sets and create
+                # a fresh Data1D/2D object
                 if class_prog.match(u'SASentry'):
                     self.add_data_set(key)
                 elif class_prog.match(u'SASdata'):
                     self._initialize_new_data_set(parent_list)
-                ## Recursion step to access data within the group
+                # Recursion step to access data within the group
                 self.read_children(value, parent_list)
                 self.add_intermediate()
@@ -137,11 +140,11 @@
 
             elif isinstance(value, h5py.Dataset):
-                ## If this is a dataset, store the data appropriately
+                # If this is a dataset, store the data appropriately
                 data_set = data[key][:]
                 unit = self._get_unit(value)
 
-                ## I and Q Data
+                # I and Q Data
                 if key == u'I':
-                    if type(self.current_dataset) is plottable_2D:
+                    if isinstance(self.current_dataset, plottable_2D):
                         self.current_dataset.data = data_set
                         self.current_dataset.zaxis("Intensity", unit)
@@ -151,5 +154,5 @@
                     continue
                 elif key == u'Idev':
-                    if type(self.current_dataset) is plottable_2D:
+                    if isinstance(self.current_dataset, plottable_2D):
                         self.current_dataset.err_data = data_set.flatten()
                     else:
@@ -158,5 +161,5 @@
                 elif key == u'Q':
                     self.current_dataset.xaxis("Q", unit)
-                    if type(self.current_dataset) is plottable_2D:
+                    if isinstance(self.current_dataset, plottable_2D):
                         self.current_dataset.q = data_set.flatten()
                     else:
@@ -166,4 +169,10 @@
                     self.current_dataset.dx = data_set.flatten()
                     continue
+                elif key == u'dQw':
+                    self.current_dataset.dxw = data_set.flatten()
+                    continue
+                elif key == u'dQl':
+                    self.current_dataset.dxl = data_set.flatten()
+                    continue
                 elif key == u'Qy':
                     self.current_dataset.yaxis("Q_y", unit)
@@ -183,7 +192,21 @@
                     self.current_dataset.mask = data_set.flatten()
                     continue
+                # Transmission Spectrum
+                elif (key == u'T'
+                      and self.parent_class == u'SAStransmission_spectrum'):
+                    self.trans_spectrum.transmission = data_set.flatten()
+                    continue
+                elif (key == u'Tdev'
+                      and self.parent_class == u'SAStransmission_spectrum'):
+                    self.trans_spectrum.transmission_deviation = \
+                        data_set.flatten()
+                    continue
+                elif (key == u'lambda'
+                      and self.parent_class == u'SAStransmission_spectrum'):
+                    self.trans_spectrum.wavelength = data_set.flatten()
+                    continue
 
                 for data_point in data_set:
-                    ## Top Level Meta Data
+                    # Top Level Meta Data
                     if key == u'definition':
                         self.current_datainfo.meta_data['reader'] = data_point
@@ -201,28 +224,42 @@
                         self.current_datainfo.notes.append(data_point)
 
-                    ## Sample Information
-                    elif key == u'Title' and self.parent_class == u'SASsample': # CanSAS 2.0 format
+                    # Sample Information
+                    # CanSAS 2.0 format
+                    elif key == u'Title' and self.parent_class == u'SASsample':
                         self.current_datainfo.sample.name = data_point
-                    elif key == u'ID' and self.parent_class == u'SASsample': # NXcanSAS format
+                    # NXcanSAS format
+                    elif key == u'name' and self.parent_class == u'SASsample':
                         self.current_datainfo.sample.name = data_point
-                    elif key == u'thickness' and self.parent_class == u'SASsample':
+                    # NXcanSAS format
+                    elif key == u'ID' and self.parent_class == u'SASsample':
+                        self.current_datainfo.sample.name = data_point
+                    elif (key == u'thickness'
+                          and self.parent_class == u'SASsample'):
                         self.current_datainfo.sample.thickness = data_point
-                    elif key == u'temperature' and self.parent_class == u'SASsample':
+                    elif (key == u'temperature'
+                          and self.parent_class == u'SASsample'):
                         self.current_datainfo.sample.temperature = data_point
-                    elif key == u'transmission' and self.parent_class == u'SASsample':
+                    elif (key == u'transmission'
+                          and self.parent_class == u'SASsample'):
                         self.current_datainfo.sample.transmission = data_point
-                    elif key == u'x_position' and self.parent_class == u'SASsample':
+                    elif (key == u'x_position'
+                          and self.parent_class == u'SASsample'):
                         self.current_datainfo.sample.position.x = data_point
-                    elif key == u'y_position' and self.parent_class == u'SASsample':
+                    elif (key == u'y_position'
+                          and self.parent_class == u'SASsample'):
                         self.current_datainfo.sample.position.y = data_point
-                    elif key == u'polar_angle' and self.parent_class == u'SASsample':
+                    elif key == u'pitch' and self.parent_class == u'SASsample':
                         self.current_datainfo.sample.orientation.x = data_point
-                    elif key == u'azimuthal_angle' and self.parent_class == u'SASsample':
+                    elif key == u'yaw' and self.parent_class == u'SASsample':
+                        self.current_datainfo.sample.orientation.y = data_point
+                    elif key == u'roll' and self.parent_class == u'SASsample':
                         self.current_datainfo.sample.orientation.z = data_point
-                    elif key == u'details' and self.parent_class == u'SASsample':
+                    elif (key == u'details'
+                          and self.parent_class == u'SASsample'):
                         self.current_datainfo.sample.details.append(data_point)
 
-                    ## Instrumental Information
-                    elif key == u'name' and self.parent_class == u'SASinstrument':
+                    # Instrumental Information
+                    elif (key == u'name'
+                          and self.parent_class == u'SASinstrument'):
                         self.current_datainfo.instrument = data_point
                     elif key == u'name' and self.parent_class == u'SASdetector':
@@ -231,102 +268,134 @@
                         self.detector.distance = float(data_point)
                         self.detector.distance_unit = unit
-                    elif key == u'slit_length' and self.parent_class == u'SASdetector':
+                    elif (key == u'slit_length'
+                          and self.parent_class == u'SASdetector'):
                         self.detector.slit_length = float(data_point)
                         self.detector.slit_length_unit = unit
-                    elif key == u'x_position' and self.parent_class == u'SASdetector':
+                    elif (key == u'x_position'
+                          and self.parent_class == u'SASdetector'):
                         self.detector.offset.x = float(data_point)
                         self.detector.offset_unit = unit
-                    elif key == u'y_position' and self.parent_class == u'SASdetector':
+                    elif (key == u'y_position'
+                          and self.parent_class == u'SASdetector'):
                         self.detector.offset.y = float(data_point)
                         self.detector.offset_unit = unit
-                    elif key == u'polar_angle' and self.parent_class == u'SASdetector':
+                    elif (key == u'pitch'
+                          and self.parent_class == u'SASdetector'):
                         self.detector.orientation.x = float(data_point)
                         self.detector.orientation_unit = unit
-                    elif key == u'azimuthal_angle' and self.parent_class == u'SASdetector':
+                    elif key == u'roll' and self.parent_class == u'SASdetector':
                         self.detector.orientation.z = float(data_point)
                         self.detector.orientation_unit = unit
-                    elif key == u'beam_center_x' and self.parent_class == u'SASdetector':
+                    elif key == u'yaw' and self.parent_class == u'SASdetector':
+                        self.detector.orientation.y = float(data_point)
+                        self.detector.orientation_unit = unit
+                    elif (key == u'beam_center_x'
+                          and self.parent_class == u'SASdetector'):
                         self.detector.beam_center.x = float(data_point)
                         self.detector.beam_center_unit = unit
-                    elif key == u'beam_center_y' and self.parent_class == u'SASdetector':
+                    elif (key == u'beam_center_y'
+                          and self.parent_class == u'SASdetector'):
                         self.detector.beam_center.y = float(data_point)
                         self.detector.beam_center_unit = unit
-                    elif key == u'x_pixel_size' and self.parent_class == u'SASdetector':
+                    elif (key == u'x_pixel_size'
+                          and self.parent_class == u'SASdetector'):
                         self.detector.pixel_size.x = float(data_point)
                         self.detector.pixel_size_unit = unit
-                    elif key == u'y_pixel_size' and self.parent_class == u'SASdetector':
+                    elif (key == u'y_pixel_size'
+                          and self.parent_class == u'SASdetector'):
                         self.detector.pixel_size.y = float(data_point)
                         self.detector.pixel_size_unit = unit
-                    elif key == u'SSD' and self.parent_class == u'SAScollimation':
+                    elif (key == u'distance'
+                          and self.parent_class == u'SAScollimation'):
                         self.collimation.length = data_point
                         self.collimation.length_unit = unit
-                    elif key == u'name' and self.parent_class == u'SAScollimation':
+                    elif (key == u'name'
+                          and self.parent_class == u'SAScollimation'):
                         self.collimation.name = data_point
-
-                    ## Process Information
-                    elif key == u'name' and self.parent_class == u'SASprocess':
+                    elif (key == u'shape'
+                          and self.parent_class == u'SASaperture'):
+                        self.aperture.shape = data_point
+                    elif (key == u'x_gap'
+                          and self.parent_class == u'SASaperture'):
+                        self.aperture.size.x = data_point
+                    elif (key == u'y_gap'
+                          and self.parent_class == u'SASaperture'):
+                        self.aperture.size.y = data_point
+
+                    # Process Information
+                    elif (key == u'Title'
+                          and self.parent_class == u'SASprocess'): # CanSAS 2.0
                         self.process.name = data_point
-                    elif key == u'Title' and self.parent_class == u'SASprocess': # CanSAS 2.0 format
+                    elif (key == u'name'
+                          and self.parent_class == u'SASprocess'): # NXcanSAS
                         self.process.name = data_point
-                    elif key == u'name' and self.parent_class == u'SASprocess': # NXcanSAS format
-                        self.process.name = data_point
-                    elif key == u'description' and self.parent_class == u'SASprocess':
+                    elif (key == u'description'
+                          and self.parent_class == u'SASprocess'):
                         self.process.description = data_point
                     elif key == u'date' and self.parent_class == u'SASprocess':
                         self.process.date = data_point
+                    elif key == u'term' and self.parent_class == u'SASprocess':
+                        self.process.term = data_point
                     elif self.parent_class == u'SASprocess':
                         self.process.notes.append(data_point)
 
-                    ## Transmission Spectrum
-                    elif key == u'T' and self.parent_class == u'SAStransmission_spectrum':
-                        self.trans_spectrum.transmission.append(data_point)
-                    elif key == u'Tdev' and self.parent_class == u'SAStransmission_spectrum':
-                        self.trans_spectrum.transmission_deviation.append(data_point)
-                    elif key == u'lambda' and self.parent_class == u'SAStransmission_spectrum':
-                        self.trans_spectrum.wavelength.append(data_point)
-
-                    ## Source
-                    elif key == u'wavelength' and self.parent_class == u'SASdata':
+                    # Source
+                    elif (key == u'wavelength'
+                          and self.parent_class == u'SASdata'):
                         self.current_datainfo.source.wavelength = data_point
                         self.current_datainfo.source.wavelength_unit = unit
-                    elif key == u'incident_wavelength' and self.parent_class == u'SASsource':
+                    elif (key == u'incident_wavelength'
+                          and self.parent_class == 'SASsource'):
                         self.current_datainfo.source.wavelength = data_point
                         self.current_datainfo.source.wavelength_unit = unit
-                    elif key == u'wavelength_max' and self.parent_class == u'SASsource':
+                    elif (key == u'wavelength_max'
+                          and self.parent_class == u'SASsource'):
                         self.current_datainfo.source.wavelength_max = data_point
                         self.current_datainfo.source.wavelength_max_unit = unit
-                    elif key == u'wavelength_min' and self.parent_class == u'SASsource':
+                    elif (key == u'wavelength_min'
+                          and self.parent_class == u'SASsource'):
                         self.current_datainfo.source.wavelength_min = data_point
                         self.current_datainfo.source.wavelength_min_unit = unit
-                    elif key == u'wavelength_spread' and self.parent_class == u'SASsource':
-                        self.current_datainfo.source.wavelength_spread = data_point
-                        self.current_datainfo.source.wavelength_spread_unit = unit
-                    elif key == u'beam_size_x' and self.parent_class == u'SASsource':
+                    elif (key == u'incident_wavelength_spread'
+                          and self.parent_class == u'SASsource'):
+                        self.current_datainfo.source.wavelength_spread = \
+                            data_point
+                        self.current_datainfo.source.wavelength_spread_unit = \
+                            unit
+                    elif (key == u'beam_size_x'
+                          and self.parent_class == u'SASsource'):
                         self.current_datainfo.source.beam_size.x = data_point
                         self.current_datainfo.source.beam_size_unit = unit
-                    elif key == u'beam_size_y' and self.parent_class == u'SASsource':
+                    elif (key == u'beam_size_y'
+                          and self.parent_class == u'SASsource'):
                         self.current_datainfo.source.beam_size.y = data_point
                         self.current_datainfo.source.beam_size_unit = unit
-                    elif key == u'beam_shape' and self.parent_class == u'SASsource':
+                    elif (key == u'beam_shape'
+                          and self.parent_class == u'SASsource'):
                         self.current_datainfo.source.beam_shape = data_point
-                    elif key == u'radiation' and self.parent_class == u'SASsource':
+                    elif (key == u'radiation'
+                          and self.parent_class == u'SASsource'):
                         self.current_datainfo.source.radiation = data_point
-                    elif key == u'transmission' and self.parent_class == u'SASdata':
+                    elif (key == u'transmission'
+                          and self.parent_class == u'SASdata'):
                         self.current_datainfo.sample.transmission = data_point
 
-                    ## Everything else goes in meta_data
+                    # Everything else goes in meta_data
                     else:
-                        new_key = self._create_unique_key(self.current_datainfo.meta_data, key)
+                        new_key = self._create_unique_key(
+                            self.current_datainfo.meta_data, key)
                         self.current_datainfo.meta_data[new_key] = data_point
 
             else:
-                ## I don't know if this reachable code
+                # I don't know if this reachable code
                 self.errors.add("ShouldNeverHappenException")
 
     def add_intermediate(self):
         """
-        This method stores any intermediate objects within the final data set after fully reading the set.
-
-        :param parent: The NXclass name for the h5py Group object that just finished being processed
+        This method stores any intermediate objects within the final data set
+        after fully reading the set.
+
+        :param parent: The NXclass name for the h5py Group object that just
+                       finished being processed
         """
 
@@ -347,16 +416,17 @@
             self.aperture = Aperture()
         elif self.parent_class == u'SASdata':
-            if type(self.current_dataset) is plottable_2D:
+            if isinstance(self.current_dataset, plottable_2D):
                 self.data2d.append(self.current_dataset)
-            elif type(self.current_dataset) is plottable_1D:
+            elif isinstance(self.current_dataset, plottable_1D):
                 self.data1d.append(self.current_dataset)
 
     def final_data_cleanup(self):
         """
-        Does some final cleanup and formatting on self.current_datainfo and all data1D and data2D objects and then
-        combines the data and info into Data1D and Data2D objects
-        """
-
-        ## Type cast data arrays to float64
+        Does some final cleanup and formatting on self.current_datainfo and
+        all data1D and data2D objects and then combines the data and info into
+        Data1D and Data2D objects
+        """
+
+        # Type cast data arrays to float64
         if len(self.current_datainfo.trans_spectrum) > 0:
             spectrum_list = []
@@ -364,6 +434,8 @@
                 spectrum.transmission = np.delete(spectrum.transmission, [0])
                 spectrum.transmission = spectrum.transmission.astype(np.float64)
-                spectrum.transmission_deviation = np.delete(spectrum.transmission_deviation, [0])
-                spectrum.transmission_deviation = spectrum.transmission_deviation.astype(np.float64)
+                spectrum.transmission_deviation = np.delete(
+                    spectrum.transmission_deviation, [0])
+                spectrum.transmission_deviation = \
+                    spectrum.transmission_deviation.astype(np.float64)
                 spectrum.wavelength = np.delete(spectrum.wavelength, [0])
                 spectrum.wavelength = spectrum.wavelength.astype(np.float64)
@@ -372,10 +444,10 @@
             self.current_datainfo.trans_spectrum = spectrum_list
 
-        ## Append errors to dataset and reset class errors
+        # Append errors to dataset and reset class errors
         self.current_datainfo.errors = self.errors
         self.errors.clear()
 
-        ## Combine all plottables with datainfo and append each to output
-        ## Type cast data arrays to float64 and find min/max as appropriate
+        # Combine all plottables with datainfo and append each to output
+        # Type cast data arrays to float64 and find min/max as appropriate
         for dataset in self.data2d:
             dataset.data = dataset.data.astype(np.float64)
@@ -397,13 +469,16 @@
             zeros = np.ones(dataset.data.size, dtype=bool)
             try:
-                for i in range (0, dataset.mask.size - 1):
+                for i in range(0, dataset.mask.size - 1):
                     zeros[i] = dataset.mask[i]
             except:
                 self.errors.add(sys.exc_value)
             dataset.mask = zeros
-            ## Calculate the actual Q matrix
+            # Calculate the actual Q matrix
             try:
                 if dataset.q_data.size <= 1:
-                    dataset.q_data = np.sqrt(dataset.qx_data * dataset.qx_data + dataset.qy_data * dataset.qy_data)
+                    dataset.q_data = np.sqrt(dataset.qx_data
+                                             * dataset.qx_data
+                                             + dataset.qy_data
+                                             * dataset.qy_data)
             except:
                 dataset.q_data = None
@@ -415,5 +490,6 @@
                 dataset.data = dataset.data.flatten()
 
-            final_dataset = combine_data_info_with_plottable(dataset, self.current_datainfo)
+            final_dataset = combine_data_info_with_plottable(
+                dataset, self.current_datainfo)
             self.output.append(final_dataset)
 
@@ -435,11 +511,13 @@
             if dataset.dy is not None:
                 dataset.dy = dataset.dy.astype(np.float64)
-            final_dataset = combine_data_info_with_plottable(dataset, self.current_datainfo)
+            final_dataset = combine_data_info_with_plottable(
+                dataset, self.current_datainfo)
             self.output.append(final_dataset)
 
     def add_data_set(self, key=""):
         """
-        Adds the current_dataset to the list of outputs after preforming final processing on the data and then calls a
-        private method to generate a new data set.
+        Adds the current_dataset to the list of outputs after preforming final
+        processing on the data and then calls a private method to generate a
+        new data set.
 
         :param key: NeXus group name for current tree level
@@ -453,8 +531,9 @@
 
 
-    def _initialize_new_data_set(self, parent_list = None):
-        """
-        A private class method to generate a new 1D or 2D data object based on the type of data within the set.
-        Outside methods should call add_data_set() to be sure any existing data is stored properly.
+    def _initialize_new_data_set(self, parent_list=None):
+        """
+        A private class method to generate a new 1D or 2D data object based on
+        the type of data within the set. Outside methods should call
+        add_data_set() to be sure any existing data is stored properly.
 
         :param parent_list: List of names of parent elements
@@ -473,7 +552,8 @@
     def _find_intermediate(self, parent_list, basename=""):
         """
-        A private class used to find an entry by either using a direct key or knowing the approximate basename.
-
-        :param parent_list: List of parents to the current level in the HDF5 file
+        A private class used to find an entry by either using a direct key or
+        knowing the approximate basename.
+
+        :param parent_list: List of parents nodes in the HDF5 file
         :param basename: Approximate name of an entry to search for
         :return:
@@ -486,5 +566,5 @@
             top = top.get(parent)
         for key in top.keys():
-            if (key_prog.match(key)):
+            if key_prog.match(key):
                 entry = True
                 break
@@ -516,7 +596,7 @@
         """
         unit = value.attrs.get(u'units')
-        if unit == None:
+        if unit is None:
             unit = value.attrs.get(u'unit')
-        ## Convert the unit formats
+        # Convert the unit formats
         if unit == "1/A":
             unit = "A^{-1}"
Index: src/sas/sascalc/dataloader/readers/danse_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/danse_reader.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/dataloader/readers/danse_reader.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -15,5 +15,5 @@
 import os
 import sys
-import numpy
+import numpy as np
 import logging
 from sas.sascalc.dataloader.data_info import Data2D, Detector
@@ -79,6 +79,6 @@
             output.detector.append(detector)
             
-            output.data = numpy.zeros([size_x,size_y])
-            output.err_data = numpy.zeros([size_x, size_y])
+            output.data = np.zeros([size_x,size_y])
+            output.err_data = np.zeros([size_x, size_y])
             
             data_conv_q = None
Index: src/sas/sascalc/dataloader/readers/hfir1d_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/hfir1d_reader.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/dataloader/readers/hfir1d_reader.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -9,5 +9,5 @@
 #copyright 2008, University of Tennessee
 ######################################################################
-import numpy
+import numpy as np
 import os
 from sas.sascalc.dataloader.data_info import Data1D
@@ -52,8 +52,8 @@
                 buff = input_f.read()
                 lines = buff.split('\n')
-                x = numpy.zeros(0)
-                y = numpy.zeros(0)
-                dx = numpy.zeros(0)
-                dy = numpy.zeros(0)
+                x = np.zeros(0)
+                y = np.zeros(0)
+                dx = np.zeros(0)
+                dy = np.zeros(0)
                 output = Data1D(x, y, dx=dx, dy=dy)
                 self.filename = output.filename = basename
@@ -88,8 +88,8 @@
                             _dy = data_conv_i(_dy, units=output.y_unit)
                                                     
-                        x = numpy.append(x, _x)
-                        y = numpy.append(y, _y)
-                        dx = numpy.append(dx, _dx)
-                        dy = numpy.append(dy, _dy)
+                        x = np.append(x, _x)
+                        y = np.append(y, _y)
+                        dx = np.append(dx, _dx)
+                        dy = np.append(dy, _dy)
                     except:
                         # Couldn't parse this line, skip it 
Index: src/sas/sascalc/dataloader/readers/red2d_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/red2d_reader.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/dataloader/readers/red2d_reader.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -10,5 +10,5 @@
 ######################################################################
 import os
-import numpy
+import numpy as np
 import math
 from sas.sascalc.dataloader.data_info import Data2D, Detector
@@ -198,8 +198,8 @@
                 break
         # Make numpy array to remove header lines using index
-        lines_array = numpy.array(lines)
+        lines_array = np.array(lines)
 
         # index for lines_array
-        lines_index = numpy.arange(len(lines))
+        lines_index = np.arange(len(lines))
         
         # get the data lines
@@ -225,5 +225,5 @@
 
         # numpy array form
-        data_array = numpy.array(data_list1)
+        data_array = np.array(data_list1)
         # Redimesion based on the row_num and col_num,
         #otherwise raise an error.
@@ -235,9 +235,9 @@
         ## Get the all data: Let's HARDcoding; Todo find better way
         # Defaults
-        dqx_data = numpy.zeros(0)
-        dqy_data = numpy.zeros(0)
-        err_data = numpy.ones(row_num)
-        qz_data = numpy.zeros(row_num)
-        mask = numpy.ones(row_num, dtype=bool)
+        dqx_data = np.zeros(0)
+        dqy_data = np.zeros(0)
+        err_data = np.ones(row_num)
+        qz_data = np.zeros(row_num)
+        mask = np.ones(row_num, dtype=bool)
         # Get from the array
         qx_data = data_point[0]
@@ -254,5 +254,5 @@
             dqy_data = data_point[(5 + ver)]
         #if col_num > (6 + ver): mask[data_point[(6 + ver)] < 1] = False
-        q_data = numpy.sqrt(qx_data*qx_data+qy_data*qy_data+qz_data*qz_data)
+        q_data = np.sqrt(qx_data*qx_data+qy_data*qy_data+qz_data*qz_data)
            
         # Extra protection(it is needed for some data files): 
@@ -262,8 +262,8 @@
   
         # Store limits of the image in q space
-        xmin = numpy.min(qx_data)
-        xmax = numpy.max(qx_data)
-        ymin = numpy.min(qy_data)
-        ymax = numpy.max(qy_data)
+        xmin = np.min(qx_data)
+        xmax = np.max(qx_data)
+        ymin = np.min(qy_data)
+        ymax = np.max(qy_data)
 
         # units
@@ -287,6 +287,6 @@
         
         # store x and y axis bin centers in q space
-        x_bins = numpy.arange(xmin, xmax + xstep, xstep)
-        y_bins = numpy.arange(ymin, ymax + ystep, ystep)
+        x_bins = np.arange(xmin, xmax + xstep, xstep)
+        y_bins = np.arange(ymin, ymax + ystep, ystep)
        
         # get the limits of q values
@@ -300,5 +300,5 @@
         output.data = data
         if (err_data == 1).all():
-            output.err_data = numpy.sqrt(numpy.abs(data))
+            output.err_data = np.sqrt(np.abs(data))
             output.err_data[output.err_data == 0.0] = 1.0
         else:
@@ -335,12 +335,12 @@
                 # tranfer the comp. to cartesian coord. for newer version.
                 if ver != 1:
-                    diag = numpy.sqrt(qx_data * qx_data + qy_data * qy_data)
+                    diag = np.sqrt(qx_data * qx_data + qy_data * qy_data)
                     cos_th = qx_data / diag
                     sin_th = qy_data / diag
-                    output.dqx_data = numpy.sqrt((dqx_data * cos_th) * \
+                    output.dqx_data = np.sqrt((dqx_data * cos_th) * \
                                                  (dqx_data * cos_th) \
                                                  + (dqy_data * sin_th) * \
                                                   (dqy_data * sin_th))
-                    output.dqy_data = numpy.sqrt((dqx_data * sin_th) * \
+                    output.dqy_data = np.sqrt((dqx_data * sin_th) * \
                                                  (dqx_data * sin_th) \
                                                  + (dqy_data * cos_th) * \
Index: src/sas/sascalc/dataloader/readers/sesans_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/sesans_reader.py	(revision 95253581a7278bcefffb1c4770afed962b126cd7)
+++ src/sas/sascalc/dataloader/readers/sesans_reader.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -6,5 +6,5 @@
     Jurrian Bakker 
 """
-import numpy
+import numpy as np
 import os
 from sas.sascalc.dataloader.data_info import Data1D
@@ -60,18 +60,18 @@
                 buff = input_f.read()
                 lines = buff.splitlines()
-                x  = numpy.zeros(0)
-                y  = numpy.zeros(0)
-                dy = numpy.zeros(0)
-                lam  = numpy.zeros(0)
-                dlam = numpy.zeros(0)
-                dx = numpy.zeros(0)
+                x  = np.zeros(0)
+                y  = np.zeros(0)
+                dy = np.zeros(0)
+                lam  = np.zeros(0)
+                dlam = np.zeros(0)
+                dx = np.zeros(0)
                 
                #temp. space to sort data
-                tx  = numpy.zeros(0)
-                ty  = numpy.zeros(0)
-                tdy = numpy.zeros(0)
-                tlam  = numpy.zeros(0)
-                tdlam = numpy.zeros(0)
-                tdx = numpy.zeros(0)
+                tx  = np.zeros(0)
+                ty  = np.zeros(0)
+                tdy = np.zeros(0)
+                tlam  = np.zeros(0)
+                tdlam = np.zeros(0)
+                tdx = np.zeros(0)
                 output = Data1D(x=x, y=y, lam=lam, dy=dy, dx=dx, dlam=dlam, isSesans=True)
                 self.filename = output.filename = basename
@@ -128,5 +128,5 @@
 
                 x,y,lam,dy,dx,dlam = [
-                   numpy.asarray(v, 'double')
+                    np.asarray(v, 'double')
                    for v in (x,y,lam,dy,dx,dlam)
                 ]
Index: src/sas/sascalc/dataloader/readers/tiff_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/tiff_reader.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/dataloader/readers/tiff_reader.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -13,5 +13,5 @@
 import logging
 import os
-import numpy
+import numpy as np
 from sas.sascalc.dataloader.data_info import Data2D
 from sas.sascalc.dataloader.manipulations import reader2D_converter
@@ -56,7 +56,7 @@
 
         # Initiazed the output data object
-        output.data = numpy.zeros([im.size[0], im.size[1]])
-        output.err_data = numpy.zeros([im.size[0], im.size[1]])
-        output.mask = numpy.ones([im.size[0], im.size[1]], dtype=bool)
+        output.data = np.zeros([im.size[0], im.size[1]])
+        output.err_data = np.zeros([im.size[0], im.size[1]])
+        output.mask = np.ones([im.size[0], im.size[1]], dtype=bool)
         
         # Initialize
@@ -94,6 +94,6 @@
         output.x_bins = x_vals
         output.y_bins = y_vals
-        output.qx_data = numpy.array(x_vals)
-        output.qy_data = numpy.array(y_vals)
+        output.qx_data = np.array(x_vals)
+        output.qy_data = np.array(y_vals)
         output.xmin = 0
         output.xmax = im.size[0] - 1
Index: src/sas/sascalc/fit/AbstractFitEngine.py
===================================================================
--- src/sas/sascalc/fit/AbstractFitEngine.py	(revision a9f579c8400c480f42c42445e1ff4dab09a6baa4)
+++ src/sas/sascalc/fit/AbstractFitEngine.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -4,5 +4,5 @@
 import sys
 import math
-import numpy
+import numpy as np
 
 from sas.sascalc.dataloader.data_info import Data1D
@@ -162,12 +162,12 @@
         # constant, or dy data
         if dy is None or dy == [] or dy.all() == 0:
-            self.dy = numpy.ones(len(y))
+            self.dy = np.ones(len(y))
         else:
-            self.dy = numpy.asarray(dy).copy()
+            self.dy = np.asarray(dy).copy()
 
         ## Min Q-value
         #Skip the Q=0 point, especially when y(q=0)=None at x[0].
         if min(self.x) == 0.0 and self.x[0] == 0 and\
-                     not numpy.isfinite(self.y[0]):
+                     not np.isfinite(self.y[0]):
             self.qmin = min(self.x[self.x != 0])
         else:
@@ -188,5 +188,5 @@
         # Skip Q=0 point, (especially for y(q=0)=None at x[0]).
         # ToDo: Find better way to do it.
-        if qmin == 0.0 and not numpy.isfinite(self.y[qmin]):
+        if qmin == 0.0 and not np.isfinite(self.y[qmin]):
             self.qmin = min(self.x[self.x != 0])
         elif qmin != None:
@@ -239,5 +239,5 @@
         """
         # Compute theory data f(x)
-        fx = numpy.zeros(len(self.x))
+        fx = np.zeros(len(self.x))
         fx[self.idx_unsmeared] = fn(self.x[self.idx_unsmeared])
        
@@ -247,7 +247,7 @@
                               self._last_unsmeared_bin)
         ## Sanity check
-        if numpy.size(self.dy) != numpy.size(fx):
+        if np.size(self.dy) != np.size(fx):
             msg = "FitData1D: invalid error array "
-            msg += "%d <> %d" % (numpy.shape(self.dy), numpy.size(fx))
+            msg += "%d <> %d" % (np.shape(self.dy), np.size(fx))
             raise RuntimeError, msg
         return (self.y[self.idx] - fx[self.idx]) / self.dy[self.idx], fx[self.idx]
@@ -300,10 +300,10 @@
         ## new error image for fitting purpose
         if self.err_data == None or self.err_data == []:
-            self.res_err_data = numpy.ones(len(self.data))
+            self.res_err_data = np.ones(len(self.data))
         else:
             self.res_err_data = copy.deepcopy(self.err_data)
         #self.res_err_data[self.res_err_data==0]=1
         
-        self.radius = numpy.sqrt(self.qx_data**2 + self.qy_data**2)
+        self.radius = np.sqrt(self.qx_data**2 + self.qy_data**2)
         
         # Note: mask = True: for MASK while mask = False for NOT to mask
@@ -311,6 +311,6 @@
                             (self.radius <= self.qmax))
         self.idx = (self.idx) & (self.mask)
-        self.idx = (self.idx) & (numpy.isfinite(self.data))
-        self.num_points = numpy.sum(self.idx)
+        self.idx = (self.idx) & (np.isfinite(self.data))
+        self.num_points = np.sum(self.idx)
 
     def set_smearer(self, smearer):
@@ -334,9 +334,9 @@
         if qmax != None:
             self.qmax = qmax
-        self.radius = numpy.sqrt(self.qx_data**2 + self.qy_data**2)
+        self.radius = np.sqrt(self.qx_data**2 + self.qy_data**2)
         self.idx = ((self.qmin <= self.radius) &\
                             (self.radius <= self.qmax))
         self.idx = (self.idx) & (self.mask)
-        self.idx = (self.idx) & (numpy.isfinite(self.data))
+        self.idx = (self.idx) & (np.isfinite(self.data))
         self.idx = (self.idx) & (self.res_err_data != 0)
 
@@ -351,5 +351,5 @@
         Number of measurement points in data set after masking, etc.
         """
-        return numpy.sum(self.idx)
+        return np.sum(self.idx)
 
     def residuals(self, fn):
Index: src/sas/sascalc/fit/BumpsFitting.py
===================================================================
--- src/sas/sascalc/fit/BumpsFitting.py	(revision 345e7e4a8c6f5977c8c07032553b5ab00bdf837d)
+++ src/sas/sascalc/fit/BumpsFitting.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -6,5 +6,5 @@
 import traceback
 
-import numpy
+import numpy as np
 
 from bumps import fitters
@@ -97,5 +97,5 @@
         try:
             p = history.population_values[0]
-            n,p = len(p), numpy.sort(p)
+            n,p = len(p), np.sort(p)
             QI,Qmid, = int(0.2*n),int(0.5*n)
             self.convergence.append((best, p[0],p[QI],p[Qmid],p[-1-QI],p[-1]))
@@ -194,8 +194,8 @@
 
     def numpoints(self):
-        return numpy.sum(self.data.idx) # number of fitted points
+        return np.sum(self.data.idx) # number of fitted points
 
     def nllf(self):
-        return 0.5*numpy.sum(self.residuals()**2)
+        return 0.5*np.sum(self.residuals()**2)
 
     def theory(self):
@@ -295,15 +295,15 @@
             if R.success:
                 if result['stderr'] is None:
-                    R.stderr = numpy.NaN*numpy.ones(len(param_list))
+                    R.stderr = np.NaN*np.ones(len(param_list))
                 else:
-                    R.stderr = numpy.hstack((result['stderr'][fitted_index],
-                                             numpy.NaN*numpy.ones(len(fitness.computed_pars))))
-                R.pvec = numpy.hstack((result['value'][fitted_index],
+                    R.stderr = np.hstack((result['stderr'][fitted_index],
+                                          np.NaN*np.ones(len(fitness.computed_pars))))
+                R.pvec = np.hstack((result['value'][fitted_index],
                                       [p.value for p in fitness.computed_pars]))
-                R.fitness = numpy.sum(R.residuals**2)/(fitness.numpoints() - len(fitted_index))
+                R.fitness = np.sum(R.residuals**2)/(fitness.numpoints() - len(fitted_index))
             else:
-                R.stderr = numpy.NaN*numpy.ones(len(param_list))
-                R.pvec = numpy.asarray( [p.value for p in fitness.fitted_pars+fitness.computed_pars])
-                R.fitness = numpy.NaN
+                R.stderr = np.NaN*np.ones(len(param_list))
+                R.pvec = np.asarray( [p.value for p in fitness.fitted_pars+fitness.computed_pars])
+                R.fitness = np.NaN
             R.convergence = result['convergence']
             if result['uncertainty'] is not None:
@@ -336,5 +336,5 @@
     max_step = steps + options.get('burn', 0)
     pars = [p.name for p in problem._parameters]
-    #x0 = numpy.asarray([p.value for p in problem._parameters])
+    #x0 = np.asarray([p.value for p in problem._parameters])
     options['monitors'] = [
         BumpsMonitor(handler, max_step, pars, problem.dof),
@@ -351,6 +351,6 @@
         errors = []
     except Exception as exc:
-        best, fbest = None, numpy.NaN
-        errors = [str(exc), traceback.traceback.format_exc()]
+        best, fbest = None, np.NaN
+        errors = [str(exc), traceback.format_exc()]
     finally:
         mapper.stop_mapper(fitdriver.mapper)
@@ -358,6 +358,6 @@
 
     convergence_list = options['monitors'][-1].convergence
-    convergence = (2*numpy.asarray(convergence_list)/problem.dof
-                   if convergence_list else numpy.empty((0,1),'d'))
+    convergence = (2*np.asarray(convergence_list)/problem.dof
+                   if convergence_list else np.empty((0,1),'d'))
 
     success = best is not None
Index: src/sas/sascalc/fit/Loader.py
===================================================================
--- src/sas/sascalc/fit/Loader.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/fit/Loader.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -2,5 +2,5 @@
 #import wx
 #import string
-import numpy
+import numpy as np
 
 class Load:
@@ -52,5 +52,5 @@
                     self.y.append(y)
                     self.dy.append(dy)
-                    self.dx = numpy.zeros(len(self.x))
+                    self.dx = np.zeros(len(self.x))
                 except:
                     print "READ ERROR", line
Index: src/sas/sascalc/fit/MultiplicationModel.py
===================================================================
--- src/sas/sascalc/fit/MultiplicationModel.py	(revision 68669da9154d53fe949cb741efa850cd516ce157)
+++ src/sas/sascalc/fit/MultiplicationModel.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -1,5 +1,5 @@
 import copy
 
-import numpy
+import numpy as np
 
 from sas.sascalc.calculator.BaseComponent import BaseComponent
@@ -52,6 +52,6 @@
         ## Parameter details [units, min, max]
         self._set_details()
-        self.details['scale_factor'] = ['', 0.0, numpy.inf]
-        self.details['background'] = ['',-numpy.inf,numpy.inf]
+        self.details['scale_factor'] = ['', 0.0, np.inf]
+        self.details['background'] = ['',-np.inf,np.inf]
 
         #list of parameter that can be fitted
Index: src/sas/sascalc/fit/expression.py
===================================================================
--- src/sas/sascalc/fit/expression.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/fit/expression.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -271,5 +271,5 @@
 
 def test_deps():
-    import numpy
+    import numpy as np
 
     # Null case
@@ -279,5 +279,5 @@
     _check("test1",[(2,7),(1,5),(1,4),(2,1),(3,1),(5,6)])
     _check("test1 renumbered",[(6,1),(7,3),(7,4),(6,7),(5,7),(3,2)])
-    _check("test1 numpy",numpy.array([(2,7),(1,5),(1,4),(2,1),(3,1),(5,6)]))
+    _check("test1 numpy",np.array([(2,7),(1,5),(1,4),(2,1),(3,1),(5,6)]))
 
     # No dependencies
@@ -291,5 +291,5 @@
 
     # large test for gross speed check
-    A = numpy.random.randint(4000,size=(1000,2))
+    A = np.random.randint(4000,size=(1000,2))
     A[:,1] += 4000  # Avoid cycles
     _check("test-large",A)
@@ -297,8 +297,8 @@
     # depth tests
     k = 200
-    A = numpy.array([range(0,k),range(1,k+1)]).T
+    A = np.array([range(0,k),range(1,k+1)]).T
     _check("depth-1",A)
 
-    A = numpy.array([range(1,k+1),range(0,k)]).T
+    A = np.array([range(1,k+1),range(0,k)]).T
     _check("depth-2",A)
 
Index: src/sas/sascalc/invariant/invariant.py
===================================================================
--- src/sas/sascalc/invariant/invariant.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/invariant/invariant.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -17,5 +17,5 @@
 """
 import math
-import numpy
+import numpy as np
 
 from sas.sascalc.dataloader.data_info import Data1D as LoaderData1D
@@ -50,5 +50,5 @@
             dy = data.dy
         else:
-            dy = numpy.ones(len(data.y))
+            dy = np.ones(len(data.y))
 
         # Transform the data
@@ -63,7 +63,7 @@
 
         # Create Data1D object
-        x_out = numpy.asarray(x_out)
-        y_out = numpy.asarray(y_out)
-        dy_out = numpy.asarray(dy_out)
+        x_out = np.asarray(x_out)
+        y_out = np.asarray(y_out)
+        dy_out = np.asarray(dy_out)
         linear_data = LoaderData1D(x=x_out, y=y_out, dy=dy_out)
 
@@ -158,10 +158,10 @@
         :param x: array of q-values
         """
-        p1 = numpy.array([self.dscale * math.exp(-((self.radius * q) ** 2 / 3)) \
+        p1 = np.array([self.dscale * math.exp(-((self.radius * q) ** 2 / 3)) \
                           for q in x])
-        p2 = numpy.array([self.scale * math.exp(-((self.radius * q) ** 2 / 3))\
+        p2 = np.array([self.scale * math.exp(-((self.radius * q) ** 2 / 3))\
                      * (-(q ** 2 / 3)) * 2 * self.radius * self.dradius for q in x])
         diq2 = p1 * p1 + p2 * p2
-        return numpy.array([math.sqrt(err) for err in diq2])
+        return np.array([math.sqrt(err) for err in diq2])
 
     def _guinier(self, x):
@@ -182,5 +182,5 @@
             msg = "Rg expected positive value, but got %s" % self.radius
             raise ValueError(msg)
-        value = numpy.array([math.exp(-((self.radius * i) ** 2 / 3)) for i in x])
+        value = np.array([math.exp(-((self.radius * i) ** 2 / 3)) for i in x])
         return self.scale * value
 
@@ -232,9 +232,9 @@
         :param x: array of q-values
         """
-        p1 = numpy.array([self.dscale * math.pow(q, -self.power) for q in x])
-        p2 = numpy.array([self.scale * self.power * math.pow(q, -self.power - 1)\
+        p1 = np.array([self.dscale * math.pow(q, -self.power) for q in x])
+        p2 = np.array([self.scale * self.power * math.pow(q, -self.power - 1)\
                            * self.dpower for q in x])
         diq2 = p1 * p1 + p2 * p2
-        return numpy.array([math.sqrt(err) for err in diq2])
+        return np.array([math.sqrt(err) for err in diq2])
 
     def _power_law(self, x):
@@ -259,5 +259,5 @@
             raise ValueError(msg)
 
-        value = numpy.array([math.pow(i, -self.power) for i in x])
+        value = np.array([math.pow(i, -self.power) for i in x])
         return self.scale * value
 
@@ -304,13 +304,13 @@
         idx = (self.data.x >= qmin) & (self.data.x <= qmax)
 
-        fx = numpy.zeros(len(self.data.x))
+        fx = np.zeros(len(self.data.x))
 
         # Uncertainty
-        if type(self.data.dy) == numpy.ndarray and \
+        if type(self.data.dy) == np.ndarray and \
             len(self.data.dy) == len(self.data.x) and \
-            numpy.all(self.data.dy > 0):
+                np.all(self.data.dy > 0):
             sigma = self.data.dy
         else:
-            sigma = numpy.ones(len(self.data.x))
+            sigma = np.ones(len(self.data.x))
 
         # Compute theory data f(x)
@@ -332,23 +332,23 @@
             sigma2 = linearized_data.dy * linearized_data.dy
             a = -(power)
-            b = (numpy.sum(linearized_data.y / sigma2) \
-                 - a * numpy.sum(linearized_data.x / sigma2)) / numpy.sum(1.0 / sigma2)
+            b = (np.sum(linearized_data.y / sigma2) \
+                 - a * np.sum(linearized_data.x / sigma2)) / np.sum(1.0 / sigma2)
 
 
             deltas = linearized_data.x * a + \
-                    numpy.ones(len(linearized_data.x)) * b - linearized_data.y
-            residuals = numpy.sum(deltas * deltas / sigma2)
-
-            err = math.fabs(residuals) / numpy.sum(1.0 / sigma2)
+                     np.ones(len(linearized_data.x)) * b - linearized_data.y
+            residuals = np.sum(deltas * deltas / sigma2)
+
+            err = math.fabs(residuals) / np.sum(1.0 / sigma2)
             return [a, b], [0, math.sqrt(err)]
         else:
-            A = numpy.vstack([linearized_data.x / linearized_data.dy, 1.0 / linearized_data.dy]).T
-            (p, residuals, _, _) = numpy.linalg.lstsq(A, linearized_data.y / linearized_data.dy)
+            A = np.vstack([linearized_data.x / linearized_data.dy, 1.0 / linearized_data.dy]).T
+            (p, residuals, _, _) = np.linalg.lstsq(A, linearized_data.y / linearized_data.dy)
 
             # Get the covariance matrix, defined as inv_cov = a_transposed * a
-            err = numpy.zeros(2)
+            err = np.zeros(2)
             try:
-                inv_cov = numpy.dot(A.transpose(), A)
-                cov = numpy.linalg.pinv(inv_cov)
+                inv_cov = np.dot(A.transpose(), A)
+                cov = np.linalg.pinv(inv_cov)
                 err_matrix = math.fabs(residuals) * cov
                 err = [math.sqrt(err_matrix[0][0]), math.sqrt(err_matrix[1][1])]
@@ -434,5 +434,5 @@
         if new_data.dy is None or len(new_data.x) != len(new_data.dy) or \
             (min(new_data.dy) == 0 and max(new_data.dy) == 0):
-            new_data.dy = numpy.ones(len(new_data.x))
+            new_data.dy = np.ones(len(new_data.x))
         return  new_data
 
@@ -571,5 +571,5 @@
         """
         #create new Data1D to compute the invariant
-        q = numpy.linspace(start=q_start,
+        q = np.linspace(start=q_start,
                            stop=q_end,
                            num=npts,
@@ -580,5 +580,5 @@
         result_data = LoaderData1D(x=q, y=iq, dy=diq)
         if self._smeared != None:
-            result_data.dxl = self._smeared * numpy.ones(len(q))
+            result_data.dxl = self._smeared * np.ones(len(q))
         return result_data
 
@@ -691,5 +691,5 @@
 
         if q_start >= q_end:
-            return numpy.zeros(0), numpy.zeros(0)
+            return np.zeros(0), np.zeros(0)
 
         return self._get_extrapolated_data(\
@@ -719,5 +719,5 @@
 
         if q_start >= q_end:
-            return numpy.zeros(0), numpy.zeros(0)
+            return np.zeros(0), np.zeros(0)
 
         return self._get_extrapolated_data(\
Index: src/sas/sascalc/pr/fit/AbstractFitEngine.py
===================================================================
--- src/sas/sascalc/pr/fit/AbstractFitEngine.py	(revision fc18690cd84cc4dd6e33a9d344f47b08cef71290)
+++ src/sas/sascalc/pr/fit/AbstractFitEngine.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -4,5 +4,5 @@
 import sys
 import math
-import numpy
+import numpy as np
 
 from sas.sascalc.dataloader.data_info import Data1D
@@ -162,12 +162,12 @@
         # constant, or dy data
         if dy is None or dy == [] or dy.all() == 0:
-            self.dy = numpy.ones(len(y))
+            self.dy = np.ones(len(y))
         else:
-            self.dy = numpy.asarray(dy).copy()
+            self.dy = np.asarray(dy).copy()
 
         ## Min Q-value
         #Skip the Q=0 point, especially when y(q=0)=None at x[0].
         if min(self.x) == 0.0 and self.x[0] == 0 and\
-                     not numpy.isfinite(self.y[0]):
+                     not np.isfinite(self.y[0]):
             self.qmin = min(self.x[self.x != 0])
         else:
@@ -188,5 +188,5 @@
         # Skip Q=0 point, (especially for y(q=0)=None at x[0]).
         # ToDo: Find better way to do it.
-        if qmin == 0.0 and not numpy.isfinite(self.y[qmin]):
+        if qmin == 0.0 and not np.isfinite(self.y[qmin]):
             self.qmin = min(self.x[self.x != 0])
         elif qmin != None:
@@ -239,5 +239,5 @@
         """
         # Compute theory data f(x)
-        fx = numpy.zeros(len(self.x))
+        fx = np.zeros(len(self.x))
         fx[self.idx_unsmeared] = fn(self.x[self.idx_unsmeared])
        
@@ -247,7 +247,7 @@
                               self._last_unsmeared_bin)
         ## Sanity check
-        if numpy.size(self.dy) != numpy.size(fx):
+        if np.size(self.dy) != np.size(fx):
             msg = "FitData1D: invalid error array "
-            msg += "%d <> %d" % (numpy.shape(self.dy), numpy.size(fx))
+            msg += "%d <> %d" % (np.shape(self.dy), np.size(fx))
             raise RuntimeError, msg
         return (self.y[self.idx] - fx[self.idx]) / self.dy[self.idx], fx[self.idx]
@@ -300,10 +300,10 @@
         ## new error image for fitting purpose
         if self.err_data == None or self.err_data == []:
-            self.res_err_data = numpy.ones(len(self.data))
+            self.res_err_data = np.ones(len(self.data))
         else:
             self.res_err_data = copy.deepcopy(self.err_data)
         #self.res_err_data[self.res_err_data==0]=1
         
-        self.radius = numpy.sqrt(self.qx_data**2 + self.qy_data**2)
+        self.radius = np.sqrt(self.qx_data**2 + self.qy_data**2)
         
         # Note: mask = True: for MASK while mask = False for NOT to mask
@@ -311,6 +311,6 @@
                             (self.radius <= self.qmax))
         self.idx = (self.idx) & (self.mask)
-        self.idx = (self.idx) & (numpy.isfinite(self.data))
-        self.num_points = numpy.sum(self.idx)
+        self.idx = (self.idx) & (np.isfinite(self.data))
+        self.num_points = np.sum(self.idx)
 
     def set_smearer(self, smearer):
@@ -334,9 +334,9 @@
         if qmax != None:
             self.qmax = qmax
-        self.radius = numpy.sqrt(self.qx_data**2 + self.qy_data**2)
+        self.radius = np.sqrt(self.qx_data**2 + self.qy_data**2)
         self.idx = ((self.qmin <= self.radius) &\
                             (self.radius <= self.qmax))
         self.idx = (self.idx) & (self.mask)
-        self.idx = (self.idx) & (numpy.isfinite(self.data))
+        self.idx = (self.idx) & (np.isfinite(self.data))
         self.idx = (self.idx) & (self.res_err_data != 0)
 
@@ -351,5 +351,5 @@
         Number of measurement points in data set after masking, etc.
         """
-        return numpy.sum(self.idx)
+        return np.sum(self.idx)
 
     def residuals(self, fn):
Index: src/sas/sascalc/pr/fit/BumpsFitting.py
===================================================================
--- src/sas/sascalc/pr/fit/BumpsFitting.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/pr/fit/BumpsFitting.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -5,5 +5,5 @@
 from datetime import timedelta, datetime
 
-import numpy
+import numpy as np
 
 from bumps import fitters
@@ -96,5 +96,5 @@
         try:
             p = history.population_values[0]
-            n,p = len(p), numpy.sort(p)
+            n,p = len(p), np.sort(p)
             QI,Qmid, = int(0.2*n),int(0.5*n)
             self.convergence.append((best, p[0],p[QI],p[Qmid],p[-1-QI],p[-1]))
@@ -193,8 +193,8 @@
 
     def numpoints(self):
-        return numpy.sum(self.data.idx) # number of fitted points
+        return np.sum(self.data.idx) # number of fitted points
 
     def nllf(self):
-        return 0.5*numpy.sum(self.residuals()**2)
+        return 0.5*np.sum(self.residuals()**2)
 
     def theory(self):
@@ -293,13 +293,13 @@
             R.success = result['success']
             if R.success:
-                R.stderr = numpy.hstack((result['stderr'][fitted_index],
-                                         numpy.NaN*numpy.ones(len(fitness.computed_pars))))
-                R.pvec = numpy.hstack((result['value'][fitted_index],
+                R.stderr = np.hstack((result['stderr'][fitted_index],
+                                      np.NaN*np.ones(len(fitness.computed_pars))))
+                R.pvec = np.hstack((result['value'][fitted_index],
                                       [p.value for p in fitness.computed_pars]))
-                R.fitness = numpy.sum(R.residuals**2)/(fitness.numpoints() - len(fitted_index))
+                R.fitness = np.sum(R.residuals**2)/(fitness.numpoints() - len(fitted_index))
             else:
-                R.stderr = numpy.NaN*numpy.ones(len(param_list))
-                R.pvec = numpy.asarray( [p.value for p in fitness.fitted_pars+fitness.computed_pars])
-                R.fitness = numpy.NaN
+                R.stderr = np.NaN*np.ones(len(param_list))
+                R.pvec = np.asarray( [p.value for p in fitness.fitted_pars+fitness.computed_pars])
+                R.fitness = np.NaN
             R.convergence = result['convergence']
             if result['uncertainty'] is not None:
@@ -331,5 +331,5 @@
     max_step = steps + options.get('burn', 0)
     pars = [p.name for p in problem._parameters]
-    #x0 = numpy.asarray([p.value for p in problem._parameters])
+    #x0 = np.asarray([p.value for p in problem._parameters])
     options['monitors'] = [
         BumpsMonitor(handler, max_step, pars, problem.dof),
@@ -352,6 +352,6 @@
 
     convergence_list = options['monitors'][-1].convergence
-    convergence = (2*numpy.asarray(convergence_list)/problem.dof
-                   if convergence_list else numpy.empty((0,1),'d'))
+    convergence = (2*np.asarray(convergence_list)/problem.dof
+                   if convergence_list else np.empty((0,1),'d'))
 
     success = best is not None
Index: src/sas/sascalc/pr/fit/Loader.py
===================================================================
--- src/sas/sascalc/pr/fit/Loader.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/pr/fit/Loader.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -2,5 +2,5 @@
 #import wx
 #import string
-import numpy
+import numpy as np
 
 class Load:
@@ -52,5 +52,5 @@
                     self.y.append(y)
                     self.dy.append(dy)
-                    self.dx = numpy.zeros(len(self.x))
+                    self.dx = np.zeros(len(self.x))
                 except:
                     print "READ ERROR", line
Index: src/sas/sascalc/pr/fit/expression.py
===================================================================
--- src/sas/sascalc/pr/fit/expression.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/pr/fit/expression.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -271,5 +271,5 @@
 
 def test_deps():
-    import numpy
+    import numpy as np
 
     # Null case
@@ -279,5 +279,5 @@
     _check("test1",[(2,7),(1,5),(1,4),(2,1),(3,1),(5,6)])
     _check("test1 renumbered",[(6,1),(7,3),(7,4),(6,7),(5,7),(3,2)])
-    _check("test1 numpy",numpy.array([(2,7),(1,5),(1,4),(2,1),(3,1),(5,6)]))
+    _check("test1 numpy",np.array([(2,7),(1,5),(1,4),(2,1),(3,1),(5,6)]))
 
     # No dependencies
@@ -291,5 +291,5 @@
 
     # large test for gross speed check
-    A = numpy.random.randint(4000,size=(1000,2))
+    A = np.random.randint(4000,size=(1000,2))
     A[:,1] += 4000  # Avoid cycles
     _check("test-large",A)
@@ -297,8 +297,8 @@
     # depth tests
     k = 200
-    A = numpy.array([range(0,k),range(1,k+1)]).T
+    A = np.array([range(0,k),range(1,k+1)]).T
     _check("depth-1",A)
 
-    A = numpy.array([range(1,k+1),range(0,k)]).T
+    A = np.array([range(1,k+1),range(0,k)]).T
     _check("depth-2",A)
 
Index: src/sas/sascalc/pr/invertor.py
===================================================================
--- src/sas/sascalc/pr/invertor.py	(revision 2c60f30436c786afaf7a16a8d82389832d5c6637)
+++ src/sas/sascalc/pr/invertor.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -7,5 +7,5 @@
 """
 
-import numpy
+import numpy as np
 import sys
 import math
@@ -189,13 +189,13 @@
         #import numpy
         if name == 'x':
-            out = numpy.ones(self.get_nx())
+            out = np.ones(self.get_nx())
             self.get_x(out)
             return out
         elif name == 'y':
-            out = numpy.ones(self.get_ny())
+            out = np.ones(self.get_ny())
             self.get_y(out)
             return out
         elif name == 'err':
-            out = numpy.ones(self.get_nerr())
+            out = np.ones(self.get_nerr())
             self.get_err(out)
             return out
@@ -325,5 +325,5 @@
             raise RuntimeError, msg
 
-        p = numpy.ones(nfunc)
+        p = np.ones(nfunc)
         t_0 = time.time()
         out, cov_x, _, _, _ = optimize.leastsq(self.residuals, p, full_output=1)
@@ -341,5 +341,5 @@
 
         if cov_x is None:
-            cov_x = numpy.ones([nfunc, nfunc])
+            cov_x = np.ones([nfunc, nfunc])
             cov_x *= math.fabs(chisqr)
         return out, cov_x
@@ -358,5 +358,5 @@
             raise RuntimeError, msg
 
-        p = numpy.ones(nfunc)
+        p = np.ones(nfunc)
         t_0 = time.time()
         out, cov_x, _, _, _ = optimize.leastsq(self.pr_residuals, p, full_output=1)
@@ -435,5 +435,5 @@
         """
         # Note: To make sure an array is contiguous:
-        # blah = numpy.ascontiguousarray(blah_original)
+        # blah = np.ascontiguousarray(blah_original)
         # ... before passing it to C
 
@@ -456,7 +456,7 @@
             nfunc += 1
 
-        a = numpy.zeros([npts + nq, nfunc])
-        b = numpy.zeros(npts + nq)
-        err = numpy.zeros([nfunc, nfunc])
+        a = np.zeros([npts + nq, nfunc])
+        b = np.zeros(npts + nq)
+        err = np.zeros([nfunc, nfunc])
 
         # Construct the a matrix and b vector that represent the problem
@@ -476,5 +476,5 @@
         self.chi2 = chi2
 
-        inv_cov = numpy.zeros([nfunc, nfunc])
+        inv_cov = np.zeros([nfunc, nfunc])
         # Get the covariance matrix, defined as inv_cov = a_transposed * a
         self._get_invcov_matrix(nfunc, nr, a, inv_cov)
@@ -490,5 +490,5 @@
 
         try:
-            cov = numpy.linalg.pinv(inv_cov)
+            cov = np.linalg.pinv(inv_cov)
             err = math.fabs(chi2 / float(npts - nfunc)) * cov
         except:
@@ -505,6 +505,6 @@
             self.background = c[0]
 
-            err_0 = numpy.zeros([nfunc, nfunc])
-            c_0 = numpy.zeros(nfunc)
+            err_0 = np.zeros([nfunc, nfunc])
+            c_0 = np.zeros(nfunc)
 
             for i in range(nfunc_0):
@@ -662,5 +662,5 @@
                                                    str(self.cov[i][i])))
         file.write("<r>  <Pr>  <dPr>\n")
-        r = numpy.arange(0.0, self.d_max, self.d_max / npts)
+        r = np.arange(0.0, self.d_max, self.d_max / npts)
 
         for r_i in r:
@@ -694,6 +694,6 @@
                         toks = line.split('=')
                         self.nfunc = int(toks[1])
-                        self.out = numpy.zeros(self.nfunc)
-                        self.cov = numpy.zeros([self.nfunc, self.nfunc])
+                        self.out = np.zeros(self.nfunc)
+                        self.cov = np.zeros([self.nfunc, self.nfunc])
                     elif line.startswith('#alpha='):
                         toks = line.split('=')
Index: src/sas/sascalc/pr/num_term.py
===================================================================
--- src/sas/sascalc/pr/num_term.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/pr/num_term.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -1,4 +1,4 @@
 import math
-import numpy
+import numpy as np
 import copy
 import sys
@@ -152,7 +152,7 @@
 def load(path):
     # Read the data from the data file
-    data_x = numpy.zeros(0)
-    data_y = numpy.zeros(0)
-    data_err = numpy.zeros(0)
+    data_x = np.zeros(0)
+    data_y = np.zeros(0)
+    data_err = np.zeros(0)
     scale = None
     min_err = 0.0
@@ -176,7 +176,7 @@
                     #err = 0
 
-                data_x = numpy.append(data_x, test_x)
-                data_y = numpy.append(data_y, test_y)
-                data_err = numpy.append(data_err, err)
+                data_x = np.append(data_x, test_x)
+                data_y = np.append(data_y, test_y)
+                data_err = np.append(data_err, err)
             except:
                 logging.error(sys.exc_value)
Index: src/sas/sasgui/guiframe/aboutbox.py
===================================================================
--- src/sas/sasgui/guiframe/aboutbox.py	(revision 49e000bacd5482fc10577a5d969f3a291ac56383)
+++ src/sas/sasgui/guiframe/aboutbox.py	(revision 1779e727216b236f9fc4d683fa29295ad44ed2ed)
@@ -118,4 +118,5 @@
         self.bitmap_button_ansto = wx.BitmapButton(self, -1, wx.NullBitmap)
         self.bitmap_button_tudelft = wx.BitmapButton(self, -1, wx.NullBitmap)
+        self.bitmap_button_dls = wx.BitmapButton(self, -1, wx.NullBitmap)
         
         self.static_line_3 = wx.StaticLine(self, -1)
@@ -137,4 +138,5 @@
         self.Bind(wx.EVT_BUTTON, self.onAnstoLogo, self.bitmap_button_ansto)
         self.Bind(wx.EVT_BUTTON, self.onTudelftLogo, self.bitmap_button_tudelft)
+        self.Bind(wx.EVT_BUTTON, self.onDlsLogo, self.bitmap_button_dls)
         # end wxGlade
         # fill in acknowledgements
@@ -229,4 +231,10 @@
         logo = wx.Bitmap(image)
         self.bitmap_button_tudelft.SetBitmapLabel(logo)
+        
+        image = file_dir + "/images/dls_logo.png"
+        if os.path.isfile(config._dls_logo):
+            image = config._dls_logo
+        logo = wx.Bitmap(image)
+        self.bitmap_button_dls.SetBitmapLabel(logo)
                 
         # resize dialog window to fit version number nicely
@@ -260,4 +268,5 @@
         self.bitmap_button_ansto.SetSize(self.bitmap_button_ansto.GetBestSize())
         self.bitmap_button_tudelft.SetSize(self.bitmap_button_tudelft.GetBestSize())
+        self.bitmap_button_dls.SetSize(self.bitmap_button_dls.GetBestSize())
         # end wxGlade
 
@@ -325,4 +334,6 @@
         sizer_logos.Add(self.bitmap_button_tudelft, 0, 
                         wx.LEFT|wx.ADJUST_MINSIZE, 2)
+        sizer_logos.Add(self.bitmap_button_dls, 0, 
+                        wx.LEFT|wx.ADJUST_MINSIZE, 2)
                 
         sizer_logos.Add((10, 50), 0, wx.ADJUST_MINSIZE, 0)
@@ -423,4 +434,11 @@
         event.Skip()
 
+    def onDlsLogo(self, event):
+        """
+        """ 
+        # wxGlade: DialogAbout.<event_handler>
+        launchBrowser(config._dls_url)
+        event.Skip()
+
 # end of class DialogAbout
 
Index: src/sas/sasgui/guiframe/acknowledgebox.py
===================================================================
--- src/sas/sasgui/guiframe/acknowledgebox.py	(revision c1fdf8485e681ba1145937521615515e6c3be688)
+++ src/sas/sasgui/guiframe/acknowledgebox.py	(revision 74c8cd08df1c5d3f23477827c0f272e88bbbea9d)
@@ -11,4 +11,5 @@
 import wx.richtext
 import wx.lib.hyperlink
+from wx.lib.expando import ExpandoTextCtrl
 import random
 import os.path
@@ -36,5 +37,4 @@
     Shows the current method for acknowledging SasView in
     scholarly publications.
-
     """
 
@@ -44,7 +44,9 @@
         wx.Dialog.__init__(self, *args, **kwds)
 
-        self.ack = wx.TextCtrl(self, style=wx.TE_LEFT|wx.TE_MULTILINE|wx.TE_BESTWRAP|wx.TE_READONLY|wx.TE_NO_VSCROLL)
+        self.ack = ExpandoTextCtrl(self, style=wx.TE_LEFT|wx.TE_MULTILINE|wx.TE_BESTWRAP|wx.TE_READONLY|wx.TE_NO_VSCROLL)
         self.ack.SetValue(config._acknowledgement_publications)
-        self.ack.SetMinSize((-1, 55))
+        #self.ack.SetMinSize((-1, 55))
+        self.citation = ExpandoTextCtrl(self, style=wx.TE_LEFT|wx.TE_MULTILINE|wx.TE_BESTWRAP|wx.TE_READONLY|wx.TE_NO_VSCROLL)
+        self.citation.SetValue(config._acknowledgement_citation)
         self.preamble = wx.StaticText(self, -1, config._acknowledgement_preamble)
         items = [config._acknowledgement_preamble_bullet1,
@@ -52,8 +54,8 @@
                  config._acknowledgement_preamble_bullet3,
                  config._acknowledgement_preamble_bullet4]
-        self.list1 = wx.StaticText(self, -1, "\t(1) " + items[0])
-        self.list2 = wx.StaticText(self, -1, "\t(2) " + items[1])
-        self.list3 = wx.StaticText(self, -1, "\t(3) " + items[2])
-        self.list4 = wx.StaticText(self, -1, "\t(4) " + items[3])
+        self.list1 = wx.StaticText(self, -1, "(1) " + items[0])
+        self.list2 = wx.StaticText(self, -1, "(2) " + items[1])
+        self.list3 = wx.StaticText(self, -1, "(3) " + items[2])
+        self.list4 = wx.StaticText(self, -1, "(4) " + items[3])
         self.static_line = wx.StaticLine(self, 0)
         self.__set_properties()
@@ -69,5 +71,5 @@
         self.SetTitle("Acknowledging SasView")
         #Increased size of box from (525, 225), SMK, 04/10/16
-        self.SetSize((600, 300))
+        self.SetClientSize((600, 320))
         # end wxGlade
 
@@ -81,9 +83,10 @@
         sizer_titles.Add(self.preamble, 0, wx.ALL|wx.EXPAND, 5)
         sizer_titles.Add(self.list1, 0, wx.ALL|wx.EXPAND, 5)
+        sizer_titles.Add(self.ack, 0, wx.ALL|wx.EXPAND, 5)
         sizer_titles.Add(self.list2, 0, wx.ALL|wx.EXPAND, 5)
+        sizer_titles.Add(self.citation, 0, wx.ALL|wx.EXPAND, 5)
         sizer_titles.Add(self.list3, 0, wx.ALL|wx.EXPAND, 5)
+        #sizer_titles.Add(self.static_line, 0, wx.ALL|wx.EXPAND, 0)
         sizer_titles.Add(self.list4, 0, wx.ALL|wx.EXPAND, 5)
-        sizer_titles.Add(self.static_line, 0, wx.ALL|wx.EXPAND, 0)
-        sizer_titles.Add(self.ack, 0, wx.ALL|wx.EXPAND, 5)
         sizer_main.Add(sizer_titles, -1, wx.ALL|wx.EXPAND, 5)
         self.SetAutoLayout(True)
@@ -91,4 +94,5 @@
         self.Layout()
         self.Centre()
+        #self.SetClientSize(sizer_main.GetSize())
         # end wxGlade
 
Index: src/sas/sasgui/guiframe/config.py
===================================================================
--- src/sas/sasgui/guiframe/config.py	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sasgui/guiframe/config.py	(revision 1779e727216b236f9fc4d683fa29295ad44ed2ed)
@@ -1,18 +1,20 @@
 """
-Application settings
+    Application settings
 """
+import time
 import os
-import time
 from sas.sasgui.guiframe.gui_style import GUIFRAME
+import sas.sasview
+import logging
+
 # Version of the application
-__appname__ = "DummyView"
-__version__ = '0.0.0'
-__build__ = '1'
+__appname__ = "SasView"
+__version__ = sas.sasview.__version__
+__build__ = sas.sasview.__build__
 __download_page__ = 'https://github.com/SasView/sasview/releases'
 __update_URL__ = 'http://www.sasview.org/latestversion.json'
 
-
 # Debug message flag
-__EVT_DEBUG__ = True
+__EVT_DEBUG__ = False
 
 # Flag for automated testing
@@ -29,9 +31,9 @@
 _acknowledgement_preamble =\
 '''To ensure the long term support and development of this software please''' +\
-''' remember to do the following.'''
+''' remember to:'''
 _acknowledgement_preamble_bullet1 =\
-'''Acknowledge its use in your publications as suggested below'''
+'''Acknowledge its use in your publications as :'''
 _acknowledgement_preamble_bullet2 =\
-'''Reference the following website: http://www.sasview.org'''
+'''Reference SasView as:'''
 _acknowledgement_preamble_bullet3 =\
 '''Reference the model you used if appropriate (see documentation for refs)'''
@@ -39,70 +41,90 @@
 '''Send us your reference for our records: developers@sasview.org'''
 _acknowledgement_publications = \
-'''This work benefited from the use of the SasView application, originally
-developed under NSF award DMR-0520547.
+'''This work benefited from the use of the SasView application, originally developed under NSF Award DMR-0520547. SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project Grant No 654000.'''
+_acknowledgement_citation = \
+'''M. Doucet et al. SasView Version 4.1, Zenodo, 10.5281/zenodo.438138'''
+
+_acknowledgement =  \
+'''This work was originally developed as part of the DANSE project funded by the US NSF under Award DMR-0520547,\n but is currently maintained by a collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, DLS, and the scattering community.\n\n SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project (Grant No 654000).\nA list of individual contributors can be found at: https://github.com/orgs/SasView/people
 '''
-_acknowledgement =  \
-'''This work originally developed as part of the DANSE project funded by the NSF
-under grant DMR-0520547, and currently maintained by NIST, UMD, ORNL, ISIS, ESS
-and ILL.
 
-'''
 _homepage = "http://www.sasview.org"
-_download = "http://sourceforge.net/projects/sasview/files/"
+_download = __download_page__
 _authors = []
 _paper = "http://sourceforge.net/p/sasview/tickets/"
 _license = "mailto:help@sasview.org"
-_nsf_logo = "images/nsf_logo.png"
-_danse_logo = "images/danse_logo.png"
-_inst_logo = "images/utlogo.gif"
-_nist_logo = "images/nist_logo.png"
-_umd_logo = "images/umd_logo.png"
-_sns_logo = "images/sns_logo.png"
-_isis_logo = "images/isis_logo.png"
-_ess_logo = "images/ess_logo.png"
-_ill_logo = "images/ill_logo.png"
+
+
+icon_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "images"))
+logging.info("icon path: %s" % icon_path)
+media_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "media"))
+test_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "test"))
+
+_nist_logo = os.path.join(icon_path, "nist_logo.png")
+_umd_logo = os.path.join(icon_path, "umd_logo.png")
+_sns_logo = os.path.join(icon_path, "sns_logo.png")
+_ornl_logo = os.path.join(icon_path, "ornl_logo.png")
+_isis_logo = os.path.join(icon_path, "isis_logo.png")
+_ess_logo = os.path.join(icon_path, "ess_logo.png")
+_ill_logo = os.path.join(icon_path, "ill_logo.png")
+_ansto_logo = os.path.join(icon_path, "ansto_logo.png")
+_tudelft_logo = os.path.join(icon_path, "tudelft_logo.png")
+_nsf_logo = os.path.join(icon_path, "nsf_logo.png")
+_danse_logo = os.path.join(icon_path, "danse_logo.png")
+_inst_logo = os.path.join(icon_path, "utlogo.gif")
 _nist_url = "http://www.nist.gov/"
 _umd_url = "http://www.umd.edu/"
 _sns_url = "http://neutrons.ornl.gov/"
+_ornl_url = "http://neutrons.ornl.gov/"
 _nsf_url = "http://www.nsf.gov"
-_danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html"
-_inst_url = "http://www.utk.edu"
 _isis_url = "http://www.isis.stfc.ac.uk/"
 _ess_url = "http://ess-scandinavia.eu/"
 _ill_url = "http://www.ill.eu/"
-_corner_image = "images/angles_flat.png"
-_welcome_image = "images/SVwelcome.png"
-_copyright = "(c) 2008, University of Tennessee"
-#edit the lists below of file state your plugin can read
-#for sasview this how you can edit these lists
-#PLUGIN_STATE_EXTENSIONS = ['.prv','.fitv', '.inv']
-#APPLICATION_STATE_EXTENSION = '.svs'
-#PLUGINS_WLIST = ['P(r) files (*.prv)|*.prv',
-#                  'Fitting files (*.fitv)|*.fitv',
-#                  'Invariant files (*.inv)|*.inv']
-#APPLICATION_WLIST = 'SasView files (*.svs)|*.svs'
-APPLICATION_WLIST = ''
-APPLICATION_STATE_EXTENSION = None
-PLUGINS_WLIST = []
-PLUGIN_STATE_EXTENSIONS = []
-SPLASH_SCREEN_PATH = "images/danse_logo.png"
-DEFAULT_STYLE = GUIFRAME.SINGLE_APPLICATION
-SPLASH_SCREEN_WIDTH = 500
-SPLASH_SCREEN_HEIGHT = 300
-WELCOME_PANEL_ON = False
-TUTORIAL_PATH = None
-SS_MAX_DISPLAY_TIME = 1500
-PLOPANEL_WIDTH = 350
-PLOPANEL_HEIGTH = 350
-GUIFRAME_WIDTH = 1000
-GUIFRAME_HEIGHT = 800
-CONTROL_WIDTH = -1
-CONTROL_HEIGHT = -1
-SetupIconFile_win = os.path.join("images", "ball.ico")
-SetupIconFile_mac = os.path.join("images", "ball.icns")
-DefaultGroupName = "DANSE"
-OutputBaseFilename = "setupGuiFrame"
+_ansto_url = "http://www.ansto.gov.au/"
+_tudelft_url = "http://www.tnw.tudelft.nl/en/cooperation/facilities/reactor-instituut-delft/"
+_dls_url = "http://www.diamond.ac.uk/"
+_danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html"
+_inst_url = "http://www.utk.edu"
+_corner_image = os.path.join(icon_path, "angles_flat.png")
+_welcome_image = os.path.join(icon_path, "SVwelcome.png")
+_copyright = "(c) 2009 - 2017, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, and DLS"
+marketplace_url = "http://marketplace.sasview.org/"
+
+#edit the list of file state your plugin can read
+APPLICATION_WLIST = 'SasView files (*.svs)|*.svs'
+APPLICATION_STATE_EXTENSION = '.svs'
+GUIFRAME_WIDTH = 1150
+GUIFRAME_HEIGHT = 840
+PLUGIN_STATE_EXTENSIONS = ['.fitv', '.inv', '.prv', '.crf']
+PLUGINS_WLIST = ['Fitting files (*.fitv)|*.fitv',
+                 'Invariant files (*.inv)|*.inv',
+                 'P(r) files (*.prv)|*.prv',
+                 'Corfunc files (*.crf)|*.crf']
+PLOPANEL_WIDTH = 415
+PLOPANEL_HEIGTH = 370
 DATAPANEL_WIDTH = 235
 DATAPANEL_HEIGHT = 700
+SPLASH_SCREEN_PATH = os.path.join(icon_path, "SVwelcome_mini.png")
+TUTORIAL_PATH = os.path.join(media_path, "Tutorial.pdf")
+DEFAULT_STYLE = GUIFRAME.MULTIPLE_APPLICATIONS|GUIFRAME.MANAGER_ON\
+                    |GUIFRAME.CALCULATOR_ON|GUIFRAME.TOOLBAR_ON
+SPLASH_SCREEN_WIDTH = 512
+SPLASH_SCREEN_HEIGHT = 366
+SS_MAX_DISPLAY_TIME = 2000
+WELCOME_PANEL_ON = True
+WELCOME_PANEL_SHOW = False
+CLEANUP_PLOT = False
+# OPEN and SAVE project menu
+OPEN_SAVE_PROJECT_MENU = True
+#VIEW MENU
+VIEW_MENU = True
+#EDIT MENU
+EDIT_MENU = True
+
+SetupIconFile_win = os.path.join(icon_path, "ball.ico")
+SetupIconFile_mac = os.path.join(icon_path, "ball.icns")
+DefaultGroupName = "."
+OutputBaseFilename = "setupSasView"
+
 FIXED_PANEL = True
 DATALOADER_SHOW = True
@@ -113,26 +135,20 @@
 # set a default perspective
 DEFAULT_PERSPECTIVE = 'None'
-# OPEN and SAVE project menu
-OPEN_SAVE_PROJECT_MENU = True
-CLEANUP_PLOT = False
-# OPEN and SAVE project menu
-OPEN_SAVE_PROJECT_MENU = False
-#VIEW MENU
-VIEW_MENU = False
-#EDIT MENU
-EDIT_MENU = False
-import wx.lib.newevent
-(StatusBarEvent, EVT_STATUS) = wx.lib.newevent.NewEvent()
+
+# Time out for updating sasview
+UPDATE_TIMEOUT = 2
+
+#OpenCL option
+SAS_OPENCL = None
 
 def printEVT(message):
-    """
-    :TODO - need method documentation
-    """
     if __EVT_DEBUG__:
+        """
+        :TODO - Need method doc string
+        """
         print "%g:  %s" % (time.clock(), message)
-    
+
         if __EVT_DEBUG_2_FILE__:
             out = open(__EVT_DEBUG_FILENAME__, 'a')
             out.write("%10g:  %s\n" % (time.clock(), message))
             out.close()
-            
Index: src/sas/sasgui/guiframe/dataFitting.py
===================================================================
--- src/sas/sasgui/guiframe/dataFitting.py	(revision 68adf86632754e28ed4e1600ebe337656f349a2b)
+++ src/sas/sasgui/guiframe/dataFitting.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -3,5 +3,5 @@
 """
 import copy
-import numpy
+import numpy as np
 import math
 from sas.sascalc.data_util.uncertainty import Uncertainty
@@ -81,9 +81,9 @@
             result.dxw = None
         else:
-            result.dxw = numpy.zeros(len(self.x))
+            result.dxw = np.zeros(len(self.x))
         if self.dxl == None:
             result.dxl = None
         else:
-            result.dxl = numpy.zeros(len(self.x))
+            result.dxl = np.zeros(len(self.x))
 
         for i in range(len(self.x)):
@@ -128,44 +128,44 @@
             result.dlam = None
         else:
-            result.dlam = numpy.zeros(tot_length)
+            result.dlam = np.zeros(tot_length)
         if self.dy == None or other.dy is None:
             result.dy = None
         else:
-            result.dy = numpy.zeros(tot_length)
+            result.dy = np.zeros(tot_length)
         if self.dx == None or other.dx is None:
             result.dx = None
         else:
-            result.dx = numpy.zeros(tot_length)
+            result.dx = np.zeros(tot_length)
         if self.dxw == None or other.dxw is None:
             result.dxw = None
         else:
-            result.dxw = numpy.zeros(tot_length)
+            result.dxw = np.zeros(tot_length)
         if self.dxl == None or other.dxl is None:
             result.dxl = None
         else:
-            result.dxl = numpy.zeros(tot_length)
-
-        result.x = numpy.append(self.x, other.x)
+            result.dxl = np.zeros(tot_length)
+
+        result.x = np.append(self.x, other.x)
         #argsorting
-        ind = numpy.argsort(result.x)
+        ind = np.argsort(result.x)
         result.x = result.x[ind]
-        result.y = numpy.append(self.y, other.y)
+        result.y = np.append(self.y, other.y)
         result.y = result.y[ind]
-        result.lam = numpy.append(self.lam, other.lam)
+        result.lam = np.append(self.lam, other.lam)
         result.lam = result.lam[ind]
         if result.dlam != None:
-            result.dlam = numpy.append(self.dlam, other.dlam)
+            result.dlam = np.append(self.dlam, other.dlam)
             result.dlam = result.dlam[ind]
         if result.dy != None:
-            result.dy = numpy.append(self.dy, other.dy)
+            result.dy = np.append(self.dy, other.dy)
             result.dy = result.dy[ind]
         if result.dx is not None:
-            result.dx = numpy.append(self.dx, other.dx)
+            result.dx = np.append(self.dx, other.dx)
             result.dx = result.dx[ind]
         if result.dxw is not None:
-            result.dxw = numpy.append(self.dxw, other.dxw)
+            result.dxw = np.append(self.dxw, other.dxw)
             result.dxw = result.dxw[ind]
         if result.dxl is not None:
-            result.dxl = numpy.append(self.dxl, other.dxl)
+            result.dxl = np.append(self.dxl, other.dxl)
             result.dxl = result.dxl[ind]
         return result
@@ -230,11 +230,11 @@
             result.dxw = None
         else:
-            result.dxw = numpy.zeros(len(self.x))
+            result.dxw = np.zeros(len(self.x))
         if self.dxl == None:
             result.dxl = None
         else:
-            result.dxl = numpy.zeros(len(self.x))
-
-        for i in range(numpy.size(self.x)):
+            result.dxl = np.zeros(len(self.x))
+
+        for i in range(np.size(self.x)):
             result.x[i] = self.x[i]
             if self.dx is not None and len(self.x) == len(self.dx):
@@ -282,40 +282,40 @@
             result.dlam = None
         else:
-            result.dlam = numpy.zeros(tot_length)
+            result.dlam = np.zeros(tot_length)
         if self.dy == None or other.dy is None:
             result.dy = None
         else:
-            result.dy = numpy.zeros(tot_length)
+            result.dy = np.zeros(tot_length)
         if self.dx == None or other.dx is None:
             result.dx = None
         else:
-            result.dx = numpy.zeros(tot_length)
+            result.dx = np.zeros(tot_length)
         if self.dxw == None or other.dxw is None:
             result.dxw = None
         else:
-            result.dxw = numpy.zeros(tot_length)
+            result.dxw = np.zeros(tot_length)
         if self.dxl == None or other.dxl is None:
             result.dxl = None
         else:
-            result.dxl = numpy.zeros(tot_length)
-        result.x = numpy.append(self.x, other.x)
+            result.dxl = np.zeros(tot_length)
+        result.x = np.append(self.x, other.x)
         #argsorting
-        ind = numpy.argsort(result.x)
+        ind = np.argsort(result.x)
         result.x = result.x[ind]
-        result.y = numpy.append(self.y, other.y)
+        result.y = np.append(self.y, other.y)
         result.y = result.y[ind]
-        result.lam = numpy.append(self.lam, other.lam)
+        result.lam = np.append(self.lam, other.lam)
         result.lam = result.lam[ind]
         if result.dy != None:
-            result.dy = numpy.append(self.dy, other.dy)
+            result.dy = np.append(self.dy, other.dy)
             result.dy = result.dy[ind]
         if result.dx is not None:
-            result.dx = numpy.append(self.dx, other.dx)
+            result.dx = np.append(self.dx, other.dx)
             result.dx = result.dx[ind]
         if result.dxw is not None:
-            result.dxw = numpy.append(self.dxw, other.dxw)
+            result.dxw = np.append(self.dxw, other.dxw)
             result.dxw = result.dxw[ind]
         if result.dxl is not None:
-            result.dxl = numpy.append(self.dxl, other.dxl)
+            result.dxl = np.append(self.dxl, other.dxl)
             result.dxl = result.dxl[ind]
         return result
@@ -409,10 +409,10 @@
             result.dqy_data = None
         else:
-            result.dqx_data = numpy.zeros(len(self.data))
-            result.dqy_data = numpy.zeros(len(self.data))
-        for i in range(numpy.size(self.data)):
+            result.dqx_data = np.zeros(len(self.data))
+            result.dqy_data = np.zeros(len(self.data))
+        for i in range(np.size(self.data)):
             result.data[i] = self.data[i]
             if self.err_data is not None and \
-                numpy.size(self.data) == numpy.size(self.err_data):
+                            np.size(self.data) == np.size(self.err_data):
                 result.err_data[i] = self.err_data[i]    
             if self.dqx_data is not None:
@@ -473,20 +473,20 @@
             result.dqy_data = None
         else:
-            result.dqx_data = numpy.zeros(len(self.data) + \
-                                         numpy.size(other.data))
-            result.dqy_data = numpy.zeros(len(self.data) + \
-                                         numpy.size(other.data))
-        
-        result.data = numpy.append(self.data, other.data)
-        result.qx_data = numpy.append(self.qx_data, other.qx_data)
-        result.qy_data = numpy.append(self.qy_data, other.qy_data)
-        result.q_data = numpy.append(self.q_data, other.q_data)
-        result.mask = numpy.append(self.mask, other.mask)
+            result.dqx_data = np.zeros(len(self.data) + \
+                                       np.size(other.data))
+            result.dqy_data = np.zeros(len(self.data) + \
+                                       np.size(other.data))
+        
+        result.data = np.append(self.data, other.data)
+        result.qx_data = np.append(self.qx_data, other.qx_data)
+        result.qy_data = np.append(self.qy_data, other.qy_data)
+        result.q_data = np.append(self.q_data, other.q_data)
+        result.mask = np.append(self.mask, other.mask)
         if result.err_data is not None:
-            result.err_data = numpy.append(self.err_data, other.err_data) 
+            result.err_data = np.append(self.err_data, other.err_data)
         if self.dqx_data is not None:
-            result.dqx_data = numpy.append(self.dqx_data, other.dqx_data)
+            result.dqx_data = np.append(self.dqx_data, other.dqx_data)
         if self.dqy_data is not None:
-            result.dqy_data = numpy.append(self.dqy_data, other.dqy_data)
+            result.dqy_data = np.append(self.dqy_data, other.dqy_data)
 
         return result
Index: src/sas/sasgui/guiframe/data_processor.py
===================================================================
--- src/sas/sasgui/guiframe/data_processor.py	(revision 468c253c89c2bc195e3eca784469c3cc90858004)
+++ src/sas/sasgui/guiframe/data_processor.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -1091,5 +1091,5 @@
             # When inputs are from an external file
             return inputs, outputs
-        inds = numpy.lexsort((to_be_sort, to_be_sort))
+        inds = np.lexsort((to_be_sort, to_be_sort))
         for key in outputs.keys():
             key_list = outputs[key]
@@ -1379,5 +1379,5 @@
             return
         if dy == None:
-            dy = numpy.zeros(len(y))
+            dy = np.zeros(len(y))
         #plotting
         new_plot = Data1D(x=x, y=y, dy=dy)
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py	(revision 29e872e4d97689a48f665443a8b1fbfae9813a54)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -14,5 +14,5 @@
 import sys
 import math
-import numpy
+import numpy as np
 import logging
 from sas.sasgui.plottools.PlotPanel import PlotPanel
@@ -288,5 +288,5 @@
         :Param value: float
         """
-        idx = (numpy.abs(array - value)).argmin()
+        idx = (np.abs(array - value)).argmin()
         return int(idx)  # array.flat[idx]
 
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py	(revision b2b3693291d8e49fd33718753161206c1964548c)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -14,5 +14,5 @@
 import sys
 import math
-import numpy
+import numpy as np
 import logging
 from sas.sasgui.plottools.PlotPanel import PlotPanel
@@ -567,5 +567,5 @@
         """
         # Find the best number of bins
-        npt = math.sqrt(len(self.data2D.data[numpy.isfinite(self.data2D.data)]))
+        npt = math.sqrt(len(self.data2D.data[np.isfinite(self.data2D.data)]))
         npt = math.floor(npt)
         from sas.sascalc.dataloader.manipulations import CircularAverage
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/boxSlicer.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/boxSlicer.py	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/boxSlicer.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -1,5 +1,5 @@
 import wx
 import math
-import numpy
+import numpy as np
 from sas.sasgui.guiframe.events import NewPlotEvent
 from sas.sasgui.guiframe.events import StatusEvent
@@ -358,7 +358,7 @@
         # # Reset x, y- coordinates if send as parameters
         if x != None:
-            self.x = numpy.sign(self.x) * math.fabs(x)
+            self.x = np.sign(self.x) * math.fabs(x)
         if y != None:
-            self.y = numpy.sign(self.y) * math.fabs(y)
+            self.y = np.sign(self.y) * math.fabs(y)
         # # Draw lines and markers
         self.inner_marker.set(xdata=[0], ydata=[self.y])
@@ -465,7 +465,7 @@
         # # reset x, y -coordinates if given as parameters
         if x != None:
-            self.x = numpy.sign(self.x) * math.fabs(x)
+            self.x = np.sign(self.x) * math.fabs(x)
         if y != None:
-            self.y = numpy.sign(self.y) * math.fabs(y)
+            self.y = np.sign(self.y) * math.fabs(y)
         # # draw lines and markers
         self.inner_marker.set(xdata=[self.x], ydata=[0])
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/masking.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/masking.py	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/masking.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -24,5 +24,5 @@
 import math
 import copy
-import numpy
+import numpy as np
 from sas.sasgui.plottools.PlotPanel import PlotPanel
 from sas.sasgui.plottools.plottables import Graph
@@ -298,5 +298,5 @@
         self.subplot.set_ylim(self.data.ymin, self.data.ymax)
         self.subplot.set_xlim(self.data.xmin, self.data.xmax)
-        mask = numpy.ones(len(self.data.mask), dtype=bool)
+        mask = np.ones(len(self.data.mask), dtype=bool)
         self.data.mask = mask
         # update mask plot
@@ -343,5 +343,5 @@
             self.mask = mask
         # make temperary data to plot
-        temp_mask = numpy.zeros(len(mask))
+        temp_mask = np.zeros(len(mask))
         temp_data = copy.deepcopy(self.data)
         # temp_data default is None
Index: src/sas/sasgui/perspectives/calculator/data_operator.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/data_operator.py	(revision 61780e3355265f8377c4d588db7b820d2c9989a7)
+++ src/sas/sasgui/perspectives/calculator/data_operator.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -5,5 +5,5 @@
 import sys
 import time
-import numpy
+import numpy as np
 from sas.sascalc.dataloader.data_info import Data1D
 from sas.sasgui.plottools.PlotPanel import PlotPanel
@@ -541,7 +541,7 @@
                     theory, _ = theory_list.values()[0]
                     dnames.append(theory.name)
-        ind = numpy.argsort(dnames)
+        ind = np.argsort(dnames)
         if len(ind) > 0:
-            val_list = numpy.array(self._data.values())[ind]
+            val_list = np.array(self._data.values())[ind]
             for datastate in val_list:
                 data = datastate.data
Index: src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py	(revision 0f7c930fc2c325971c76a60d39f2e3719b8143a3)
+++ src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -7,5 +7,5 @@
 import sys
 import os
-import numpy
+import numpy as np
 #import math
 import wx.aui as aui
@@ -741,6 +741,6 @@
             marker = 'o'
             m_size = 3.5
-        sld_tot = (numpy.fabs(sld_mx) + numpy.fabs(sld_my) + \
-                   numpy.fabs(sld_mz) + numpy.fabs(output.sld_n))
+        sld_tot = (np.fabs(sld_mx) + np.fabs(sld_my) + \
+                   np.fabs(sld_mz) + np.fabs(output.sld_n))
         is_nonzero = sld_tot > 0.0
         is_zero = sld_tot == 0.0
@@ -757,8 +757,8 @@
             pix_symbol = output.pix_symbol[is_nonzero]
         # II. Plot selective points in color
-        other_color = numpy.ones(len(pix_symbol), dtype='bool')
+        other_color = np.ones(len(pix_symbol), dtype='bool')
         for key in color_dic.keys():
             chosen_color = pix_symbol == key
-            if numpy.any(chosen_color):
+            if np.any(chosen_color):
                 other_color = other_color & (chosen_color != True)
                 color = color_dic[key]
@@ -767,5 +767,5 @@
                         markeredgecolor=color, markersize=m_size, label=key)
         # III. Plot All others        
-        if numpy.any(other_color):
+        if np.any(other_color):
             a_name = ''
             if output.pix_type == 'atom':
@@ -795,7 +795,7 @@
                 draw magnetic vectors w/arrow
                 """
-                max_mx = max(numpy.fabs(sld_mx))
-                max_my = max(numpy.fabs(sld_my))
-                max_mz = max(numpy.fabs(sld_mz))
+                max_mx = max(np.fabs(sld_mx))
+                max_my = max(np.fabs(sld_my))
+                max_mz = max(np.fabs(sld_mz))
                 max_m = max(max_mx, max_my, max_mz)
                 try:
@@ -812,14 +812,14 @@
                         unit_z2 = sld_mz / max_m
                         # 0.8 is for avoiding the color becomes white=(1,1,1))
-                        color_x = numpy.fabs(unit_x2 * 0.8)
-                        color_y = numpy.fabs(unit_y2 * 0.8)
-                        color_z = numpy.fabs(unit_z2 * 0.8)
+                        color_x = np.fabs(unit_x2 * 0.8)
+                        color_y = np.fabs(unit_y2 * 0.8)
+                        color_z = np.fabs(unit_z2 * 0.8)
                         x2 = pos_x + unit_x2 * max_step
                         y2 = pos_y + unit_y2 * max_step
                         z2 = pos_z + unit_z2 * max_step
-                        x_arrow = numpy.column_stack((pos_x, x2))
-                        y_arrow = numpy.column_stack((pos_y, y2))
-                        z_arrow = numpy.column_stack((pos_z, z2))
-                        colors = numpy.column_stack((color_x, color_y, color_z))
+                        x_arrow = np.column_stack((pos_x, x2))
+                        y_arrow = np.column_stack((pos_y, y2))
+                        z_arrow = np.column_stack((pos_z, z2))
+                        colors = np.column_stack((color_x, color_y, color_z))
                         arrows = Arrow3D(panel, x_arrow, z_arrow, y_arrow,
                                         colors, mutation_scale=10, lw=1,
@@ -880,9 +880,9 @@
             if self.is_avg or self.is_avg == None:
                 self._create_default_1d_data()
-                i_out = numpy.zeros(len(self.data.y))
+                i_out = np.zeros(len(self.data.y))
                 inputs = [self.data.x, [], i_out]
             else:
                 self._create_default_2d_data()
-                i_out = numpy.zeros(len(self.data.data))
+                i_out = np.zeros(len(self.data.data))
                 inputs = [self.data.qx_data, self.data.qy_data, i_out]
 
@@ -989,5 +989,5 @@
         :Param input: input list [qx_data, qy_data, i_out]
         """
-        out = numpy.empty(0)
+        out = np.empty(0)
         #s = time.time()
         for ind in range(len(input[0])):
@@ -998,5 +998,5 @@
                 inputi = [input[0][ind:ind + 1], [], input[2][ind:ind + 1]]
                 outi = self.model.run(inputi)
-                out = numpy.append(out, outi)
+                out = np.append(out, outi)
             else:
                 if ind % 50 == 0  and update != None:
@@ -1006,5 +1006,5 @@
                           input[2][ind:ind + 1]]
                 outi = self.model.runXY(inputi)
-                out = numpy.append(out, outi)
+                out = np.append(out, outi)
         #print time.time() - s
         if self.is_avg or self.is_avg == None:
@@ -1027,5 +1027,5 @@
         self.npts_x = int(float(self.npt_ctl.GetValue()))
         self.data = Data2D()
-        qmax = self.qmax_x #/ numpy.sqrt(2)
+        qmax = self.qmax_x #/ np.sqrt(2)
         self.data.xaxis('\\rm{Q_{x}}', '\AA^{-1}')
         self.data.yaxis('\\rm{Q_{y}}', '\AA^{-1}')
@@ -1048,22 +1048,22 @@
         qstep = self.npts_x
 
-        x = numpy.linspace(start=xmin, stop=xmax, num=qstep, endpoint=True)
-        y = numpy.linspace(start=ymin, stop=ymax, num=qstep, endpoint=True)
+        x = np.linspace(start=xmin, stop=xmax, num=qstep, endpoint=True)
+        y = np.linspace(start=ymin, stop=ymax, num=qstep, endpoint=True)
         ## use data info instead
-        new_x = numpy.tile(x, (len(y), 1))
-        new_y = numpy.tile(y, (len(x), 1))
+        new_x = np.tile(x, (len(y), 1))
+        new_y = np.tile(y, (len(x), 1))
         new_y = new_y.swapaxes(0, 1)
         # all data reuire now in 1d array
         qx_data = new_x.flatten()
         qy_data = new_y.flatten()
-        q_data = numpy.sqrt(qx_data * qx_data + qy_data * qy_data)
+        q_data = np.sqrt(qx_data * qx_data + qy_data * qy_data)
         # set all True (standing for unmasked) as default
-        mask = numpy.ones(len(qx_data), dtype=bool)
+        mask = np.ones(len(qx_data), dtype=bool)
         # store x and y bin centers in q space
         x_bins = x
         y_bins = y
         self.data.source = Source()
-        self.data.data = numpy.ones(len(mask))
-        self.data.err_data = numpy.ones(len(mask))
+        self.data.data = np.ones(len(mask))
+        self.data.err_data = np.ones(len(mask))
         self.data.qx_data = qx_data
         self.data.qy_data = qy_data
@@ -1084,5 +1084,5 @@
         :warning: This data is never plotted.
                     residuals.x = data_copy.x[index]
-            residuals.dy = numpy.ones(len(residuals.y))
+            residuals.dy = np.ones(len(residuals.y))
             residuals.dx = None
             residuals.dxl = None
@@ -1091,15 +1091,15 @@
         self.qmax_x = float(self.qmax_ctl.GetValue())
         self.npts_x = int(float(self.npt_ctl.GetValue()))
-        qmax = self.qmax_x #/ numpy.sqrt(2)
+        qmax = self.qmax_x #/ np.sqrt(2)
         ## Default values
         xmax = qmax
         xmin = qmax * _Q1D_MIN
         qstep = self.npts_x
-        x = numpy.linspace(start=xmin, stop=xmax, num=qstep, endpoint=True)
+        x = np.linspace(start=xmin, stop=xmax, num=qstep, endpoint=True)
         # store x and y bin centers in q space
         #self.data.source = Source()
-        y = numpy.ones(len(x))
-        dy = numpy.zeros(len(x))
-        dx = numpy.zeros(len(x))
+        y = np.ones(len(x))
+        dy = np.zeros(len(x))
+        dx = np.zeros(len(x))
         self.data = Data1D(x=x, y=y)
         self.data.dx = dx
@@ -1171,5 +1171,5 @@
         state = None
 
-        numpy.nan_to_num(image)
+        np.nan_to_num(image)
         new_plot = Data2D(image=image, err_image=data.err_data)
         new_plot.name = model.name + '2d'
@@ -1640,7 +1640,7 @@
             for key in sld_list.keys():
                 if ctr_list[0] == key:
-                    min_val = numpy.min(sld_list[key])
-                    max_val = numpy.max(sld_list[key])
-                    mean_val = numpy.mean(sld_list[key])
+                    min_val = np.min(sld_list[key])
+                    max_val = np.max(sld_list[key])
+                    mean_val = np.mean(sld_list[key])
                     enable = (min_val == max_val) and \
                              sld_data.pix_type == 'pixel'
@@ -1733,5 +1733,5 @@
                     npts = -1
                     break
-                if numpy.isfinite(n_val):
+                if np.isfinite(n_val):
                     npts *= int(n_val)
             if npts > 0:
@@ -1770,5 +1770,5 @@
                         ctl.Refresh()
                         return
-                    if numpy.isfinite(s_val):
+                    if np.isfinite(s_val):
                         s_size *= s_val
                 self.sld_data.set_pixel_volumes(s_size)
@@ -1787,5 +1787,5 @@
         try:
             sld_data = self.parent.get_sld_from_omf()
-            #nop = (nop * numpy.pi) / 6
+            #nop = (nop * np.pi) / 6
             nop = len(sld_data.sld_n)
         except:
Index: src/sas/sasgui/perspectives/fitting/basepage.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/basepage.py	(revision 7a5aedda76976d4f6d7b04abfca1d59d2455dd6d)
+++ src/sas/sasgui/perspectives/fitting/basepage.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -5,5 +5,5 @@
 import os
 import wx
-import numpy
+import numpy as np
 import time
 import copy
@@ -100,5 +100,5 @@
         self.graph_id = None
         # Q range for data set
-        self.qmin_data_set = numpy.inf
+        self.qmin_data_set = np.inf
         self.qmax_data_set = None
         self.npts_data_set = 0
@@ -120,6 +120,5 @@
         self.dxw = None
         # pinhole smear
-        self.dx_min = None
-        self.dx_max = None
+        self.dx_percent = None
         # smear attrbs
         self.enable_smearer = None
@@ -279,5 +278,5 @@
 
         """
-        x = numpy.linspace(start=self.qmin_x, stop=self.qmax_x,
+        x = np.linspace(start=self.qmin_x, stop=self.qmax_x,
                            num=self.npts_x, endpoint=True)
         self.data = Data1D(x=x)
@@ -296,14 +295,14 @@
         """
         if self.qmin_x >= 1.e-10:
-            qmin = numpy.log10(self.qmin_x)
+            qmin = np.log10(self.qmin_x)
         else:
             qmin = -10.
 
         if self.qmax_x <= 1.e10:
-            qmax = numpy.log10(self.qmax_x)
+            qmax = np.log10(self.qmax_x)
         else:
             qmax = 10.
 
-        x = numpy.logspace(start=qmin, stop=qmax,
+        x = np.logspace(start=qmin, stop=qmax,
                            num=self.npts_x, endpoint=True, base=10.0)
         self.data = Data1D(x=x)
@@ -342,16 +341,16 @@
         qstep = self.npts_x
 
-        x = numpy.linspace(start=xmin, stop=xmax, num=qstep, endpoint=True)
-        y = numpy.linspace(start=ymin, stop=ymax, num=qstep, endpoint=True)
+        x = np.linspace(start=xmin, stop=xmax, num=qstep, endpoint=True)
+        y = np.linspace(start=ymin, stop=ymax, num=qstep, endpoint=True)
         # use data info instead
-        new_x = numpy.tile(x, (len(y), 1))
-        new_y = numpy.tile(y, (len(x), 1))
+        new_x = np.tile(x, (len(y), 1))
+        new_y = np.tile(y, (len(x), 1))
         new_y = new_y.swapaxes(0, 1)
         # all data reuire now in 1d array
         qx_data = new_x.flatten()
         qy_data = new_y.flatten()
-        q_data = numpy.sqrt(qx_data * qx_data + qy_data * qy_data)
+        q_data = np.sqrt(qx_data * qx_data + qy_data * qy_data)
         # set all True (standing for unmasked) as default
-        mask = numpy.ones(len(qx_data), dtype=bool)
+        mask = np.ones(len(qx_data), dtype=bool)
         # store x and y bin centers in q space
         x_bins = x
@@ -359,6 +358,6 @@
 
         self.data.source = Source()
-        self.data.data = numpy.ones(len(mask))
-        self.data.err_data = numpy.ones(len(mask))
+        self.data.data = np.ones(len(mask))
+        self.data.err_data = np.ones(len(mask))
         self.data.qx_data = qx_data
         self.data.qy_data = qy_data
@@ -784,5 +783,5 @@
                     # Skip non-data lines
                     logging.error(traceback.format_exc())
-            return numpy.array(angles), numpy.array(weights)
+            return np.array(angles), np.array(weights)
         except:
             raise
@@ -849,6 +848,5 @@
         self.state.pinhole_smearer = \
                                 copy.deepcopy(self.pinhole_smearer.GetValue())
-        self.state.dx_max = copy.deepcopy(self.dx_max)
-        self.state.dx_min = copy.deepcopy(self.dx_min)
+        self.state.dx_percent = copy.deepcopy(self.dx_percent)
         self.state.dxl = copy.deepcopy(self.dxl)
         self.state.dxw = copy.deepcopy(self.dxw)
@@ -1247,10 +1245,9 @@
         # we have two more options for smearing
         if self.pinhole_smearer.GetValue():
-            self.dx_min = state.dx_min
-            self.dx_max = state.dx_max
-            if self.dx_min is not None:
-                self.smear_pinhole_min.SetValue(str(self.dx_min))
-            if self.dx_max is not None:
-                self.smear_pinhole_max.SetValue(str(self.dx_max))
+            self.dx_percent = state.dx_percent
+            if self.dx_percent is not None:
+                if state.dx_old:
+                    self.dx_percent = 100 * (self.dx_percent / self.data.x[0])
+                self.smear_pinhole_percent.SetValue("%.2f" % self.dx_percent)
             self.onPinholeSmear(event=None)
         elif self.slit_smearer.GetValue():
@@ -1452,17 +1449,4 @@
                 self.state_change = True
                 self._draw_model()
-                # Time delay has been introduced to prevent _handle error
-                # on Windows
-                # This part of code is executed when model is selected and
-                # it's parameters are changed (with respect to previously
-                # selected model). There are two Iq evaluations occuring one
-                # after another and therefore there may be compilation error
-                # if model is calculated for the first time.
-                # This seems to be Windows only issue - haven't tested on Linux
-                # though.The proper solution (other than time delay) requires
-                # more fundemental code refatoring
-                # Wojtek P. Nov 7, 2016
-                if not ON_MAC:
-                    time.sleep(0.1)
                 self.Refresh()
 
@@ -2123,5 +2107,5 @@
         for data in self.data_list:
             # q value from qx and qy
-            radius = numpy.sqrt(data.qx_data * data.qx_data +
+            radius = np.sqrt(data.qx_data * data.qx_data +
                                 data.qy_data * data.qy_data)
             # get unmasked index
@@ -2129,5 +2113,5 @@
                          (radius <= float(self.qmax.GetValue()))
             index_data = (index_data) & (data.mask)
-            index_data = (index_data) & (numpy.isfinite(data.data))
+            index_data = (index_data) & (np.isfinite(data.data))
 
             if len(index_data[index_data]) < 10:
@@ -2164,5 +2148,5 @@
             index_data = (float(self.qmin.GetValue()) <= radius) & \
                          (radius <= float(self.qmax.GetValue()))
-            index_data = (index_data) & (numpy.isfinite(data.y))
+            index_data = (index_data) & (np.isfinite(data.y))
 
             if len(index_data[index_data]) < 5:
@@ -2236,6 +2220,6 @@
 
                 # Check that min is less than max
-                low = -numpy.inf if min_str == "" else float(min_str)
-                high = numpy.inf if max_str == "" else float(max_str)
+                low = -np.inf if min_str == "" else float(min_str)
+                high = np.inf if max_str == "" else float(max_str)
                 if high < low:
                     min_ctrl.SetBackgroundColour("pink")
@@ -2612,16 +2596,6 @@
             Layout is called after fitting.
         """
-        self._sleep4sec()
         self.Layout()
         return
-
-    def _sleep4sec(self):
-        """
-            sleep for 1 sec only applied on Mac
-            Note: This 1sec helps for Mac not to crash on self.
-            Layout after self._draw_model
-        """
-        if ON_MAC:
-            time.sleep(1)
 
     def _find_polyfunc_selection(self, disp_func=None):
@@ -2657,5 +2631,5 @@
             self.qmin_x = data_min
             self.qmax_x = math.sqrt(x * x + y * y)
-            # self.data.mask = numpy.ones(len(self.data.data),dtype=bool)
+            # self.data.mask = np.ones(len(self.data.data),dtype=bool)
             # check smearing
             if not self.disable_smearer.GetValue():
@@ -3369,6 +3343,6 @@
 
             if value[1] == 'array':
-                pd_vals = numpy.array(value[2])
-                pd_weights = numpy.array(value[3])
+                pd_vals = np.array(value[2])
+                pd_weights = np.array(value[3])
                 if len(pd_vals) == 0 or len(pd_vals) != len(pd_weights):
                     msg = ("bad array distribution parameters for %s"
Index: src/sas/sasgui/perspectives/fitting/fitpage.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/fitpage.py	(revision 2d568f649389db3d59ceb4e0e7c433010da67d64)
+++ src/sas/sasgui/perspectives/fitting/fitpage.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -6,5 +6,5 @@
 import wx
 import wx.lib.newevent
-import numpy
+import numpy as np
 import copy
 import math
@@ -29,5 +29,4 @@
 _BOX_WIDTH = 76
 _DATA_BOX_WIDTH = 300
-SMEAR_SIZE_L = 0.00
 SMEAR_SIZE_H = 0.00
 CUSTOM_MODEL = 'Plugin Models'
@@ -210,9 +209,8 @@
               "Please enter only the value of interest to customize smearing..."
         smear_message_new_psmear = \
-              "Please enter both; the dQ will be generated by interpolation..."
+              "Please enter a fixed percentage to be applied to all Q values..."
         smear_message_2d_x_title = "<dQp>[1/A]:"
         smear_message_2d_y_title = "<dQs>[1/A]:"
-        smear_message_pinhole_min_title = "dQ_low[1/A]:"
-        smear_message_pinhole_max_title = "dQ_high[1/A]:"
+        smear_message_pinhole_percent_title = "dQ[%]:"
         smear_message_slit_height_title = "Slit height[1/A]:"
         smear_message_slit_width_title = "Slit width[1/A]:"
@@ -307,12 +305,9 @@
         
         # textcntrl for custom resolution
-        self.smear_pinhole_max = ModelTextCtrl(self, wx.ID_ANY,
-                            size=(_BOX_WIDTH - 25, 20),
-                            style=wx.TE_PROCESS_ENTER,
-                            text_enter_callback=self.onPinholeSmear)
-        self.smear_pinhole_min = ModelTextCtrl(self, wx.ID_ANY,
-                            size=(_BOX_WIDTH - 25, 20),
-                            style=wx.TE_PROCESS_ENTER,
-                            text_enter_callback=self.onPinholeSmear)
+        self.smear_pinhole_percent = ModelTextCtrl(self, wx.ID_ANY,
+                                                   size=(_BOX_WIDTH - 25, 20),
+                                                   style=wx.TE_PROCESS_ENTER,
+                                                   text_enter_callback=
+                                                   self.onPinholeSmear)
         self.smear_slit_height = ModelTextCtrl(self, wx.ID_ANY,
                             size=(_BOX_WIDTH - 25, 20),
@@ -333,6 +328,5 @@
 
         # set default values for smear
-        self.smear_pinhole_max.SetValue(str(self.dx_max))
-        self.smear_pinhole_min.SetValue(str(self.dx_min))
+        self.smear_pinhole_percent.SetValue(str(self.dx_percent))
         self.smear_slit_height.SetValue(str(self.dxl))
         self.smear_slit_width.SetValue(str(self.dxw))
@@ -426,8 +420,7 @@
         self.smear_description_2d_y.SetToolTipString(
                                     " dQs(perpendicular) in q_phi direction.")
-        self.smear_description_pin_min = wx.StaticText(self, wx.ID_ANY,
-                        smear_message_pinhole_min_title, style=wx.ALIGN_LEFT)
-        self.smear_description_pin_max = wx.StaticText(self, wx.ID_ANY,
-                        smear_message_pinhole_max_title, style=wx.ALIGN_LEFT)
+        self.smear_description_pin_percent = wx.StaticText(self, wx.ID_ANY,
+                                            smear_message_pinhole_percent_title,
+                                            style=wx.ALIGN_LEFT)
         self.smear_description_slit_height = wx.StaticText(self, wx.ID_ANY,
                         smear_message_slit_height_title, style=wx.ALIGN_LEFT)
@@ -453,10 +446,7 @@
         self.sizer_new_smear.Add((15, -1))
         self.sizer_new_smear.Add(self.smear_description_2d_x, 0, wx.CENTER, 10)
-        self.sizer_new_smear.Add(self.smear_description_pin_min,
-                                 0, wx.CENTER, 10)
         self.sizer_new_smear.Add(self.smear_description_slit_height,
                                  0, wx.CENTER, 10)
 
-        self.sizer_new_smear.Add(self.smear_pinhole_min, 0, wx.CENTER, 10)
         self.sizer_new_smear.Add(self.smear_slit_height, 0, wx.CENTER, 10)
         self.sizer_new_smear.Add(self.smear_data_left, 0, wx.CENTER, 10)
@@ -464,10 +454,10 @@
         self.sizer_new_smear.Add(self.smear_description_2d_y,
                                  0, wx.CENTER, 10)
-        self.sizer_new_smear.Add(self.smear_description_pin_max,
+        self.sizer_new_smear.Add(self.smear_description_pin_percent,
                                  0, wx.CENTER, 10)
         self.sizer_new_smear.Add(self.smear_description_slit_width,
                                  0, wx.CENTER, 10)
 
-        self.sizer_new_smear.Add(self.smear_pinhole_max, 0, wx.CENTER, 10)
+        self.sizer_new_smear.Add(self.smear_pinhole_percent, 0, wx.CENTER, 10)
         self.sizer_new_smear.Add(self.smear_slit_width, 0, wx.CENTER, 10)
         self.sizer_new_smear.Add(self.smear_data_right, 0, wx.CENTER, 10)
@@ -1125,11 +1115,11 @@
             if item.GetValue():
                 if button_list.index(item) == 0:
-                    flag = 0  # dy = numpy.ones_like(dy_data)
+                    flag = 0  # dy = np.ones_like(dy_data)
                 elif button_list.index(item) == 1:
                     flag = 1  # dy = dy_data
                 elif button_list.index(item) == 2:
-                    flag = 2  # dy = numpy.sqrt(numpy.abs(data))
+                    flag = 2  # dy = np.sqrt(np.abs(data))
                 elif button_list.index(item) == 3:
-                    flag = 3  # dy = numpy.abs(data)
+                    flag = 3  # dy = np.abs(data)
                 break
         return flag
@@ -1432,5 +1422,5 @@
         key = event.GetKeyCode()
         length = len(self.data.x)
-        indx = (numpy.abs(self.data.x - x_data)).argmin()
+        indx = (np.abs(self.data.x - x_data)).argmin()
         # return array.flat[idx]
         if key == wx.WXK_PAGEUP or key == wx.WXK_NUMPAD_PAGEUP:
@@ -1487,9 +1477,9 @@
                     self.enable2D:
                 # set mask
-                radius = numpy.sqrt(self.data.qx_data * self.data.qx_data +
+                radius = np.sqrt(self.data.qx_data * self.data.qx_data +
                                     self.data.qy_data * self.data.qy_data)
                 index_data = ((self.qmin_x <= radius) & (radius <= self.qmax_x))
                 index_data = (index_data) & (self.data.mask)
-                index_data = (index_data) & (numpy.isfinite(self.data.data))
+                index_data = (index_data) & (np.isfinite(self.data.data))
                 if len(index_data[index_data]) < 10:
                     msg = "Cannot Plot :No or too little npts in"
@@ -1581,8 +1571,6 @@
         if self.dxw is None:
             self.dxw = ""
-        if self.dx_min is None:
-            self.dx_min = SMEAR_SIZE_L
-        if self.dx_max is None:
-            self.dx_max = SMEAR_SIZE_H
+        if self.dx_percent is None:
+            self.dx_percent = SMEAR_SIZE_H
 
     def _get_smear_info(self):
@@ -1610,11 +1598,11 @@
                 and data.dqx_data.any() != 0:
                 self.smear_type = "Pinhole2d"
-                self.dq_l = format_number(numpy.average(data.dqx_data))
-                self.dq_r = format_number(numpy.average(data.dqy_data))
+                self.dq_l = format_number(np.average(data.dqx_data))
+                self.dq_r = format_number(np.average(data.dqy_data))
                 return
             else:
                 return
         # check if it is pinhole smear and get min max if it is.
-        if data.dx is not None and numpy.any(data.dx):
+        if data.dx is not None and np.any(data.dx):
             self.smear_type = "Pinhole"
             self.dq_l = data.dx[0]
@@ -1624,7 +1612,7 @@
         elif data.dxl is not None or data.dxw is not None:
             self.smear_type = "Slit"
-            if data.dxl is not None and numpy.all(data.dxl, 0):
+            if data.dxl is not None and np.all(data.dxl, 0):
                 self.dq_l = data.dxl[0]
-            if data.dxw is not None and numpy.all(data.dxw, 0):
+            if data.dxw is not None and np.all(data.dxw, 0):
                 self.dq_r = data.dxw[0]
         # return self.smear_type,self.dq_l,self.dq_r
@@ -1646,6 +1634,5 @@
             self.smear_description_2d_y.Show(True)
             if self.pinhole_smearer.GetValue():
-                self.smear_pinhole_min.Show(True)
-                self.smear_pinhole_max.Show(True)
+                self.smear_pinhole_percent.Show(True)
         # smear from data
         elif self.enable_smearer.GetValue():
@@ -1658,6 +1645,5 @@
                     self.smear_description_slit_width.Show(True)
                 elif self.smear_type == 'Pinhole':
-                    self.smear_description_pin_min.Show(True)
-                    self.smear_description_pin_max.Show(True)
+                    self.smear_description_pin_percent.Show(True)
                 self.smear_description_smear_type.Show(True)
                 self.smear_description_type.Show(True)
@@ -1668,9 +1654,7 @@
             if self.smear_type == 'Pinhole':
                 self.smear_message_new_p.Show(True)
-                self.smear_description_pin_min.Show(True)
-                self.smear_description_pin_max.Show(True)
-
-            self.smear_pinhole_min.Show(True)
-            self.smear_pinhole_max.Show(True)
+                self.smear_description_pin_percent.Show(True)
+
+            self.smear_pinhole_percent.Show(True)
         # custom slit smear
         elif self.slit_smearer.GetValue():
@@ -1697,8 +1681,6 @@
         self.smear_data_left.Hide()
         self.smear_data_right.Hide()
-        self.smear_description_pin_min.Hide()
-        self.smear_pinhole_min.Hide()
-        self.smear_description_pin_max.Hide()
-        self.smear_pinhole_max.Hide()
+        self.smear_description_pin_percent.Hide()
+        self.smear_pinhole_percent.Hide()
         self.smear_description_slit_height.Hide()
         self.smear_slit_height.Hide()
@@ -1826,11 +1808,4 @@
         if not flag:
             self.onSmear(None)
-
-    def _mac_sleep(self, sec=0.2):
-        """
-        Give sleep to MAC
-        """
-        if self.is_mac:
-            time.sleep(sec)
 
     def get_view_mode(self):
@@ -1939,17 +1914,17 @@
                 self.default_mask = copy.deepcopy(self.data.mask)
                 if self.data.err_data is not None \
-                        and numpy.any(self.data.err_data):
+                        and np.any(self.data.err_data):
                     di_flag = True
                 if self.data.dqx_data is not None \
-                        and numpy.any(self.data.dqx_data):
+                        and np.any(self.data.dqx_data):
                     dq_flag = True
             else:
                 self.slit_smearer.Enable(True)
                 self.pinhole_smearer.Enable(True)
-                if self.data.dy is not None and numpy.any(self.data.dy):
+                if self.data.dy is not None and np.any(self.data.dy):
                     di_flag = True
-                if self.data.dx is not None and numpy.any(self.data.dx):
+                if self.data.dx is not None and np.any(self.data.dx):
                     dq_flag = True
-                elif self.data.dxl is not None and numpy.any(self.data.dxl):
+                elif self.data.dxl is not None and np.any(self.data.dxl):
                     dq_flag = True
 
@@ -2085,9 +2060,9 @@
         if self.data.__class__.__name__ == "Data2D" or \
                         self.enable2D:
-            radius = numpy.sqrt(self.data.qx_data * self.data.qx_data +
+            radius = np.sqrt(self.data.qx_data * self.data.qx_data +
                                 self.data.qy_data * self.data.qy_data)
             index_data = (self.qmin_x <= radius) & (radius <= self.qmax_x)
             index_data = (index_data) & (self.data.mask)
-            index_data = (index_data) & (numpy.isfinite(self.data.data))
+            index_data = (index_data) & (np.isfinite(self.data.data))
             npts2fit = len(self.data.data[index_data])
         else:
@@ -2122,5 +2097,5 @@
         # make sure stop button to fit button all the time
         self._on_fit_complete()
-        if out is None or not numpy.isfinite(chisqr):
+        if out is None or not np.isfinite(chisqr):
             raise ValueError, "Fit error occured..."
 
@@ -2133,5 +2108,5 @@
 
         # Check if chi2 is finite
-        if chisqr is not None and numpy.isfinite(chisqr):
+        if chisqr is not None and np.isfinite(chisqr):
             # format chi2
             chi2 = format_number(chisqr, True)
@@ -2185,5 +2160,5 @@
 
                         if cov[ind] is not None:
-                            if numpy.isfinite(float(cov[ind])):
+                            if np.isfinite(float(cov[ind])):
                                 val_err = format_number(cov[ind], True)
                                 item[4].SetForegroundColour(wx.BLACK)
@@ -2206,8 +2181,4 @@
         self.save_current_state()
 
-        if not self.is_mac:
-            self.Layout()
-            self.Refresh()
-        self._mac_sleep(0.1)
         # plot model ( when drawing, do not update chisqr value again)
         self._draw_model(update_chisqr=False, source='fit')
@@ -2249,6 +2220,5 @@
             # event case of radio button
             if tcrtl.GetValue():
-                self.dx_min = 0.0
-                self.dx_max = 0.0
+                self.dx_percent = 0.0
                 is_new_pinhole = True
             else:
@@ -2287,21 +2257,12 @@
         """
         # get the values
-        pin_min = self.smear_pinhole_min.GetValue()
-        pin_max = self.smear_pinhole_max.GetValue()
-
-        # Check changes in slit width
+        pin_percent = self.smear_pinhole_percent.GetValue()
+
+        # Check changes in slit heigth
         try:
-            dx_min = float(pin_min)
+            dx_percent = float(pin_percent)
         except:
             return True
-        if self.dx_min != dx_min:
-            return True
-
-        # Check changes in slit heigth
-        try:
-            dx_max = float(pin_max)
-        except:
-            return True
-        if self.dx_max != dx_max:
+        if self.dx_percent != dx_percent:
             return True
         return False
@@ -2319,55 +2280,33 @@
             self.smear_type = 'Pinhole2d'
             len_data = len(data.data)
-            data.dqx_data = numpy.zeros(len_data)
-            data.dqy_data = numpy.zeros(len_data)
+            data.dqx_data = np.zeros(len_data)
+            data.dqy_data = np.zeros(len_data)
         else:
             self.smear_type = 'Pinhole'
             len_data = len(data.x)
-            data.dx = numpy.zeros(len_data)
+            data.dx = np.zeros(len_data)
             data.dxl = None
             data.dxw = None
         msg = None
 
-        get_pin_min = self.smear_pinhole_min
-        get_pin_max = self.smear_pinhole_max
-
-        if not check_float(get_pin_min):
-            get_pin_min.SetBackgroundColour("pink")
-            msg = "Model Error:wrong value entered!!!"
-        elif not check_float(get_pin_max):
-            get_pin_max.SetBackgroundColour("pink")
+        get_pin_percent = self.smear_pinhole_percent
+
+        if not check_float(get_pin_percent):
+            get_pin_percent.SetBackgroundColour("pink")
             msg = "Model Error:wrong value entered!!!"
         else:
             if len_data < 2:
                 len_data = 2
-            self.dx_min = float(get_pin_min.GetValue())
-            self.dx_max = float(get_pin_max.GetValue())
-            if self.dx_min < 0:
-                get_pin_min.SetBackgroundColour("pink")
+            self.dx_percent = float(get_pin_percent.GetValue())
+            if self.dx_percent < 0:
+                get_pin_percent.SetBackgroundColour("pink")
                 msg = "Model Error:This value can not be negative!!!"
-            elif self.dx_max < 0:
-                get_pin_max.SetBackgroundColour("pink")
-                msg = "Model Error:This value can not be negative!!!"
-            elif self.dx_min is not None and self.dx_max is not None:
+            elif self.dx_percent is not None:
+                percent = self.dx_percent/100
                 if self._is_2D():
-                    data.dqx_data[data.dqx_data == 0] = self.dx_min
-                    data.dqy_data[data.dqy_data == 0] = self.dx_max
-                elif self.dx_min == self.dx_max:
-                    data.dx[data.dx == 0] = self.dx_min
+                    data.dqx_data[data.dqx_data == 0] = percent * data.qx_data
+                    data.dqy_data[data.dqy_data == 0] = percent * data.qy_data
                 else:
-                    step = (self.dx_max - self.dx_min) / (len_data - 1)
-                    data.dx = numpy.arange(self.dx_min,
-                                           self.dx_max + step / 1.1,
-                                           step)
-            elif self.dx_min is not None:
-                if self._is_2D():
-                    data.dqx_data[data.dqx_data == 0] = self.dx_min
-                else:
-                    data.dx[data.dx == 0] = self.dx_min
-            elif self.dx_max is not None:
-                if self._is_2D():
-                    data.dqy_data[data.dqy_data == 0] = self.dx_max
-                else:
-                    data.dx[data.dx == 0] = self.dx_max
+                    data.dx = percent * data.x
             self.current_smearer = smear_selection(data, self.model)
             # 2D need to set accuracy
@@ -2379,6 +2318,5 @@
             wx.PostEvent(self._manager.parent, StatusEvent(status=msg))
         else:
-            get_pin_min.SetBackgroundColour("white")
-            get_pin_max.SetBackgroundColour("white")
+            get_pin_percent.SetBackgroundColour("white")
         # set smearing value whether or not the data contain the smearing info
 
@@ -2520,9 +2458,9 @@
         try:
             self.dxl = float(self.smear_slit_height.GetValue())
-            data.dxl = self.dxl * numpy.ones(data_len)
+            data.dxl = self.dxl * np.ones(data_len)
             self.smear_slit_height.SetBackgroundColour(wx.WHITE)
         except:
             self.dxl = None
-            data.dxl = numpy.zeros(data_len)
+            data.dxl = np.zeros(data_len)
             if self.smear_slit_height.GetValue().lstrip().rstrip() != "":
                 self.smear_slit_height.SetBackgroundColour("pink")
@@ -2533,8 +2471,8 @@
             self.dxw = float(self.smear_slit_width.GetValue())
             self.smear_slit_width.SetBackgroundColour(wx.WHITE)
-            data.dxw = self.dxw * numpy.ones(data_len)
+            data.dxw = self.dxw * np.ones(data_len)
         except:
             self.dxw = None
-            data.dxw = numpy.zeros(data_len)
+            data.dxw = np.zeros(data_len)
             if self.smear_slit_width.GetValue().lstrip().rstrip() != "":
                 self.smear_slit_width.SetBackgroundColour("pink")
@@ -2663,5 +2601,5 @@
             if event is None:
                 output = "-"
-            elif not numpy.isfinite(event.output):
+            elif not np.isfinite(event.output):
                 output = "-"
             else:
Index: src/sas/sasgui/perspectives/fitting/fitting.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/fitting.py	(revision ddbac6633a1e7ec42b99bb39f46b9889ccf26084)
+++ src/sas/sasgui/perspectives/fitting/fitting.py	(revision 4c5098cac470ea0a367a8f92be0ed0ac428bcc12)
@@ -16,5 +16,5 @@
 import wx
 import logging
-import numpy
+import numpy as np
 import time
 from copy import deepcopy
@@ -876,11 +876,4 @@
                 qmin=qmin, qmax=qmax, weight=weight)
 
-    def _mac_sleep(self, sec=0.2):
-        """
-        Give sleep to MAC
-        """
-        if ON_MAC:
-            time.sleep(sec)
-
     def draw_model(self, model, page_id, data=None, smearer=None,
                    enable1D=True, enable2D=False,
@@ -1030,5 +1023,4 @@
                                 manager=self,
                                 improvement_delta=0.1)
-        self._mac_sleep(0.2)
 
         # batch fit
@@ -1270,5 +1262,4 @@
         :param elapsed: time spent at the fitting level
         """
-        self._mac_sleep(0.2)
         uid = page_id[0]
         if uid in self.fit_thread_list.keys():
@@ -1332,5 +1323,5 @@
                     new_theory = copy_data.data
                     new_theory[res.index] = res.theory
-                    new_theory[res.index == False] = numpy.nan
+                    new_theory[res.index == False] = np.nan
                     correct_result = True
                 #get all fittable parameters of the current model
@@ -1341,7 +1332,7 @@
                         param_list.remove(param)
                 if not correct_result or res.fitness is None or \
-                    not numpy.isfinite(res.fitness) or \
-                    numpy.any(res.pvec == None) or not \
-                    numpy.all(numpy.isfinite(res.pvec)):
+                    not np.isfinite(res.fitness) or \
+                        np.any(res.pvec == None) or not \
+                        np.all(np.isfinite(res.pvec)):
                     data_name = str(None)
                     if data is not None:
@@ -1352,5 +1343,5 @@
                     msg += "Data %s and Model %s did not fit.\n" % (data_name,
                                                                     model_name)
-                    ERROR = numpy.NAN
+                    ERROR = np.NAN
                     cell = BatchCell()
                     cell.label = res.fitness
@@ -1366,7 +1357,7 @@
                             batch_inputs["error on %s" % str(param)].append(ERROR)
                 else:
-                    # TODO: Why sometimes res.pvec comes with numpy.float64?
+                    # TODO: Why sometimes res.pvec comes with np.float64?
                     # probably from scipy lmfit
-                    if res.pvec.__class__ == numpy.float64:
+                    if res.pvec.__class__ == np.float64:
                         res.pvec = [res.pvec]
 
@@ -1520,5 +1511,4 @@
             page_id = []
         ## fit more than 1 model at the same time
-        self._mac_sleep(0.2)
         try:
             index = 0
@@ -1533,16 +1523,16 @@
                 fit_msg = res.mesg
                 if res.fitness is None or \
-                    not numpy.isfinite(res.fitness) or \
-                    numpy.any(res.pvec == None) or \
-                    not numpy.all(numpy.isfinite(res.pvec)):
+                    not np.isfinite(res.fitness) or \
+                        np.any(res.pvec == None) or \
+                    not np.all(np.isfinite(res.pvec)):
                     fit_msg += "\nFitting did not converge!!!"
                     wx.CallAfter(self._update_fit_button, page_id)
                 else:
                     #set the panel when fit result are float not list
-                    if res.pvec.__class__ == numpy.float64:
+                    if res.pvec.__class__ == np.float64:
                         pvec = [res.pvec]
                     else:
                         pvec = res.pvec
-                    if res.stderr.__class__ == numpy.float64:
+                    if res.stderr.__class__ == np.float64:
                         stderr = [res.stderr]
                     else:
@@ -1692,5 +1682,5 @@
         if dy is None:
             new_plot.is_data = False
-            new_plot.dy = numpy.zeros(len(y))
+            new_plot.dy = np.zeros(len(y))
             # If this is a theory curve, pick the proper symbol to make it a curve
             new_plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM
@@ -1741,5 +1731,5 @@
         """
         try:
-            numpy.nan_to_num(y)
+            np.nan_to_num(y)
             new_plot = self.create_theory_1D(x, y, page_id, model, data, state,
                                              data_description=model.name,
@@ -1755,13 +1745,12 @@
                                           data_id="Data  " + data.name + " unsmeared",
                                           dy=unsmeared_error)
-                
-            if sq_model is not None and pq_model is not None:
-                self.create_theory_1D(x, sq_model, page_id, model, data, state,
-                                      data_description=model.name + " S(q)",
-                                      data_id=str(page_id) + " " + data.name + " S(q)")
-                self.create_theory_1D(x, pq_model, page_id, model, data, state,
-                                      data_description=model.name + " P(q)",
-                                      data_id=str(page_id) + " " + data.name + " P(q)")
-
+            # Comment this out until we can get P*S models with correctly populated parameters
+            #if sq_model is not None and pq_model is not None:
+            #    self.create_theory_1D(x, sq_model, page_id, model, data, state,
+            #                          data_description=model.name + " S(q)",
+            #                          data_id=str(page_id) + " " + data.name + " S(q)")
+            #    self.create_theory_1D(x, pq_model, page_id, model, data, state,
+            #                          data_description=model.name + " P(q)",
+            #                          data_id=str(page_id) + " " + data.name + " P(q)")
 
             current_pg = self.fit_panel.get_page_by_id(page_id)
@@ -1826,5 +1815,5 @@
         that can be plot.
         """
-        numpy.nan_to_num(image)
+        np.nan_to_num(image)
         new_plot = Data2D(image=image, err_image=data.err_data)
         new_plot.name = model.name + '2d'
@@ -2018,10 +2007,10 @@
         if data_copy.__class__.__name__ == "Data2D":
             if index == None:
-                index = numpy.ones(len(data_copy.data), dtype=bool)
+                index = np.ones(len(data_copy.data), dtype=bool)
             if weight != None:
                 data_copy.err_data = weight
             # get rid of zero error points
             index = index & (data_copy.err_data != 0)
-            index = index & (numpy.isfinite(data_copy.data))
+            index = index & (np.isfinite(data_copy.data))
             fn = data_copy.data[index]
             theory_data = self.page_finder[page_id].get_theory_data(fid=data_copy.id)
@@ -2033,9 +2022,9 @@
             # 1 d theory from model_thread is only in the range of index
             if index == None:
-                index = numpy.ones(len(data_copy.y), dtype=bool)
+                index = np.ones(len(data_copy.y), dtype=bool)
             if weight != None:
                 data_copy.dy = weight
             if data_copy.dy == None or data_copy.dy == []:
-                dy = numpy.ones(len(data_copy.y))
+                dy = np.ones(len(data_copy.y))
             else:
                 ## Set consistently w/AbstractFitengine:
@@ -2058,7 +2047,7 @@
             return
 
-        residuals = res[numpy.isfinite(res)]
+        residuals = res[np.isfinite(res)]
         # get chisqr only w/finite
-        chisqr = numpy.average(residuals * residuals)
+        chisqr = np.average(residuals * residuals)
 
         self._plot_residuals(page_id=page_id, data=data_copy,
@@ -2097,5 +2086,5 @@
             residuals.qy_data = data_copy.qy_data
             residuals.q_data = data_copy.q_data
-            residuals.err_data = numpy.ones(len(residuals.data))
+            residuals.err_data = np.ones(len(residuals.data))
             residuals.xmin = min(residuals.qx_data)
             residuals.xmax = max(residuals.qx_data)
@@ -2111,8 +2100,8 @@
             # 1 d theory from model_thread is only in the range of index
             if data_copy.dy == None or data_copy.dy == []:
-                dy = numpy.ones(len(data_copy.y))
+                dy = np.ones(len(data_copy.y))
             else:
                 if weight == None:
-                    dy = numpy.ones(len(data_copy.y))
+                    dy = np.ones(len(data_copy.y))
                 ## Set consitently w/AbstractFitengine:
                 ## But this should be corrected later.
@@ -2133,5 +2122,5 @@
                 residuals.y = (fn - gn[index]) / en
             residuals.x = data_copy.x[index]
-            residuals.dy = numpy.ones(len(residuals.y))
+            residuals.dy = np.ones(len(residuals.y))
             residuals.dx = None
             residuals.dxl = None
Index: src/sas/sasgui/perspectives/fitting/media/plugin.rst
===================================================================
--- src/sas/sasgui/perspectives/fitting/media/plugin.rst	(revision 5295cf5164af9572978a04500767b155d0356342)
+++ src/sas/sasgui/perspectives/fitting/media/plugin.rst	(revision 984f3fc674aba45cfbaea60989743bfcf9507987)
@@ -364,4 +364,7 @@
   - the limits will show up as the default limits for the fit making it easy,
     for example, to force the radius to always be greater than zero.
+
+  - these are hard limits defining the valid range of parameter values;
+    polydisperity distributions will be truncated at the limits.
 
 - **"type"** can be one of: "", "sld", "volume", or "orientation".
Index: src/sas/sasgui/perspectives/fitting/model_thread.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/model_thread.py	(revision c1c9929d6b02699660b0af8a643376612943deb8)
+++ src/sas/sasgui/perspectives/fitting/model_thread.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -4,5 +4,5 @@
 
 import time
-import numpy
+import numpy as np
 import math
 from sas.sascalc.data_util.calcthread import CalcThread
@@ -68,5 +68,5 @@
 
         # Define matrix where data will be plotted
-        radius = numpy.sqrt((self.data.qx_data * self.data.qx_data) + \
+        radius = np.sqrt((self.data.qx_data * self.data.qx_data) + \
                     (self.data.qy_data * self.data.qy_data))
 
@@ -75,5 +75,5 @@
         index_model = (self.qmin <= radius) & (radius <= self.qmax)
         index_model = index_model & self.data.mask
-        index_model = index_model & numpy.isfinite(self.data.data)
+        index_model = index_model & np.isfinite(self.data.data)
 
         if self.smearer is not None:
@@ -91,5 +91,5 @@
                 self.data.qy_data[index_model]
             ])
-        output = numpy.zeros(len(self.data.qx_data))
+        output = np.zeros(len(self.data.qx_data))
         # output default is None
         # This method is to distinguish between masked
@@ -163,5 +163,5 @@
         """
         self.starttime = time.time()
-        output = numpy.zeros((len(self.data.x)))
+        output = np.zeros((len(self.data.x)))
         index = (self.qmin <= self.data.x) & (self.data.x <= self.qmax)
 
@@ -175,5 +175,5 @@
                                                              self.qmax)
             mask = self.data.x[first_bin:last_bin+1]
-            unsmeared_output = numpy.zeros((len(self.data.x)))
+            unsmeared_output = np.zeros((len(self.data.x)))
             unsmeared_output[first_bin:last_bin+1] = self.model.evalDistribution(mask)
             self.smearer.model = self.model
@@ -183,7 +183,7 @@
             # Check that the arrays are compatible. If we only have a model but no data,
             # the length of data.y will be zero.
-            if isinstance(self.data.y, numpy.ndarray) and output.shape == self.data.y.shape:
-                unsmeared_data = numpy.zeros((len(self.data.x)))
-                unsmeared_error = numpy.zeros((len(self.data.x)))
+            if isinstance(self.data.y, np.ndarray) and output.shape == self.data.y.shape:
+                unsmeared_data = np.zeros((len(self.data.x)))
+                unsmeared_error = np.zeros((len(self.data.x)))
                 unsmeared_data[first_bin:last_bin+1] = self.data.y[first_bin:last_bin+1]\
                                                         * unsmeared_output[first_bin:last_bin+1]\
@@ -209,6 +209,6 @@
 
         if p_model is not None and s_model is not None:
-            sq_values = numpy.zeros((len(self.data.x)))
-            pq_values = numpy.zeros((len(self.data.x)))
+            sq_values = np.zeros((len(self.data.x)))
+            pq_values = np.zeros((len(self.data.x)))
             sq_values[index] = s_model.evalDistribution(self.data.x[index])
             pq_values[index] = p_model.evalDistribution(self.data.x[index])
Index: src/sas/sasgui/perspectives/fitting/pagestate.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/pagestate.py	(revision 7160131266189ab2ccf927b6fde2648ec04b8260)
+++ src/sas/sasgui/perspectives/fitting/pagestate.py	(revision 27109e5cd4b7a9b36dd9bb6e66db62057374322b)
@@ -18,5 +18,5 @@
 import copy
 import logging
-import numpy
+import numpy as np
 import traceback
 
@@ -74,6 +74,5 @@
                             ["dq_l", "dq_l", "float"],
                             ["dq_r", "dq_r", "float"],
-                            ["dx_max", "dx_max", "float"],
-                            ["dx_min", "dx_min", "float"],
+                            ["dx_percent", "dx_percent", "float"],
                             ["dxl", "dxl", "float"],
                             ["dxw", "dxw", "float"]]
@@ -215,6 +214,6 @@
         self.dq_l = None
         self.dq_r = None
-        self.dx_max = None
-        self.dx_min = None
+        self.dx_percent = None
+        self.dx_old = False
         self.dxl = None
         self.dxw = None
@@ -343,6 +342,6 @@
         obj.dq_l = copy.deepcopy(self.dq_l)
         obj.dq_r = copy.deepcopy(self.dq_r)
-        obj.dx_max = copy.deepcopy(self.dx_max)
-        obj.dx_min = copy.deepcopy(self.dx_min)
+        obj.dx_percent = copy.deepcopy(self.dx_percent)
+        obj.dx_old = copy.deepcopy(self.dx_old)
         obj.dxl = copy.deepcopy(self.dxl)
         obj.dxw = copy.deepcopy(self.dxw)
@@ -411,14 +410,14 @@
         for fittable, name, value, _, uncert, lower, upper, units in params:
             if not value:
-                value = numpy.nan
+                value = np.nan
             if not uncert or uncert[1] == '' or uncert[1] == 'None':
                 uncert[0] = False
-                uncert[1] = numpy.nan
+                uncert[1] = np.nan
             if not upper or upper[1] == '' or upper[1] == 'None':
                 upper[0] = False
-                upper[1] = numpy.nan
+                upper[1] = np.nan
             if not lower or lower[1] == '' or lower[1] == 'None':
                 lower[0] = False
-                lower[1] = numpy.nan
+                lower[1] = np.nan
             if is_string:
                 p[name] = str(value)
@@ -450,13 +449,13 @@
                 lower = params.get(name + ".lower", '-inf')
                 units = params.get(name + ".units")
-                if std is not None and std is not numpy.nan:
+                if std is not None and std is not np.nan:
                     std = [True, str(std)]
                 else:
                     std = [False, '']
-                if lower is not None and lower is not numpy.nan:
+                if lower is not None and lower is not np.nan:
                     lower = [True, str(lower)]
                 else:
                     lower = [True, '-inf']
-                if upper is not None and upper is not numpy.nan:
+                if upper is not None and upper is not np.nan:
                     upper = [True, str(upper)]
                 else:
@@ -562,6 +561,5 @@
         rep += "dq_l  : %s\n" % self.dq_l
         rep += "dq_r  : %s\n" % self.dq_r
-        rep += "dx_max  : %s\n" % str(self.dx_max)
-        rep += "dx_min : %s\n" % str(self.dx_min)
+        rep += "dx_percent  : %s\n" % str(self.dx_percent)
         rep += "dxl  : %s\n" % str(self.dxl)
         rep += "dxw : %s\n" % str(self.dxw)
@@ -821,5 +819,5 @@
 
         attr = newdoc.createAttribute("version")
-        import sasview
+        from sas import sasview
         attr.nodeValue = sasview.__version__
         # attr.nodeValue = '1.0'
@@ -1048,7 +1046,14 @@
                     setattr(self, item[0], parse_entry_helper(node, item))
 
+                dx_old_node = get_content('ns:%s' % 'dx_min', entry)
                 for item in LIST_OF_STATE_ATTRIBUTES:
-                    node = get_content('ns:%s' % item[0], entry)
-                    setattr(self, item[0], parse_entry_helper(node, item))
+                    if item[0] == "dx_percent" and dx_old_node is not None:
+                        dxmin = ["dx_min", "dx_min", "float"]
+                        setattr(self, item[0], parse_entry_helper(dx_old_node,
+                                                                  dxmin))
+                        self.dx_old = True
+                    else:
+                        node = get_content('ns:%s' % item[0], entry)
+                        setattr(self, item[0], parse_entry_helper(node, item))
 
                 for item in LIST_OF_STATE_PARAMETERS:
@@ -1095,5 +1100,5 @@
                                        % (line, tagname, name))
                                 logging.error(msg + traceback.format_exc())
-                        dic[name] = numpy.array(value_list)
+                        dic[name] = np.array(value_list)
                     setattr(self, varname, dic)
 
Index: src/sas/sasgui/perspectives/fitting/utils.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/utils.py	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sasgui/perspectives/fitting/utils.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -2,5 +2,5 @@
 Module contains functions frequently used in this package
 """
-import numpy
+import numpy as np
 
 
@@ -19,10 +19,10 @@
         data = data.y
     if flag == 0:
-        weight = numpy.ones_like(data)
+        weight = np.ones_like(data)
     elif flag == 1:
         weight = dy_data
     elif flag == 2:
-        weight = numpy.sqrt(numpy.abs(data))
+        weight = np.sqrt(np.abs(data))
     elif flag == 3:
-        weight = numpy.abs(data)
+        weight = np.abs(data)
     return weight
Index: src/sas/sasgui/perspectives/pr/explore_dialog.py
===================================================================
--- src/sas/sasgui/perspectives/pr/explore_dialog.py	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sasgui/perspectives/pr/explore_dialog.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -19,5 +19,5 @@
 
 import wx
-import numpy
+import numpy as np
 import logging
 import sys
@@ -65,8 +65,8 @@
 
         step = (self.max - self.min) / (self.npts - 1)
-        self.x = numpy.arange(self.min, self.max + step * 0.01, step)
-        dx = numpy.zeros(len(self.x))
-        y = numpy.ones(len(self.x))
-        dy = numpy.zeros(len(self.x))
+        self.x = np.arange(self.min, self.max + step * 0.01, step)
+        dx = np.zeros(len(self.x))
+        y = np.ones(len(self.x))
+        dy = np.zeros(len(self.x))
 
         # Plot area
Index: src/sas/sasgui/perspectives/pr/pr.py
===================================================================
--- src/sas/sasgui/perspectives/pr/pr.py	(revision a69a967b8ace2263edf57d6328d2ece6d26f1492)
+++ src/sas/sasgui/perspectives/pr/pr.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -21,5 +21,5 @@
 import time
 import math
-import numpy
+import numpy as np
 import pylab
 from sas.sasgui.guiframe.gui_manager import MDIFrame
@@ -207,6 +207,6 @@
         r = pylab.arange(0.01, d_max, d_max / 51.0)
         M = len(r)
-        y = numpy.zeros(M)
-        pr_err = numpy.zeros(M)
+        y = np.zeros(M)
+        pr_err = np.zeros(M)
 
         total = 0.0
@@ -253,5 +253,5 @@
         """
         # Show P(r)
-        y_true = numpy.zeros(len(x))
+        y_true = np.zeros(len(x))
 
         sum_true = 0.0
@@ -307,6 +307,6 @@
 
         x = pylab.arange(minq, maxq, maxq / 301.0)
-        y = numpy.zeros(len(x))
-        err = numpy.zeros(len(x))
+        y = np.zeros(len(x))
+        err = np.zeros(len(x))
         for i in range(len(x)):
             value = pr.iq(out, x[i])
@@ -337,6 +337,6 @@
         if pr.slit_width > 0 or pr.slit_height > 0:
             x = pylab.arange(minq, maxq, maxq / 301.0)
-            y = numpy.zeros(len(x))
-            err = numpy.zeros(len(x))
+            y = np.zeros(len(x))
+            err = np.zeros(len(x))
             for i in range(len(x)):
                 value = pr.iq_smeared(out, x[i])
@@ -382,11 +382,11 @@
         x = pylab.arange(0.0, pr.d_max, pr.d_max / self._pr_npts)
 
-        y = numpy.zeros(len(x))
-        dy = numpy.zeros(len(x))
-        y_true = numpy.zeros(len(x))
+        y = np.zeros(len(x))
+        dy = np.zeros(len(x))
+        y_true = np.zeros(len(x))
 
         total = 0.0
         pmax = 0.0
-        cov2 = numpy.ascontiguousarray(cov)
+        cov2 = np.ascontiguousarray(cov)
 
         for i in range(len(x)):
@@ -480,7 +480,7 @@
         """
         # Read the data from the data file
-        data_x = numpy.zeros(0)
-        data_y = numpy.zeros(0)
-        data_err = numpy.zeros(0)
+        data_x = np.zeros(0)
+        data_y = np.zeros(0)
+        data_err = np.zeros(0)
         scale = None
         min_err = 0.0
@@ -504,7 +504,7 @@
                         #err = 0
 
-                    data_x = numpy.append(data_x, x)
-                    data_y = numpy.append(data_y, y)
-                    data_err = numpy.append(data_err, err)
+                    data_x = np.append(data_x, x)
+                    data_y = np.append(data_y, y)
+                    data_err = np.append(data_err, err)
                 except:
                     logging.error(sys.exc_value)
@@ -528,7 +528,7 @@
         """
         # Read the data from the data file
-        data_x = numpy.zeros(0)
-        data_y = numpy.zeros(0)
-        data_err = numpy.zeros(0)
+        data_x = np.zeros(0)
+        data_y = np.zeros(0)
+        data_err = np.zeros(0)
         scale = None
         min_err = 0.0
@@ -555,7 +555,7 @@
                             #err = 0
 
-                        data_x = numpy.append(data_x, x)
-                        data_y = numpy.append(data_y, y)
-                        data_err = numpy.append(data_err, err)
+                        data_x = np.append(data_x, x)
+                        data_y = np.append(data_y, y)
+                        data_err = np.append(data_err, err)
                     except:
                         logging.error(sys.exc_value)
@@ -640,5 +640,5 @@
         # Now replot the original added data
         for plot in self._added_plots:
-            self._added_plots[plot].y = numpy.copy(self._default_Iq[plot])
+            self._added_plots[plot].y = np.copy(self._default_Iq[plot])
             wx.PostEvent(self.parent,
                          NewPlotEvent(plot=self._added_plots[plot],
@@ -664,5 +664,5 @@
         # Now scale the added plots too
         for plot in self._added_plots:
-            total = numpy.sum(self._added_plots[plot].y)
+            total = np.sum(self._added_plots[plot].y)
             npts = len(self._added_plots[plot].x)
             total *= self._added_plots[plot].x[npts - 1] / npts
@@ -814,5 +814,5 @@
         # Save Pr invertor
         self.pr = pr
-        cov = numpy.ascontiguousarray(cov)
+        cov = np.ascontiguousarray(cov)
 
         # Show result on control panel
@@ -982,5 +982,5 @@
         all_zeros = True
         if err == None:
-            err = numpy.zeros(len(pr.y))
+            err = np.zeros(len(pr.y))
         else:
             for i in range(len(err)):
@@ -1088,6 +1088,6 @@
         # If we have not errors, add statistical errors
         if y is not None:
-            if err == None or numpy.all(err) == 0:
-                err = numpy.zeros(len(y))
+            if err == None or np.all(err) == 0:
+                err = np.zeros(len(y))
                 scale = None
                 min_err = 0.0
Index: src/sas/sasgui/perspectives/simulation/simulation.py
===================================================================
--- src/sas/sasgui/perspectives/simulation/simulation.py	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sasgui/perspectives/simulation/simulation.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -10,5 +10,5 @@
 import wx
 import os
-import numpy
+import numpy as np
 import time
 import logging
@@ -46,6 +46,6 @@
     def compute(self):
         x = self.x
-        output = numpy.zeros(len(x))
-        error = numpy.zeros(len(x))
+        output = np.zeros(len(x))
+        error = np.zeros(len(x))
         
         self.starttime = time.time()
@@ -123,5 +123,5 @@
         # Q-values for plotting simulated I(Q)
         step = (self.q_max-self.q_min)/(self.q_npts-1)
-        self.x = numpy.arange(self.q_min, self.q_max+step*0.01, step)        
+        self.x = np.arange(self.q_min, self.q_max+step*0.01, step)
         
         # Set the list of panels that are part of the simulation perspective
@@ -187,5 +187,5 @@
         # Q-values for plotting simulated I(Q)
         step = (self.q_max-self.q_min)/(self.q_npts-1)
-        self.x = numpy.arange(self.q_min, self.q_max+step*0.01, step)    
+        self.x = np.arange(self.q_min, self.q_max+step*0.01, step)
          
         # Compute the simulated I(Q)
Index: src/sas/sasgui/plottools/PlotPanel.py
===================================================================
--- src/sas/sasgui/plottools/PlotPanel.py	(revision a5b8253583189ae64cae0529b92e16221f283019)
+++ src/sas/sasgui/plottools/PlotPanel.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -29,5 +29,5 @@
 DEFAULT_CMAP = pylab.cm.jet
 import copy
-import numpy
+import numpy as np
 
 from sas.sasgui.guiframe.events import StatusEvent
@@ -1452,16 +1452,16 @@
                 if  self.zmin_2D <= 0  and len(output[output > 0]) > 0:
                     zmin_temp = self.zmin_2D
-                    output[output > 0] = numpy.log10(output[output > 0])
+                    output[output > 0] = np.log10(output[output > 0])
                     #In log scale Negative values are not correct in general
-                    #output[output<=0] = math.log(numpy.min(output[output>0]))
+                    #output[output<=0] = math.log(np.min(output[output>0]))
                 elif self.zmin_2D <= 0:
                     zmin_temp = self.zmin_2D
-                    output[output > 0] = numpy.zeros(len(output))
+                    output[output > 0] = np.zeros(len(output))
                     output[output <= 0] = -32
                 else:
                     zmin_temp = self.zmin_2D
-                    output[output > 0] = numpy.log10(output[output > 0])
+                    output[output > 0] = np.log10(output[output > 0])
                     #In log scale Negative values are not correct in general
-                    #output[output<=0] = math.log(numpy.min(output[output>0]))
+                    #output[output<=0] = math.log(np.min(output[output>0]))
             except:
                 #Too many problems in 2D plot with scale
@@ -1492,5 +1492,5 @@
             X = self.x_bins[0:-1]
             Y = self.y_bins[0:-1]
-            X, Y = numpy.meshgrid(X, Y)
+            X, Y = np.meshgrid(X, Y)
 
             try:
@@ -1555,13 +1555,13 @@
         # 1d array to use for weighting the data point averaging
         #when they fall into a same bin.
-        weights_data = numpy.ones([self.data.size])
+        weights_data = np.ones([self.data.size])
         # get histogram of ones w/len(data); this will provide
         #the weights of data on each bins
-        weights, xedges, yedges = numpy.histogram2d(x=self.qy_data,
+        weights, xedges, yedges = np.histogram2d(x=self.qy_data,
                                                     y=self.qx_data,
                                                     bins=[self.y_bins, self.x_bins],
                                                     weights=weights_data)
         # get histogram of data, all points into a bin in a way of summing
-        image, xedges, yedges = numpy.histogram2d(x=self.qy_data,
+        image, xedges, yedges = np.histogram2d(x=self.qy_data,
                                                   y=self.qx_data,
                                                   bins=[self.y_bins, self.x_bins],
@@ -1581,5 +1581,5 @@
         # do while loop until all vacant bins are filled up up
         #to loop = max_loop
-        while not(numpy.isfinite(image[weights == 0])).all():
+        while not(np.isfinite(image[weights == 0])).all():
             if loop >= max_loop:  # this protects never-ending loop
                 break
@@ -1630,6 +1630,6 @@
 
         # store x and y bin centers in q space
-        x_bins = numpy.linspace(xmin, xmax, npix_x)
-        y_bins = numpy.linspace(ymin, ymax, npix_y)
+        x_bins = np.linspace(xmin, xmax, npix_x)
+        y_bins = np.linspace(ymin, ymax, npix_y)
 
         #set x_bins and y_bins
@@ -1650,6 +1650,6 @@
         """
         # No image matrix given
-        if image == None or numpy.ndim(image) != 2 \
-                or numpy.isfinite(image).all() \
+        if image == None or np.ndim(image) != 2 \
+                or np.isfinite(image).all() \
                 or weights == None:
             return image
@@ -1657,43 +1657,43 @@
         len_y = len(image)
         len_x = len(image[1])
-        temp_image = numpy.zeros([len_y, len_x])
-        weit = numpy.zeros([len_y, len_x])
+        temp_image = np.zeros([len_y, len_x])
+        weit = np.zeros([len_y, len_x])
         # do for-loop for all pixels
         for n_y in range(len(image)):
             for n_x in range(len(image[1])):
                 # find only null pixels
-                if weights[n_y][n_x] > 0 or numpy.isfinite(image[n_y][n_x]):
+                if weights[n_y][n_x] > 0 or np.isfinite(image[n_y][n_x]):
                     continue
                 else:
                     # find 4 nearest neighbors
                     # check where or not it is at the corner
-                    if n_y != 0 and numpy.isfinite(image[n_y - 1][n_x]):
+                    if n_y != 0 and np.isfinite(image[n_y - 1][n_x]):
                         temp_image[n_y][n_x] += image[n_y - 1][n_x]
                         weit[n_y][n_x] += 1
-                    if n_x != 0 and numpy.isfinite(image[n_y][n_x - 1]):
+                    if n_x != 0 and np.isfinite(image[n_y][n_x - 1]):
                         temp_image[n_y][n_x] += image[n_y][n_x - 1]
                         weit[n_y][n_x] += 1
-                    if n_y != len_y - 1 and numpy.isfinite(image[n_y + 1][n_x]):
+                    if n_y != len_y - 1 and np.isfinite(image[n_y + 1][n_x]):
                         temp_image[n_y][n_x] += image[n_y + 1][n_x]
                         weit[n_y][n_x] += 1
-                    if n_x != len_x - 1 and numpy.isfinite(image[n_y][n_x + 1]):
+                    if n_x != len_x - 1 and np.isfinite(image[n_y][n_x + 1]):
                         temp_image[n_y][n_x] += image[n_y][n_x + 1]
                         weit[n_y][n_x] += 1
                     # go 4 next nearest neighbors when no non-zero
                     # neighbor exists
-                    if n_y != 0 and n_x != 0 and\
-                         numpy.isfinite(image[n_y - 1][n_x - 1]):
+                    if n_y != 0 and n_x != 0 and \
+                            np.isfinite(image[n_y - 1][n_x - 1]):
                         temp_image[n_y][n_x] += image[n_y - 1][n_x - 1]
                         weit[n_y][n_x] += 1
                     if n_y != len_y - 1 and n_x != 0 and \
-                        numpy.isfinite(image[n_y + 1][n_x - 1]):
+                            np.isfinite(image[n_y + 1][n_x - 1]):
                         temp_image[n_y][n_x] += image[n_y + 1][n_x - 1]
                         weit[n_y][n_x] += 1
                     if n_y != len_y and n_x != len_x - 1 and \
-                        numpy.isfinite(image[n_y - 1][n_x + 1]):
+                            np.isfinite(image[n_y - 1][n_x + 1]):
                         temp_image[n_y][n_x] += image[n_y - 1][n_x + 1]
                         weit[n_y][n_x] += 1
                     if n_y != len_y - 1 and n_x != len_x - 1 and \
-                        numpy.isfinite(image[n_y + 1][n_x + 1]):
+                            np.isfinite(image[n_y + 1][n_x + 1]):
                         temp_image[n_y][n_x] += image[n_y + 1][n_x + 1]
                         weit[n_y][n_x] += 1
Index: src/sas/sasgui/plottools/fitDialog.py
===================================================================
--- src/sas/sasgui/plottools/fitDialog.py	(revision dd5bf63093de43c42cbb5ac17751c02bdd615eae)
+++ src/sas/sasgui/plottools/fitDialog.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -2,5 +2,5 @@
 from plottables import Theory1D
 import math
-import numpy
+import numpy as np
 import fittings
 import transform
@@ -482,5 +482,5 @@
 
                 if self.xLabel.lower() == "log10(x)":
-                    tempdy = numpy.asarray(tempdy)
+                    tempdy = np.asarray(tempdy)
                     tempdy[tempdy == 0] = 1
                     chisqr, out, cov = fittings.sasfit(self.model,
@@ -491,5 +491,5 @@
                                                        math.log10(xmax))
                 else:
-                    tempdy = numpy.asarray(tempdy)
+                    tempdy = np.asarray(tempdy)
                     tempdy[tempdy == 0] = 1
                     chisqr, out, cov = fittings.sasfit(self.model,
@@ -572,9 +572,9 @@
         if self.rg_on:
             if self.Rg_tctr.IsShown():
-                rg = numpy.sqrt(-3 * float(cstA))
+                rg = np.sqrt(-3 * float(cstA))
                 value = format_number(rg)
                 self.Rg_tctr.SetValue(value)
                 if self.I0_tctr.IsShown():
-                    val = numpy.exp(cstB)
+                    val = np.exp(cstB)
                     self.I0_tctr.SetValue(format_number(val))
             if self.Rgerr_tctr.IsShown():
@@ -585,9 +585,9 @@
                 self.Rgerr_tctr.SetValue(value)
                 if self.I0err_tctr.IsShown():
-                    val = numpy.abs(numpy.exp(cstB) * errB)
+                    val = np.abs(np.exp(cstB) * errB)
                     self.I0err_tctr.SetValue(format_number(val))
             if self.Diameter_tctr.IsShown():
-                rg = numpy.sqrt(-2 * float(cstA))
-                _diam = 4 * numpy.sqrt(-float(cstA))
+                rg = np.sqrt(-2 * float(cstA))
+                _diam = 4 * np.sqrt(-float(cstA))
                 value = format_number(_diam)
                 self.Diameter_tctr.SetValue(value)
Index: src/sas/sasgui/plottools/plottables.py
===================================================================
--- src/sas/sasgui/plottools/plottables.py	(revision a9f579c8400c480f42c42445e1ff4dab09a6baa4)
+++ src/sas/sasgui/plottools/plottables.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -43,5 +43,5 @@
 # Support for ancient python versions
 import copy
-import numpy
+import numpy as np
 import sys
 import logging
@@ -706,7 +706,7 @@
                 self.dy = None
             if not has_err_x:
-                dx = numpy.zeros(len(x))
+                dx = np.zeros(len(x))
             if not has_err_y:
-                dy = numpy.zeros(len(y))
+                dy = np.zeros(len(y))
             for i in range(len(x)):
                 try:
@@ -796,7 +796,7 @@
         tempdy = []
         if self.dx == None:
-            self.dx = numpy.zeros(len(self.x))
+            self.dx = np.zeros(len(self.x))
         if self.dy == None:
-            self.dy = numpy.zeros(len(self.y))
+            self.dy = np.zeros(len(self.y))
         if self.xLabel == "log10(x)":
             for i in range(len(self.x)):
@@ -826,7 +826,7 @@
         tempdy = []
         if self.dx == None:
-            self.dx = numpy.zeros(len(self.x))
+            self.dx = np.zeros(len(self.x))
         if self.dy == None:
-            self.dy = numpy.zeros(len(self.y))
+            self.dy = np.zeros(len(self.y))
         if self.yLabel == "log10(y)":
             for i in range(len(self.x)):
@@ -859,7 +859,7 @@
         tempdy = []
         if self.dx == None:
-            self.dx = numpy.zeros(len(self.x))
+            self.dx = np.zeros(len(self.x))
         if self.dy == None:
-            self.dy = numpy.zeros(len(self.y))
+            self.dy = np.zeros(len(self.y))
         if xmin != None and xmax != None:
             for i in range(len(self.x)):
@@ -1228,15 +1228,15 @@
 
 def sample_graph():
-    import numpy as nx
+    import numpy as np
 
     # Construct a simple graph
     if False:
-        x = nx.array([1, 2, 3, 4, 5, 6], 'd')
-        y = nx.array([4, 5, 6, 5, 4, 5], 'd')
-        dy = nx.array([0.2, 0.3, 0.1, 0.2, 0.9, 0.3])
+        x = np.array([1, 2, 3, 4, 5, 6], 'd')
+        y = np.array([4, 5, 6, 5, 4, 5], 'd')
+        dy = np.array([0.2, 0.3, 0.1, 0.2, 0.9, 0.3])
     else:
-        x = nx.linspace(0, 1., 10000)
-        y = nx.sin(2 * nx.pi * x * 2.8)
-        dy = nx.sqrt(100 * nx.abs(y)) / 100
+        x = np.linspace(0, 1., 10000)
+        y = np.sin(2 * np.pi * x * 2.8)
+        dy = np.sqrt(100 * np.abs(y)) / 100
     data = Data1D(x, y, dy=dy)
     data.xaxis('distance', 'm')
Index: test/corfunc/test/utest_corfunc.py
===================================================================
--- test/corfunc/test/utest_corfunc.py	(revision acefa2b7b00d8d908758f184828fbf18d106e742)
+++ test/corfunc/test/utest_corfunc.py	(revision 253eb6c67e1e6610e872a17727530be787222114)
@@ -8,5 +8,5 @@
 from sas.sascalc.corfunc.corfunc_calculator import CorfuncCalculator
 from sas.sascalc.dataloader.data_info import Data1D
-import matplotlib.pyplot as plt
+
 
 class TestCalculator(unittest.TestCase):
@@ -69,5 +69,4 @@
         self.assertLess(abs(params['max']-75), 2.5) # L_p ~= 75
 
-
     # Ensure tests are ran in correct order;
     # Each test depends on the one before it
Index: test/pr_inversion/test/utest_invertor.py
===================================================================
--- test/pr_inversion/test/utest_invertor.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ test/pr_inversion/test/utest_invertor.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -568,9 +568,11 @@
     
 def load(path = "sphere_60_q0_2.txt"):
-    import numpy, math, sys
+    import numpy as np
+    import math
+    import sys
     # Read the data from the data file
-    data_x   = numpy.zeros(0)
-    data_y   = numpy.zeros(0)
-    data_err = numpy.zeros(0)
+    data_x   = np.zeros(0)
+    data_y   = np.zeros(0)
+    data_err = np.zeros(0)
     scale    = None
     if not path == None:
@@ -589,7 +591,7 @@
                         scale = 0.15*math.sqrt(y)
                     err = scale*math.sqrt(y)
-                data_x = numpy.append(data_x, x)
-                data_y = numpy.append(data_y, y)
-                data_err = numpy.append(data_err, err)
+                data_x = np.append(data_x, x)
+                data_y = np.append(data_y, y)
+                data_err = np.append(data_err, err)
             except:
                 pass
Index: test/sascalculator/test/utest_sas_gen.py
===================================================================
--- test/sascalculator/test/utest_sas_gen.py	(revision ef908db37c9eb600c4448e9e4633b500a40c6361)
+++ test/sascalculator/test/utest_sas_gen.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -8,7 +8,4 @@
 from sas.sascalc.calculator import sas_gen
 
-import numpy
- 
-import os.path
 
 class sas_gen_test(unittest.TestCase):
@@ -51,5 +48,6 @@
         self.assertEqual(output.pos_z[0], 0.0)
 
+
 if __name__ == '__main__':
     unittest.main()
-   
+
Index: test/sasdataloader/plugins/test_reader.py
===================================================================
--- test/sasdataloader/plugins/test_reader.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ test/sasdataloader/plugins/test_reader.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -8,5 +8,6 @@
 copyright 2008, University of Tennessee
 """
-import numpy, os
+import os
+import numpy as np
 from sas.sascalc.dataloader.data_info import Data1D
 
@@ -40,12 +41,12 @@
                 buff = input_f.read()
                 lines = buff.split('\n')
-                x  = numpy.zeros(0)
-                y  = numpy.zeros(0)
-                dy = numpy.zeros(0)
+                x  = np.zeros(0)
+                y  = np.zeros(0)
+                dy = np.zeros(0)
                 output = Data1D(x, y, dy=dy)
                 self.filename = output.filename = basename
            
                 for line in lines:
-                    x  = numpy.append(x,  float(line)) 
+                    x  = np.append(x,  float(line))
                     
                 output.x = x
Index: test/sasdataloader/test/utest_abs_reader.py
===================================================================
--- test/sasdataloader/test/utest_abs_reader.py	(revision 5f26aa48a5e34765d73c20fa10024d5319567854)
+++ test/sasdataloader/test/utest_abs_reader.py	(revision dd11014add466ed4ba0564fcf61e5880d53e6c8b)
@@ -4,6 +4,8 @@
 
 import unittest
-import numpy, math
-from sas.sascalc.dataloader.loader import  Loader
+import math
+import numpy as np
+from sas.sascalc.dataloader.loader import Loader
+from sas.sascalc.dataloader.readers.IgorReader import Reader as IgorReader
 from sas.sascalc.dataloader.data_info import Data1D
  
@@ -86,6 +88,9 @@
     
     def setUp(self):
-        self.data = Loader().load("MAR07232_rest.ASC")
-        
+        # the IgorReader should be able to read this filetype
+        # if it can't, stop here.
+        reader = IgorReader()
+        self.data = reader.read("MAR07232_rest.ASC")
+
     def test_igor_checkdata(self):
         """
@@ -108,14 +113,25 @@
         
         self.assertEqual(self.data.detector[0].beam_center_unit, 'mm')
-        center_x = (68.76-1)*5.0
-        center_y = (62.47-1)*5.0
+        center_x = (68.76 - 1)*5.0
+        center_y = (62.47 - 1)*5.0
         self.assertEqual(self.data.detector[0].beam_center.x, center_x)
         self.assertEqual(self.data.detector[0].beam_center.y, center_y)
         
         self.assertEqual(self.data.I_unit, '1/cm')
-        self.assertEqual(self.data.data[0], 0.279783)
-        self.assertEqual(self.data.data[1], 0.28951)
-        self.assertEqual(self.data.data[2], 0.167634)
-        
+        # 3 points should be suffcient to check that the data is in column
+        # major order.
+        np.testing.assert_almost_equal(self.data.data[0:3],
+                                       [0.279783, 0.28951, 0.167634])
+        np.testing.assert_almost_equal(self.data.qx_data[0:3],
+                                       [-0.01849072, -0.01821785, -0.01794498])
+        np.testing.assert_almost_equal(self.data.qy_data[0:3],
+                                       [-0.01677435, -0.01677435, -0.01677435])
+
+    def test_generic_loader(self):
+        # the generic loader should direct the file to IgorReader as well
+        data = Loader().load("MAR07232_rest.ASC")
+        self.assertEqual(data.meta_data['loader'], "IGOR 2D")
+
+
 class danse_reader(unittest.TestCase):
     
@@ -313,7 +329,7 @@
         from sas.sascalc.dataloader.readers.cansas_reader import Reader
         r = Reader()
-        x = numpy.ones(5)
-        y = numpy.ones(5)
-        dy = numpy.ones(5)
+        x = np.ones(5)
+        y = np.ones(5)
+        dy = np.ones(5)
         
         filename = "write_test.xml"
Index: test/sasdataloader/test/utest_averaging.py
===================================================================
--- test/sasdataloader/test/utest_averaging.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ test/sasdataloader/test/utest_averaging.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -1,10 +1,10 @@
 
 import unittest
+import math
 
 from sas.sascalc.dataloader.loader import  Loader
 from sas.sascalc.dataloader.manipulations import Ring, CircularAverage, SectorPhi, get_q,reader2D_converter
- 
-import os.path
-import numpy, math
+
+import numpy as np
 import sas.sascalc.dataloader.data_info as data_info
 
@@ -18,6 +18,6 @@
             should return the predefined height of the distribution (1.0).
         """
-        x_0  = numpy.ones([100,100])
-        dx_0 = numpy.ones([100,100])
+        x_0  = np.ones([100,100])
+        dx_0 = np.ones([100,100])
         
         self.data = data_info.Data2D(data=x_0, err_data=dx_0)
@@ -42,9 +42,9 @@
         
         self.qstep = len(x_0)
-        x=  numpy.linspace(start= -1*self.qmax,
+        x=  np.linspace(start= -1*self.qmax,
                                stop= self.qmax,
                                num= self.qstep,
                                endpoint=True )  
-        y = numpy.linspace(start= -1*self.qmax,
+        y = np.linspace(start= -1*self.qmax,
                                stop= self.qmax,
                                num= self.qstep,
Index: test/sasdataloader/test/utest_cansas.py
===================================================================
--- test/sasdataloader/test/utest_cansas.py	(revision 1686a333c537addee2a00ed89b00c694826a8f17)
+++ test/sasdataloader/test/utest_cansas.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -15,5 +15,5 @@
 import pylint as pylint
 import unittest
-import numpy
+import numpy as np
 import logging
 import warnings
Index: test/sasguiframe/test/utest_manipulations.py
===================================================================
--- test/sasguiframe/test/utest_manipulations.py	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ test/sasguiframe/test/utest_manipulations.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -5,5 +5,6 @@
 
 import unittest
-import numpy, math
+import math
+import numpy as np
 from sas.sascalc.dataloader.loader import  Loader
 from sas.sasgui.guiframe.dataFitting import Data1D, Data2D
@@ -52,15 +53,15 @@
     def setUp(self):
         # Create two data sets to play with
-        x_0 = numpy.ones(5)
+        x_0 = np.ones(5)
         for i in range(5):
             x_0[i] = x_0[i]*(i+1.0)
             
-        y_0 = 2.0*numpy.ones(5)
-        dy_0 = 0.5*numpy.ones(5)
+        y_0 = 2.0*np.ones(5)
+        dy_0 = 0.5*np.ones(5)
         self.data = Data1D(x_0, y_0, dy=dy_0)
         
         x = self.data.x
-        y = numpy.ones(5)
-        dy = numpy.ones(5)
+        y = np.ones(5)
+        dy = np.ones(5)
         self.data2 = Data1D(x, y, dy=dy)
         
@@ -155,22 +156,22 @@
     def setUp(self):
         # Create two data sets to play with
-        x_0 = 2.0*numpy.ones(25)
-        dx_0 = 0.5*numpy.ones(25)
-        qx_0 = numpy.arange(25)
-        qy_0 = numpy.arange(25)
-        mask_0 = numpy.zeros(25)
-        dqx_0 = numpy.arange(25)/100
-        dqy_0 = numpy.arange(25)/100
-        q_0 = numpy.sqrt(qx_0 * qx_0 + qy_0 * qy_0)
+        x_0 = 2.0*np.ones(25)
+        dx_0 = 0.5*np.ones(25)
+        qx_0 = np.arange(25)
+        qy_0 = np.arange(25)
+        mask_0 = np.zeros(25)
+        dqx_0 = np.arange(25)/100
+        dqy_0 = np.arange(25)/100
+        q_0 = np.sqrt(qx_0 * qx_0 + qy_0 * qy_0)
         self.data = Data2D(image=x_0, err_image=dx_0, qx_data=qx_0, 
                            qy_data=qy_0, q_data=q_0, mask=mask_0, 
                            dqx_data=dqx_0, dqy_data=dqy_0)
         
-        y = numpy.ones(25)
-        dy = numpy.ones(25)
-        qx = numpy.arange(25)
-        qy = numpy.arange(25)
-        mask = numpy.zeros(25)
-        q = numpy.sqrt(qx * qx + qy * qy)
+        y = np.ones(25)
+        dy = np.ones(25)
+        qx = np.arange(25)
+        qy = np.arange(25)
+        mask = np.zeros(25)
+        q = np.sqrt(qx * qx + qy * qy)
         self.data2 = Data2D(image=y, err_image=dy, qx_data=qx, qy_data=qy, 
                             q_data=q, mask=mask)
@@ -182,5 +183,5 @@
         """
         # There should be 5 entries in the file
-        self.assertEqual(numpy.size(self.data.data), 25)
+        self.assertEqual(np.size(self.data.data), 25)
         
         for i in range(25):
@@ -263,22 +264,22 @@
     def setUp(self):
         # Create two data sets to play with
-        x_0 = 2.0*numpy.ones(25)
-        dx_0 = 0.5*numpy.ones(25)
-        qx_0 = numpy.arange(25)
-        qy_0 = numpy.arange(25)
-        mask_0 = numpy.zeros(25)
-        dqx_0 = numpy.arange(25)/100
-        dqy_0 = numpy.arange(25)/100
-        q_0 = numpy.sqrt(qx_0 * qx_0 + qy_0 * qy_0)
+        x_0 = 2.0*np.ones(25)
+        dx_0 = 0.5*np.ones(25)
+        qx_0 = np.arange(25)
+        qy_0 = np.arange(25)
+        mask_0 = np.zeros(25)
+        dqx_0 = np.arange(25)/100
+        dqy_0 = np.arange(25)/100
+        q_0 = np.sqrt(qx_0 * qx_0 + qy_0 * qy_0)
         self.data = Data2D(image=x_0, err_image=dx_0, qx_data=qx_0, 
                            qy_data=qy_0, q_data=q_0, mask=mask_0, 
                            dqx_data=dqx_0, dqy_data=dqy_0)
         
-        y = numpy.ones(25)
-        dy = numpy.ones(25)
-        qx = numpy.arange(25)
-        qy = numpy.arange(25)
-        mask = numpy.zeros(25)
-        q = numpy.sqrt(qx * qx + qy * qy)
+        y = np.ones(25)
+        dy = np.ones(25)
+        qx = np.arange(25)
+        qy = np.arange(25)
+        mask = np.zeros(25)
+        q = np.sqrt(qx * qx + qy * qy)
         self.data2 = Data2D(image=y, err_image=dy, qx_data=qx, qy_data=qy, 
                             q_data=q, mask=mask)
@@ -290,5 +291,5 @@
         """
         # There should be 5 entries in the file
-        self.assertEqual(numpy.size(self.data.data), 25)
+        self.assertEqual(np.size(self.data.data), 25)
         
         for i in range(25):
Index: test/sasinvariant/test/utest_data_handling.py
===================================================================
--- test/sasinvariant/test/utest_data_handling.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ test/sasinvariant/test/utest_data_handling.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -9,5 +9,6 @@
 """
 import unittest
-import numpy, math
+import math
+import numpy as np
 from sas.sascalc.dataloader.loader import  Loader
 from sas.sascalc.dataloader.data_info import Data1D
@@ -20,6 +21,6 @@
     """
     def setUp(self):
-        x = numpy.asarray([1.,2.,3.,4.,5.,6.,7.,8.,9.])
-        y = numpy.asarray([1.,2.,3.,4.,5.,6.,7.,8.,9.])
+        x = np.asarray([1.,2.,3.,4.,5.,6.,7.,8.,9.])
+        y = np.asarray([1.,2.,3.,4.,5.,6.,7.,8.,9.])
         dy = y/10.0
         
@@ -135,6 +136,6 @@
         
     def test_error_treatment(self):
-        x = numpy.asarray(numpy.asarray([0,1,2,3]))
-        y = numpy.asarray(numpy.asarray([1,1,1,1]))
+        x = np.asarray(np.asarray([0,1,2,3]))
+        y = np.asarray(np.asarray([1,1,1,1]))
         
         # These are all the values of the dy array that would cause
@@ -340,6 +341,6 @@
         self.scale = 1.5
         self.rg = 30.0
-        x = numpy.arange(0.0001, 0.1, 0.0001)
-        y = numpy.asarray([self.scale * math.exp( -(q*self.rg)**2 / 3.0 ) for q in x])
+        x = np.arange(0.0001, 0.1, 0.0001)
+        y = np.asarray([self.scale * math.exp( -(q*self.rg)**2 / 3.0 ) for q in x])
         dy = y*.1
         self.data = Data1D(x=x, y=y, dy=dy)
@@ -383,6 +384,6 @@
         self.scale = 1.5
         self.m = 3.0
-        x = numpy.arange(0.0001, 0.1, 0.0001)
-        y = numpy.asarray([self.scale * math.pow(q ,-1.0*self.m) for q in x])                
+        x = np.arange(0.0001, 0.1, 0.0001)
+        y = np.asarray([self.scale * math.pow(q ,-1.0*self.m) for q in x])
         dy = y*.1
         self.data = Data1D(x=x, y=y, dy=dy)
@@ -427,6 +428,6 @@
             that can't be transformed
         """
-        x = numpy.asarray(numpy.asarray([0,1,2,3]))
-        y = numpy.asarray(numpy.asarray([1,1,1,1]))
+        x = np.asarray(np.asarray([0,1,2,3]))
+        y = np.asarray(np.asarray([1,1,1,1]))
         g = invariant.Guinier()
         data_in = Data1D(x=x, y=y)
@@ -438,7 +439,7 @@
         
     def test_allowed_bins(self):
-        x = numpy.asarray(numpy.asarray([0,1,2,3]))
-        y = numpy.asarray(numpy.asarray([1,1,1,1]))
-        dy = numpy.asarray(numpy.asarray([1,1,1,1]))
+        x = np.asarray(np.asarray([0,1,2,3]))
+        y = np.asarray(np.asarray([1,1,1,1]))
+        dy = np.asarray(np.asarray([1,1,1,1]))
         g = invariant.Guinier()
         data = Data1D(x=x, y=y, dy=dy)
@@ -465,6 +466,6 @@
         self.scale = 1.5
         self.rg = 30.0
-        x = numpy.arange(0.0001, 0.1, 0.0001)
-        y = numpy.asarray([self.scale * math.exp( -(q*self.rg)**2 / 3.0 ) for q in x])
+        x = np.arange(0.0001, 0.1, 0.0001)
+        y = np.asarray([self.scale * math.exp( -(q*self.rg)**2 / 3.0 ) for q in x])
         dy = y*.1
         self.data = Data1D(x=x, y=y, dy=dy)
@@ -513,6 +514,6 @@
         self.scale = 1.5
         self.rg = 30.0
-        x = numpy.arange(0.0001, 0.1, 0.0001)
-        y = numpy.asarray([self.scale * math.exp( -(q*self.rg)**2 / 3.0 ) for q in x])
+        x = np.arange(0.0001, 0.1, 0.0001)
+        y = np.asarray([self.scale * math.exp( -(q*self.rg)**2 / 3.0 ) for q in x])
         dy = y*.1
         self.data = Data1D(x=x, y=y, dy=dy)
@@ -600,6 +601,6 @@
         self.scale = 1.5
         self.m = 3.0
-        x = numpy.arange(0.0001, 0.1, 0.0001)
-        y = numpy.asarray([self.scale * math.pow(q ,-1.0*self.m) for q in x])                
+        x = np.arange(0.0001, 0.1, 0.0001)
+        y = np.asarray([self.scale * math.pow(q ,-1.0*self.m) for q in x])
         dy = y*.1
         self.data = Data1D(x=x, y=y, dy=dy)
Index: test/sasinvariant/test/utest_use_cases.py
===================================================================
--- test/sasinvariant/test/utest_use_cases.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ test/sasinvariant/test/utest_use_cases.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
@@ -5,5 +5,4 @@
 #TODO: there's no test for smeared extrapolation
 import unittest
-import numpy
 from sas.sascalc.dataloader.loader import  Loader
 
