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 463e7ffce130ae386f93cd18b87a1120743e88b5)
+++ src/sas/sascalc/calculator/resolution_calculator.py	(revision 463e7ffce130ae386f93cd18b87a1120743e88b5)
@@ -12,5 +12,5 @@
 from math import sqrt
 import math
-import numpy
+import numpy as np
 import sys
 import logging
@@ -395,7 +395,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
@@ -889,5 +889,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)
@@ -895,6 +895,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
@@ -910,5 +910,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()
@@ -956,5 +956,5 @@
             nu_value *= nu_value
             nu_value *= -0.5
-            gaussian *= numpy.exp(nu_value)
+            gaussian *= np.exp(nu_value)
             gaussian /= sigma
             # normalize
@@ -1028,6 +1028,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
@@ -1043,6 +1043,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
 
@@ -1063,8 +1063,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
@@ -1090,5 +1090,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
@@ -1109,6 +1109,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 463e7ffce130ae386f93cd18b87a1120743e88b5)
+++ src/sas/sascalc/calculator/sas_gen.py	(revision 463e7ffce130ae386f93cd18b87a1120743e88b5)
@@ -7,5 +7,5 @@
 from periodictable import formula
 from periodictable import nsf
-import numpy
+import numpy as np
 import os
 import copy
@@ -82,11 +82,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 = []
@@ -173,5 +173,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)
@@ -189,5 +189,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
@@ -239,32 +239,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:
@@ -330,6 +330,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]
@@ -371,7 +371,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')
@@ -391,7 +391,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
@@ -503,13 +503,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 = []
@@ -545,23 +545,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()
@@ -632,25 +632,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
@@ -671,14 +671,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
@@ -714,10 +714,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
@@ -895,8 +895,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
@@ -905,5 +905,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
@@ -914,17 +914,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
@@ -938,5 +938,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
@@ -952,5 +952,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
@@ -995,16 +995,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)
@@ -1073,14 +1073,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()
 
@@ -1105,7 +1105,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])
 
