Index: sasview/test/sesans_data/sphere2micron.ses
===================================================================
--- sasview/test/sesans_data/sphere2micron.ses	(revision 2a2b43a784d2e1dc3f9304934bcb138df3aad058)
+++ sasview/test/sesans_data/sphere2micron.ses	(revision d3bce8cdfcb310b0a22dc27004c973b23447f354)
@@ -1,51 +1,60 @@
-DataFileTitle 	"Polystyrene of Markus Strobl,  Full Sine, ++ only "						
-Sample 	"Polystyrene 2 um in 53% H2O, 47% D2O "						
-Settings 	"D1=D2=20x8 mm,Ds = 16x10 mm (WxH), GF1 =scanning, GF2 = 2.5 A. 2 um polystyrene in 53% H2O, 47% D2O; 8.55% contrast "						
-Operator 	CPD 						
-Date 	do 10 jul 2014 16:37:30 						
-ScanType 	sine one element scan 						
-Thickness [cm] 	2.00E-01						
-Q_zmax [\A^-1] 	0.05						
-Q_ymax [\A^-1] 	0.05						
-  							
-spin echo length [A] 	 Depolarisation [A-2 cm-1] 	 error depol [A-2 cm-1] 	 error SEL [A] 	 wavelength [A] 	 error wavelength [A] 	 polarisation 	 error pol 
-391.56	0.0041929	0.0036894	19.578	2.11	0.1055	1.0037	0.0032974
-1564	-0.0046571	0.0038185	78.2	2.11	0.1055	0.99586	0.003386
-2735.6	-0.017007	0.0038132	136.78	2.11	0.1055	0.98497	0.0033444
-3907.9	-0.033462	0.0035068	195.39	2.11	0.1055	0.97064	0.0030309
-5080.2	-0.047483	0.0038208	254.01	2.11	0.1055	0.9586	0.0032613
-6251.8	-0.070375	0.00376	312.59	2.11	0.1055	0.93926	0.0031446
-7423.2	-0.092217	0.0037927	371.16	2.11	0.1055	0.92117	0.0031108
-8595.5	-0.10238	0.004006	429.77	2.11	0.1055	0.91287	0.0032562
-9767.7	-0.12672	0.0038534	488.39	2.11	0.1055	0.8933	0.0030651
-10940	-0.1374	0.004243	546.98	2.11	0.1055	0.88484	0.003343
-12112	-0.16072	0.0045837	605.58	2.11	0.1055	0.86666	0.0035372
-13284	-0.16623	0.0045613	664.2	2.11	0.1055	0.86242	0.0035027
-14456	-0.18468	0.0044918	722.79	2.11	0.1055	0.84837	0.0033931
-15628	-0.19143	0.0048967	781.38	2.11	0.1055	0.84328	0.0036768
-16800	-0.20029	0.0045421	840.02	2.11	0.1055	0.83666	0.0033837
-17971	-0.19798	0.0046642	898.56	2.11	0.1055	0.83838	0.0034819
-19143	-0.21442	0.0047052	957.17	2.11	0.1055	0.82619	0.0034614
-20316	-0.20885	0.0044931	1015.8	2.11	0.1055	0.8303	0.0033218
-21488	-0.21393	0.0049186	1074.4	2.11	0.1055	0.82655	0.00362
-22660	-0.20685	0.004423	1133	2.11	0.1055	0.83179	0.0032758
-23832	-0.20802	0.0046979	1191.6	2.11	0.1055	0.83092	0.0034758
-25003	-0.19848	0.0045953	1250.2	2.11	0.1055	0.838	0.0034289
-26175	-0.21117	0.0044567	1308.8	2.11	0.1055	0.82859	0.0032881
-27347	-0.21283	0.004137	1367.4	2.11	0.1055	0.82736	0.0030477
-28520	-0.2042	0.0044587	1426	2.11	0.1055	0.83375	0.0033101
-29692	-0.2112	0.0042852	1484.6	2.11	0.1055	0.82857	0.0031615
-30864	-0.20319	0.0043483	1543.2	2.11	0.1055	0.8345	0.003231
-32036	-0.20752	0.0044297	1601.8	2.11	0.1055	0.83129	0.0032788
-33207	-0.20654	0.0043188	1660.4	2.11	0.1055	0.83201	0.0031995
-34380	-0.20126	0.0046375	1719	2.11	0.1055	0.83593	0.0034518
-35551	-0.20924	0.0042871	1777.6	2.11	0.1055	0.83001	0.0031684
-36724	-0.21323	0.0045471	1836.2	2.11	0.1055	0.82707	0.0033487
-37895	-0.21324	0.0045354	1894.7	2.11	0.1055	0.82706	0.00334
-39067	-0.19905	0.0044141	1953.4	2.11	0.1055	0.83758	0.003292
-40239	-0.1991	0.0047441	2012	2.11	0.1055	0.83754	0.003538
-41411	-0.20359	0.0050136	2070.5	2.11	0.1055	0.8342	0.003724
-42583	-0.21032	0.0049474	2129.1	2.11	0.1055	0.82922	0.0036529
-43755	-0.20689	0.0048203	2187.8	2.11	0.1055	0.83176	0.00357
-44927	-0.21075	0.0052337	2246.4	2.11	0.1055	0.8289	0.0038628
-46099	-0.19956	0.0047827	2304.9	2.11	0.1055	0.8372	0.0035653
+FileFormatVersion       1.0
+DataFileTitle           Polystyrene of Markus Strobl,  Full Sine, ++ only
+Sample                  Polystyrene 2 um in 53% H2O, 47% D2O
+Settings                D1=D2=20x8 mm,Ds = 16x10 mm (WxH), GF1 =scanning, GF2 = 2.5 A. 2 um polystyrene in 53% H2O, 47% D2O; 8.55% contrast
+Operator                CPD
+Date                    do 10 jul 2014 16:37:30
+ScanType                sine one element scan
+Thickness               2.00E-01
+Thickness_unit          cm
+Theta_zmax              0.0168
+Theta_zmax_unit         radians
+Theta_ymax              0.0168
+Theta_ymax_unit         radians
+Orientation             Z
+SpinEchoLength_unit     A
+Depolarisation_unit     A-2 cm-1
+Wavelength_unit         A
+
+BEGIN_DATA
+SpinEchoLength Depolarisation Depolarisation_error SpinEchoLength_error Wavelength Wavelength_error Polarisation  Polarisation_error
+391.56 0.0041929 0.0036894 19.578 2.11 0.1055 1.0037 0.0032974
+1564 -0.0046571 0.0038185 78.2 2.11 0.1055 0.99586 0.003386
+2735.6 -0.017007 0.0038132 136.78 2.11 0.1055 0.98497 0.0033444
+3907.9 -0.033462 0.0035068 195.39 2.11 0.1055 0.97064 0.0030309
+5080.2 -0.047483 0.0038208 254.01 2.11 0.1055 0.9586 0.0032613
+6251.8 -0.070375 0.00376 312.59 2.11 0.1055 0.93926 0.0031446
+7423.2 -0.092217 0.0037927 371.16 2.11 0.1055 0.92117 0.0031108
+8595.5 -0.10238 0.004006 429.77 2.11 0.1055 0.91287 0.0032562
+9767.7 -0.12672 0.0038534 488.39 2.11 0.1055 0.8933 0.0030651
+10940 -0.1374 0.004243 546.98 2.11 0.1055 0.88484 0.003343
+12112 -0.16072 0.0045837 605.58 2.11 0.1055 0.86666 0.0035372
+13284 -0.16623 0.0045613 664.2 2.11 0.1055 0.86242 0.0035027
+14456 -0.18468 0.0044918 722.79 2.11 0.1055 0.84837 0.0033931
+15628 -0.19143 0.0048967 781.38 2.11 0.1055 0.84328 0.0036768
+16800 -0.20029 0.0045421 840.02 2.11 0.1055 0.83666 0.0033837
+17971 -0.19798 0.0046642 898.56 2.11 0.1055 0.83838 0.0034819
+19143 -0.21442 0.0047052 957.17 2.11 0.1055 0.82619 0.0034614
+20316 -0.20885 0.0044931 1015.8 2.11 0.1055 0.8303 0.0033218
+21488 -0.21393 0.0049186 1074.4 2.11 0.1055 0.82655 0.00362
+22660 -0.20685 0.004423 1133 2.11 0.1055 0.83179 0.0032758
+23832 -0.20802 0.0046979 1191.6 2.11 0.1055 0.83092 0.0034758
+25003 -0.19848 0.0045953 1250.2 2.11 0.1055 0.838 0.0034289
+26175 -0.21117 0.0044567 1308.8 2.11 0.1055 0.82859 0.0032881
+27347 -0.21283 0.004137 1367.4 2.11 0.1055 0.82736 0.0030477
+28520 -0.2042 0.0044587 1426 2.11 0.1055 0.83375 0.0033101
+29692 -0.2112 0.0042852 1484.6 2.11 0.1055 0.82857 0.0031615
+30864 -0.20319 0.0043483 1543.2 2.11 0.1055 0.8345 0.003231
+32036 -0.20752 0.0044297 1601.8 2.11 0.1055 0.83129 0.0032788
+33207 -0.20654 0.0043188 1660.4 2.11 0.1055 0.83201 0.0031995
+34380 -0.20126 0.0046375 1719 2.11 0.1055 0.83593 0.0034518
+35551 -0.20924 0.0042871 1777.6 2.11 0.1055 0.83001 0.0031684
+36724 -0.21323 0.0045471 1836.2 2.11 0.1055 0.82707 0.0033487
+37895 -0.21324 0.0045354 1894.7 2.11 0.1055 0.82706 0.00334
+39067 -0.19905 0.0044141 1953.4 2.11 0.1055 0.83758 0.003292
+40239 -0.1991 0.0047441 2012 2.11 0.1055 0.83754 0.003538
+41411 -0.20359 0.0050136 2070.5 2.11 0.1055 0.8342 0.003724
+42583 -0.21032 0.0049474 2129.1 2.11 0.1055 0.82922 0.0036529
+43755 -0.20689 0.0048203 2187.8 2.11 0.1055 0.83176 0.00357
+44927 -0.21075 0.0052337 2246.4 2.11 0.1055 0.8289 0.0038628
+46099 -0.19956 0.0047827 2304.9 2.11 0.1055 0.8372 0.0035653
Index: src/sas/sascalc/data_util/qsmearing.py
===================================================================
--- src/sas/sascalc/data_util/qsmearing.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
+++ src/sas/sascalc/data_util/qsmearing.py	(revision 0ac6e112e41f0c4d3dd301c9980644aa6aac6f83)
@@ -67,7 +67,10 @@
     if _found_sesans == True:
         #Pre-compute the Hankel matrix (H)
-        qmax, qunits = data.sample.zacceptance
         SElength = Converter(data._xunit)(data.x, "A")
-        zaccept = Converter(qunits)(qmax, "1/A"),
+
+        theta_max = Converter("radians")(data.sample.zacceptance)[0]
+        q_max = 2 * np.pi / np.max(data.source.wavelength) * np.sin(theta_max)
+        zaccept = Converter("1/A")(q_max, "1/" + data.source.wavelength_unit),
+
         Rmax = 10000000
         hankel = SesansTransform(data.x, SElength, zaccept, Rmax)
Index: src/sas/sascalc/dataloader/data_info.py
===================================================================
--- src/sas/sascalc/dataloader/data_info.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
+++ src/sas/sascalc/dataloader/data_info.py	(revision 747334dad7f7c919de226e3bbbb5159f0d67f1ed)
@@ -354,4 +354,5 @@
     ## SESANS zacceptance
     zacceptance = None
+    yacceptance = None
 
     def __init__(self):
Index: src/sas/sascalc/dataloader/readers/cansas_constants.py
===================================================================
--- src/sas/sascalc/dataloader/readers/cansas_constants.py	(revision ad4632c3bee7cc6b6d8987a3088e925b98cf41ab)
+++ src/sas/sascalc/dataloader/readers/cansas_constants.py	(revision 747334dad7f7c919de226e3bbbb5159f0d67f1ed)
@@ -135,4 +135,5 @@
                              "Sesans": {"storeas": "content"},
                              "zacceptance": {"storeas": "float"},
+                             "yacceptance": {"storeas": "float"},
                              "<any>" : ANY
                             }
Index: src/sas/sascalc/dataloader/readers/cansas_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/cansas_reader.py	(revision 463e7ffce130ae386f93cd18b87a1120743e88b5)
+++ src/sas/sascalc/dataloader/readers/cansas_reader.py	(revision 747334dad7f7c919de226e3bbbb5159f0d67f1ed)
@@ -292,4 +292,6 @@
                 elif tagname == 'Sesans':
                     self.current_datainfo.isSesans = bool(data_point)
+                elif tagname == 'yacceptance':
+                    self.current_datainfo.sample.yacceptance = (data_point, unit)
                 elif tagname == 'zacceptance':
                     self.current_datainfo.sample.zacceptance = (data_point, unit)
@@ -1057,4 +1059,6 @@
             sesans.text = str(datainfo.isSesans)
             node.append(sesans)
+            self.write_node(node, "yacceptance", datainfo.sample.yacceptance[0],
+                             {'unit': datainfo.sample.yacceptance[1]})
             self.write_node(node, "zacceptance", datainfo.sample.zacceptance[0],
                              {'unit': datainfo.sample.zacceptance[1]})
Index: src/sas/sascalc/dataloader/readers/sesans_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/sesans_reader.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
+++ src/sas/sascalc/dataloader/readers/sesans_reader.py	(revision 0ac6e112e41f0c4d3dd301c9980644aa6aac6f83)
@@ -1,9 +1,10 @@
 """
     SESANS reader (based on ASCII reader)
-    
+
     Reader for .ses or .sesans file format
-    
-    Jurrian Bakker 
+
+    Jurrian Bakker
 """
+import logging
 import numpy as np
 import os
@@ -18,31 +19,29 @@
 _ZERO = 1e-16
 
+
 class Reader:
     """
     Class to load sesans files (6 columns).
     """
-    ## File type
+    # File type
     type_name = "SESANS"
-    
-    ## Wildcards
+
+    # Wildcards
     type = ["SESANS files (*.ses)|*.ses",
             "SESANS files (*..sesans)|*.sesans"]
-    ## List of allowed extensions
+    # List of allowed extensions
     ext = ['.ses', '.SES', '.sesans', '.SESANS']
-    
-    ## Flag to bypass extension check
+
+    # Flag to bypass extension check
     allow_all = True
-    
+
     def read(self, path):
-        
-#        print "reader triggered"
-        
         """
         Load data file
-        
+
         :param path: file path
-        
+
         :return: SESANSData1D object, or None
-        
+
         :raise RuntimeError: when the file can't be opened
         :raise ValueError: when the length of the data vectors are inconsistent
@@ -51,120 +50,81 @@
             basename = os.path.basename(path)
             _, extension = os.path.splitext(basename)
-            if self.allow_all or extension.lower() in self.ext:
-                try:
-                    # Read in binary mode since GRASP frequently has no-ascii
-                    # characters that brakes the open operation
-                    input_f = open(path,'rb')
-                except:
-                    raise  RuntimeError, "sesans_reader: cannot open %s" % path
-                buff = input_f.read()
-                lines = buff.splitlines()
-                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  = 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
+            if not (self.allow_all or extension.lower() in self.ext):
+                raise RuntimeError("{} has an unrecognized file extension".format(path))
+        else:
+            raise RunetimeError("{} is not a file".format(path))
+        with open(path, 'r') as input_f:
+            # Read in binary mode since GRASP frequently has no-ascii
+            # characters that brakes the open operation
+            line = input_f.readline()
+            params = {}
+            while not line.startswith("BEGIN_DATA"):
+                terms = line.split()
+                if len(terms) >= 2:
+                    params[terms[0]] = " ".join(terms[1:])
+                line = input_f.readline()
+            self.params = params
+            headers = input_f.readline().split()
 
-                paramnames=[]
-                paramvals=[]
-                zvals=[]
-                dzvals=[]
-                lamvals=[]
-                dlamvals=[]
-                Pvals=[]
-                dPvals=[]
+            data = np.loadtxt(input_f)
+            if data.size < 1:
+                raise RuntimeError("{} is empty".format(path))
+            x = data[:, headers.index("SpinEchoLength")]
+            dx = data[:, headers.index("SpinEchoLength_error")]
+            lam = data[:, headers.index("Wavelength")]
+            dlam = data[:, headers.index("Wavelength_error")]
+            y = data[:, headers.index("Depolarisation")]
+            dy = data[:, headers.index("Depolarisation_error")]
 
-                for line in lines:
-                    # Initial try for CSV (split on ,)
-                    line=line.strip()
-                    toks = line.split('\t')
-                    if len(toks)==2:
-                        paramnames.append(toks[0])
-                        paramvals.append(toks[1])
-                    if len(toks)>5:
-                        zvals.append(toks[0])
-                        dzvals.append(toks[3])
-                        lamvals.append(toks[4])
-                        dlamvals.append(toks[5])
-                        Pvals.append(toks[1])
-                        dPvals.append(toks[2])
-                    else:
-                        continue
+            lam_unit = self._unit_fetch("Wavelength")
+            x, x_unit = self._unit_conversion(x, "A", self._unit_fetch("SpinEchoLength"))
+            dx, dx_unit = self._unit_conversion(
+                dx, lam_unit,
+                self._unit_fetch("SpinEchoLength"))
+            dlam, dlam_unit = self._unit_conversion(
+                dlam, lam_unit,
+                self._unit_fetch("Wavelength"))
+            y_unit = self._unit_fetch("Depolarisation")
 
-                x=[]
-                y=[]
-                lam=[]
-                dx=[]
-                dy=[]
-                dlam=[]
-                lam_header = lamvals[0].split()
-                data_conv_z = None
-                default_z_unit = "A"
-                data_conv_P = None
-                default_p_unit = " " # Adjust unit for axis (L^-3)
-                lam_unit = lam_header[1].replace("[","").replace("]","")
-                if lam_unit == 'AA':
-                    lam_unit = 'A'
-                varheader=[zvals[0],dzvals[0],lamvals[0],dlamvals[0],Pvals[0],dPvals[0]]
-                valrange=range(1, len(zvals))
-                for i in valrange:
-                    x.append(float(zvals[i]))
-                    y.append(float(Pvals[i]))
-                    lam.append(float(lamvals[i]))
-                    dy.append(float(dPvals[i]))
-                    dx.append(float(dzvals[i]))
-                    dlam.append(float(dlamvals[i]))
+            output = Data1D(x=x, y=y, lam=lam, dy=dy, dx=dx, dlam=dlam,
+                            isSesans=True)
 
-                x,y,lam,dy,dx,dlam = [
-                    np.asarray(v, 'double')
-                   for v in (x,y,lam,dy,dx,dlam)
-                ]
+            output.y_unit = y_unit
+            output.x_unit = x_unit
+            output.source.wavelength_unit = lam_unit
+            output.source.wavelength = lam
+            self.filename = output.filename = basename
+            output.xaxis(r"\rm{z}", x_unit)
+            # Adjust label to ln P/(lam^2 t), remove lam column refs
+            output.yaxis(r"\rm{ln(P)/(t \lambda^2)}", y_unit)
+            # Store loading process information
+            output.meta_data['loader'] = self.type_name
+            output.sample.name = params["Sample"]
+            output.sample.ID = params["DataFileTitle"]
+            output.sample.thickness = float(
+                self._unit_conversion(
+                    params["Thickness"], "cm", self._unit_fetch("Thickness"))[0])
 
-                input_f.close()
+            output.sample.zacceptance = (
+                float(params["Theta_zmax"]),
+                self._unit_fetch("Theta_zmax"))
 
-                output.x, output.x_unit = self._unit_conversion(x, lam_unit, default_z_unit)
-                output.y = y
-                output.y_unit = r'\AA^{-2} cm^{-1}'  # output y_unit added
-                output.dx, output.dx_unit = self._unit_conversion(dx, lam_unit, default_z_unit)
-                output.dy = dy
-                output.lam, output.lam_unit = self._unit_conversion(lam, lam_unit, default_z_unit)
-                output.dlam, output.dlam_unit = self._unit_conversion(dlam, lam_unit, default_z_unit)
-                
-                output.xaxis(r"\rm{z}", output.x_unit)
-                output.yaxis(r"\rm{ln(P)/(t \lambda^2)}", output.y_unit)  # Adjust label to ln P/(lam^2 t), remove lam column refs
+            output.sample.yacceptance = (
+                float(params["Theta_ymax"]),
+                self._unit_fetch("Theta_ymax"))
+            return output
 
-                # Store loading process information
-                output.meta_data['loader'] = self.type_name
-                #output.sample.thickness = float(paramvals[6])
-                output.sample.name = paramvals[1]
-                output.sample.ID = paramvals[0]
-                zaccept_unit_split = paramnames[7].split("[")
-                zaccept_unit = zaccept_unit_split[1].replace("]","")
-                if zaccept_unit.strip() == r'\AA^-1' or zaccept_unit.strip() == r'\A^-1':
-                    zaccept_unit = "1/A"
-                output.sample.zacceptance=(float(paramvals[7]),zaccept_unit)
-                output.vars = varheader
+    @staticmethod
+    def _unit_conversion(value, value_unit, default_unit):
+        """
+        Performs unit conversion on a measurement.
 
-                if len(output.x) < 1:
-                    raise RuntimeError, "%s is empty" % path
-                return output
-
-        else:
-            raise RuntimeError, "%s is not a file" % path
-        return None
-
-    def _unit_conversion(self, value, value_unit, default_unit):
-        if has_converter == True and value_unit != default_unit:
+        :param value: The magnitude of the measurement
+        :param value_unit: a string containing the final desired unit
+        :param default_unit: a string containing the units of the original measurement
+        :return: The magnitude of the measurement in the new units
+        """
+        # (float, string, string) -> float
+        if has_converter and value_unit != default_unit:
             data_conv_q = Converter(value_unit)
             value = data_conv_q(value, units=default_unit)
@@ -173,2 +133,5 @@
             new_unit = value_unit
         return value, new_unit
+
+    def _unit_fetch(self, unit):
+        return self.params[unit+"_unit"]
Index: test/sasdataloader/test/sphere3micron.ses
===================================================================
--- test/sasdataloader/test/sphere3micron.ses	(revision 2b31060287b81e5967b03f6148ee39bbe5d30c20)
+++ test/sasdataloader/test/sphere3micron.ses	(revision 2b31060287b81e5967b03f6148ee39bbe5d30c20)
@@ -0,0 +1,60 @@
+FileFormatVersion       1.0
+DataFileTitle           Polystyrene of Markus Strobl,  Full Sine, ++ only
+Sample                  Polystyrene 2 um in 53% H2O, 47% D2O
+Settings                D1=D2=20x8 mm,Ds = 16x10 mm (WxH), GF1 =scanning, GF2 = 2.5 A. 2 um polystyrene in 53% H2O, 47% D2O; 8.55% contrast
+Operator                CPD
+Date                    do 10 jul 2014 16:37:30
+ScanType                sine one element scan
+Thickness               2.00E-01
+Thickness_unit          cm
+Theta_zmax              0.0168
+Theta_zmax_unit         radians
+Theta_ymax              0.0168
+Theta_ymax_unit         radians
+Orientation             0 0 1
+SpinEchoLength_unit     A
+Depolarisation_unit     A-2 cm-1
+Wavelength_unit         A
+
+BEGIN_DATA
+SpinEchoLength Depolarisation Depolarisation_error SpinEchoLength_error Wavelength Wavelength_error Polarisation  Polarisation_error
+391.56 0.0041929 0.0036894 19.578 2.11 0.1055 1.0037 0.0032974
+1564 -0.0046571 0.0038185 78.2 2.11 0.1055 0.99586 0.003386
+2735.6 -0.017007 0.0038132 136.78 2.11 0.1055 0.98497 0.0033444
+3907.9 -0.033462 0.0035068 195.39 2.11 0.1055 0.97064 0.0030309
+5080.2 -0.047483 0.0038208 254.01 2.11 0.1055 0.9586 0.0032613
+6251.8 -0.070375 0.00376 312.59 2.11 0.1055 0.93926 0.0031446
+7423.2 -0.092217 0.0037927 371.16 2.11 0.1055 0.92117 0.0031108
+8595.5 -0.10238 0.004006 429.77 2.11 0.1055 0.91287 0.0032562
+9767.7 -0.12672 0.0038534 488.39 2.11 0.1055 0.8933 0.0030651
+10940 -0.1374 0.004243 546.98 2.11 0.1055 0.88484 0.003343
+12112 -0.16072 0.0045837 605.58 2.11 0.1055 0.86666 0.0035372
+13284 -0.16623 0.0045613 664.2 2.11 0.1055 0.86242 0.0035027
+14456 -0.18468 0.0044918 722.79 2.11 0.1055 0.84837 0.0033931
+15628 -0.19143 0.0048967 781.38 2.11 0.1055 0.84328 0.0036768
+16800 -0.20029 0.0045421 840.02 2.11 0.1055 0.83666 0.0033837
+17971 -0.19798 0.0046642 898.56 2.11 0.1055 0.83838 0.0034819
+19143 -0.21442 0.0047052 957.17 2.11 0.1055 0.82619 0.0034614
+20316 -0.20885 0.0044931 1015.8 2.11 0.1055 0.8303 0.0033218
+21488 -0.21393 0.0049186 1074.4 2.11 0.1055 0.82655 0.00362
+22660 -0.20685 0.004423 1133 2.11 0.1055 0.83179 0.0032758
+23832 -0.20802 0.0046979 1191.6 2.11 0.1055 0.83092 0.0034758
+25003 -0.19848 0.0045953 1250.2 2.11 0.1055 0.838 0.0034289
+26175 -0.21117 0.0044567 1308.8 2.11 0.1055 0.82859 0.0032881
+27347 -0.21283 0.004137 1367.4 2.11 0.1055 0.82736 0.0030477
+28520 -0.2042 0.0044587 1426 2.11 0.1055 0.83375 0.0033101
+29692 -0.2112 0.0042852 1484.6 2.11 0.1055 0.82857 0.0031615
+30864 -0.20319 0.0043483 1543.2 2.11 0.1055 0.8345 0.003231
+32036 -0.20752 0.0044297 1601.8 2.11 0.1055 0.83129 0.0032788
+33207 -0.20654 0.0043188 1660.4 2.11 0.1055 0.83201 0.0031995
+34380 -0.20126 0.0046375 1719 2.11 0.1055 0.83593 0.0034518
+35551 -0.20924 0.0042871 1777.6 2.11 0.1055 0.83001 0.0031684
+36724 -0.21323 0.0045471 1836.2 2.11 0.1055 0.82707 0.0033487
+37895 -0.21324 0.0045354 1894.7 2.11 0.1055 0.82706 0.00334
+39067 -0.19905 0.0044141 1953.4 2.11 0.1055 0.83758 0.003292
+40239 -0.1991 0.0047441 2012 2.11 0.1055 0.83754 0.003538
+41411 -0.20359 0.0050136 2070.5 2.11 0.1055 0.8342 0.003724
+42583 -0.21032 0.0049474 2129.1 2.11 0.1055 0.82922 0.0036529
+43755 -0.20689 0.0048203 2187.8 2.11 0.1055 0.83176 0.00357
+44927 -0.21075 0.0052337 2246.4 2.11 0.1055 0.8289 0.0038628
+46099 -0.19956 0.0047827 2304.9 2.11 0.1055 0.8372 0.0035653
Index: test/sasdataloader/test/utest_sesans.py
===================================================================
--- test/sasdataloader/test/utest_sesans.py	(revision bfd34a7aaf903c823d41068173c09bc5b1a251bc)
+++ test/sasdataloader/test/utest_sesans.py	(revision bfd34a7aaf903c823d41068173c09bc5b1a251bc)
@@ -0,0 +1,33 @@
+"""
+    Unit tests for the SESANS .ses reader
+"""
+
+import unittest
+from sas.sascalc.dataloader.loader import Loader
+
+import os.path
+
+class sesans_reader(unittest.TestCase):
+
+    def setUp(self):
+        self.loader = Loader()
+
+    def test_sesans_load(self):
+        """
+            Test .SES file loading
+        """
+        f =self.loader.load("sphere3micron.ses")
+        # self.assertEqual(f, 5)
+        self.assertEqual(len(f.x), 40)
+        self.assertEqual(f.x[0], 391.56)
+        self.assertEqual(f.x[-1], 46099)
+        self.assertEqual(f.y[-1], -0.19956)
+        self.assertEqual(f.x_unit, "A")
+        self.assertEqual(f.y_unit, "A-2 cm-1")
+        self.assertEqual(f.sample.name, "Polystyrene 2 um in 53% H2O, 47% D2O")
+        self.assertEqual(f.sample.thickness, 0.2)
+        self.assertEqual(f.sample.zacceptance, (0.0168, "radians"))
+        self.assertEqual(f.isSesans, True)
+
+if __name__ == "__main__":
+    unittest.main()
