Index: example/sesans_parameters_sphere.py
===================================================================
--- example/sesans_parameters_sphere.py	(revision 9217ef8174f5566df0d9259319dc1bde48372242)
+++ example/sesans_parameters_sphere.py	(revision fa79f5c490394c8fb6afdf72be2204a960727194)
@@ -46,3 +46,2 @@
 # DO NOT MODIFY THIS LINE
 problem = sesansfit.sesans_fit(sesans_file, model, initial_vals, custom_params, param_range)
-
Index: example/sesans_sphere_2micron.py
===================================================================
--- example/sesans_sphere_2micron.py	(revision 3330bb44faf647c84e605c5a75bed3f385a25a52)
+++ example/sesans_sphere_2micron.py	(revision fa79f5c490394c8fb6afdf72be2204a960727194)
@@ -1,4 +1,4 @@
 """
-This is a data file  used to load in sesans data and fit it using the bumps engine
+This is a data file used to load in sesans data and fit it using the bumps engine
 """
 from bumps.names import *
@@ -38,6 +38,6 @@
 # Constraints
 # model.param_name = f(other params)
-# EXAMPLE: model.scale = model.radius*model.radius*(1 - phi) - where radius and scale are model functions and phi is
-# a custom parameter
+# EXAMPLE: model.scale = model.radius*model.radius*(1 - phi) - where radius
+# and scale are model functions and phi is a custom parameter
 model.scale = phi*(1-phi)
 
@@ -45,3 +45,2 @@
 # DO NOT MODIFY THIS LINE
 problem = sesansfit.sesans_fit(sesans_file, model, initial_vals, custom_params, param_range)
-
Index: example/sesansfit.py
===================================================================
--- example/sesansfit.py	(revision 9217ef8174f5566df0d9259319dc1bde48372242)
+++ example/sesansfit.py	(revision fa79f5c490394c8fb6afdf72be2204a960727194)
@@ -1,2 +1,4 @@
+import logging
+
 from bumps.names import *
 from sasmodels import core, bumps_model, sesans
@@ -8,5 +10,6 @@
     return model
 
-def sesans_fit(file, model, initial_vals={}, custom_params={}, param_range=[], acceptance_angle=None):
+def sesans_fit(file, model, initial_vals={}, custom_params={}, param_range=[],
+               acceptance_angle=None):
     """
 
@@ -19,11 +22,15 @@
     @return: FitProblem for Bumps usage
     """
+    logging.basicConfig()
+
     initial_vals['background'] = 0.0
     try:
         loader = Loader()
-        data = loader.load(file)
-        if data is None: raise IOError("Could not load file %r"%(file))
+        data = loader.load(file)[0]
+        if data is None:
+            raise IOError("Could not load file %r"%(file))
 
-    except:
+    except Exception:
+        raise
         # If no loadable data file, generate random data
         SElength = np.linspace(0, 2400, 61) # [A]
@@ -50,5 +57,5 @@
     data.Rmax = 30*radius # [A]
 
-    if isinstance(model, basestring):
+    if isinstance(model, str):
         model = get_bumps_model(model)
 
Index: example/spheres2micron.ses
===================================================================
--- example/spheres2micron.ses	(revision 6abf70354d4dcffc6045667b1202c54f46214859)
+++ example/spheres2micron.ses	(revision fa79f5c490394c8fb6afdf72be2204a960727194)
@@ -1,131 +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 	ma 7 jul 2014 18:54:43 
-ScanType 	sine one element scan 
-Thickness [mm] 	2 
-Q_zmax [\AA^-1] 	0.05 
-Q_ymax [\AA^-1] 	0.05 
-  
-spin echo length [nm] 	 error SEL 	 wavelength [nm] 	 error wavelength 	 polarisation 	 error pol 
-49.778	2.4889	0.211	0.01055	0.99782	0.0044367
-63.041	3.152	0.211	0.01055	1.0026	0.0047862
-76.487	3.8244	0.211	0.01055	0.99601	0.0060598
-89.847	4.4924	0.211	0.01055	0.99175	0.0058257
-103.41	5.1705	0.211	0.01055	0.99543	0.0060966
-116.95	5.8475	0.211	0.01055	0.99512	0.0048106
-130.61	6.5303	0.211	0.01055	0.9975	0.0062594
-144.37	7.2184	0.211	0.01055	0.99473	0.005293
-158.2	7.9102	0.211	0.01055	0.9927	0.0053389
-172.12	8.6062	0.211	0.01055	0.99453	0.0064548
-186.17	9.3087	0.211	0.01055	0.98641	0.0073259
-200.28	10.014	0.211	0.01055	0.98879	0.0078682
-214.46	10.723	0.211	0.01055	0.9895	0.0068058
-228.73	11.436	0.211	0.01055	0.99204	0.0082509
-243.12	12.156	0.211	0.01055	0.99406	0.0051381
-257.55	12.878	0.211	0.01055	0.97965	0.0055447
-272.22	13.611	0.211	0.01055	0.97982	0.0065843
-286.9	14.345	0.211	0.01055	0.97793	0.0071814
-301.73	15.087	0.211	0.01055	0.97835	0.0066197
-316.75	15.838	0.211	0.01055	0.98125	0.0069484
-331.82	16.591	0.211	0.01055	0.97828	0.0068737
-347.16	17.358	0.211	0.01055	0.97682	0.006744
-362.45	18.122	0.211	0.01055	0.98155	0.0059865
-378.09	18.904	0.211	0.01055	0.96446	0.0066788
-393.74	19.687	0.211	0.01055	0.97276	0.0073781
-409.61	20.481	0.211	0.01055	0.97101	0.0071053
-425.55	21.278	0.211	0.01055	0.97501	0.0068244
-441.91	22.096	0.211	0.01055	0.96958	0.0072272
-458.12	22.906	0.211	0.01055	0.95991	0.0064035
-474.77	23.739	0.211	0.01055	0.96219	0.0059227
-491.52	24.576	0.211	0.01055	0.96016	0.0058606
-508.51	25.426	0.211	0.01055	0.9509	0.0049836
-525.68	26.284	0.211	0.01055	0.95558	0.0055218
-543.08	27.154	0.211	0.01055	0.95079	0.0058258
-560.74	28.037	0.211	0.01055	0.9514	0.0043921
-578.69	28.935	0.211	0.01055	0.94562	0.0046962
-596.75	29.838	0.211	0.01055	0.94588	0.0047341
-615.17	30.758	0.211	0.01055	0.93958	0.0045821
-633.77	31.688	0.211	0.01055	0.93731	0.0043108
-652.82	32.641	0.211	0.01055	0.93664	0.0052044
-672.04	33.602	0.211	0.01055	0.93209	0.0035563
-691.57	34.578	0.211	0.01055	0.93385	0.0046002
-711.48	35.574	0.211	0.01055	0.93028	0.0051136
-731.67	36.583	0.211	0.01055	0.93012	0.0035279
-752.17	37.608	0.211	0.01055	0.92594	0.0039458
-773.1	38.655	0.211	0.01055	0.92352	0.0027613
-794.42	39.721	0.211	0.01055	0.91823	0.0034587
-816.14	40.807	0.211	0.01055	0.90862	0.0034262
-838.19	41.91	0.211	0.01055	0.91909	0.003498
-860.69	43.034	0.211	0.01055	0.91013	0.0030537
-883.74	44.187	0.211	0.01055	0.90449	0.0035391
-907.04	45.352	0.211	0.01055	0.90057	0.0029672
-930.95	46.547	0.211	0.01055	0.90316	0.0031245
-955.38	47.769	0.211	0.01055	0.89492	0.0030981
-980.25	49.013	0.211	0.01055	0.89636	0.0036625
-1005.7	50.284	0.211	0.01055	0.88808	0.0022652
-1031.7	51.586	0.211	0.01055	0.88665	0.0044622
-1058.3	52.914	0.211	0.01055	0.88205	0.0030275
-1085.5	54.276	0.211	0.01055	0.88257	0.0028637
-1113.4	55.669	0.211	0.01055	0.87629	0.0030312
-1141.9	57.093	0.211	0.01055	0.87732	0.0026539
-1171	58.55	0.211	0.01055	0.87361	0.0034591
-1201	60.052	0.211	0.01055	0.86595	0.0028129
-1231.6	61.582	0.211	0.01055	0.86804	0.0043311
-1263	63.151	0.211	0.01055	0.86676	0.0028806
-1295.2	64.762	0.211	0.01055	0.85655	0.0028657
-1328.4	66.419	0.211	0.01055	0.85794	0.0034773
-1362.3	68.113	0.211	0.01055	0.85521	0.0032798
-1397.1	69.854	0.211	0.01055	0.84974	0.0044537
-1432.9	71.644	0.211	0.01055	0.84149	0.0032738
-1469.7	73.487	0.211	0.01055	0.84801	0.0037874
-1507.5	75.376	0.211	0.01055	0.84334	0.003206
-1546.4	77.318	0.211	0.01055	0.83749	0.0040707
-1586.4	79.322	0.211	0.01055	0.83921	0.0049938
-1627.6	81.381	0.211	0.01055	0.83434	0.0057337
-1669.9	83.497	0.211	0.01055	0.82878	0.0062417
-1713.6	85.678	0.211	0.01055	0.82309	0.0080179
-1758.5	87.927	0.211	0.01055	0.82433	0.0074191
-1804.8	90.239	0.211	0.01055	0.82023	0.0076431
-1852.5	92.627	0.211	0.01055	0.82756	0.0063064
-1901.7	95.087	0.211	0.01055	0.82584	0.0052944
-1952.4	97.622	0.211	0.01055	0.82799	0.0050662
-2004.8	100.24	0.211	0.01055	0.82345	0.0043127
-2058.8	102.94	0.211	0.01055	0.82296	0.0038
-2114.5	105.72	0.211	0.01055	0.81987	0.0034072
-2172	108.6	0.211	0.01055	0.82021	0.0036752
-2231.4	111.57	0.211	0.01055	0.82765	0.0028851
-2292.8	114.64	0.211	0.01055	0.82664	0.0038942
-2356.2	117.81	0.211	0.01055	0.82702	0.0047371
-2421.8	121.09	0.211	0.01055	0.81593	0.0043772
-2489.6	124.48	0.211	0.01055	0.8251	0.0028026
-2559.5	127.98	0.211	0.01055	0.8292	0.0024574
-2631.9	131.59	0.211	0.01055	0.82626	0.0036198
-2706.8	135.34	0.211	0.01055	0.8208	0.0032314
-2784.3	139.22	0.211	0.01055	0.81959	0.0042731
-2864.5	143.23	0.211	0.01055	0.82653	0.002699
-2947.5	147.38	0.211	0.01055	0.82401	0.0036726
-3033.5	151.67	0.211	0.01055	0.82361	0.0048224
-3122.4	156.12	0.211	0.01055	0.82358	0.0041221
-3214.5	160.73	0.211	0.01055	0.82187	0.0028807
-3310.1	165.5	0.211	0.01055	0.82644	0.003516
-3409	170.45	0.211	0.01055	0.82355	0.0021166
-3511.4	175.57	0.211	0.01055	0.82513	0.0033911
-3617.6	180.88	0.211	0.01055	0.82802	0.0015342
-3727.6	186.38	0.211	0.01055	0.82663	0.0029222
-3841.7	192.08	0.211	0.01055	0.82026	0.0020755
-3960	198	0.211	0.01055	0.83079	0.0026394
-4082.7	204.13	0.211	0.01055	0.82665	0.0027466
-4209.9	210.5	0.211	0.01055	0.82774	0.0025199
-4341.9	217.09	0.211	0.01055	0.83489	0.0030619
-4478.7	223.94	0.211	0.01055	0.81987	0.0020988
-4620.8	231.04	0.211	0.01055	0.8253	0.0023899
-4768.2	238.41	0.211	0.01055	0.82653	0.0022851
-4921.1	246.06	0.211	0.01055	0.82442	0.003383
-5079.8	253.99	0.211	0.01055	0.82827	0.0015979
-5244.7	262.23	0.211	0.01055	0.82494	0.0031129
-5415.7	270.79	0.211	0.01055	0.82183	0.0030149
-5593.3	279.67	0.211	0.01055	0.83217	0.0046976
-5777.8	288.89	0.211	0.01055	0.82227	0.005574
-5969.3	298.46	0.211	0.01055	0.82338	0.0025569
+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: sasmodels/data.py
===================================================================
--- sasmodels/data.py	(revision e65c3ba5944b729f651cf8747f7b64bed2cbb826)
+++ sasmodels/data.py	(revision fa79f5c490394c8fb6afdf72be2204a960727194)
@@ -527,5 +527,5 @@
 
     if use_data or use_theory:
-        is_tof = (data.lam != data.lam[0]).any()
+        is_tof = data.lam is not None and (data.lam != data.lam[0]).any()
         if num_plots > 1:
             plt.subplot(1, num_plots, 1)
Index: sasmodels/direct_model.py
===================================================================
--- sasmodels/direct_model.py	(revision 9e771a3757fd7f0b8a68d70e73b5a50617a12ad8)
+++ sasmodels/direct_model.py	(revision fa79f5c490394c8fb6afdf72be2204a960727194)
@@ -177,4 +177,21 @@
 
 
+def _make_sesans_transform(data):
+    from sas.sascalc.data_util.nxsunit import Converter
+
+    # Pre-compute the Hankel matrix (H)
+    SElength = Converter(data._xunit)(data.x, "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 = sesans.SesansTransform(data.x, SElength,
+                                    data.source.wavelength,
+                                    zaccept, Rmax)
+    return hankel
+
+
 class DataMixin(object):
     """
@@ -216,7 +233,6 @@
 
         if self.data_type == 'sesans':
-            q = sesans.make_q(data.sample.zacceptance, data.Rmax)
+            res = _make_sesans_transform(data)
             index = slice(None, None)
-            res = None
             if data.y is not None:
                 Iq, dIq = data.y, data.dy
@@ -224,6 +240,5 @@
                 Iq, dIq = None, None
             #self._theory = np.zeros_like(q)
-            q_vectors = [q]
-            q_mono = sesans.make_all_q(data)
+            q_vectors = [res.q_calc]
         elif self.data_type == 'Iqxy':
             #if not model.info.parameters.has_2d:
@@ -244,5 +259,4 @@
             #self._theory = np.zeros_like(self.Iq)
             q_vectors = res.q_calc
-            q_mono = []
         elif self.data_type == 'Iq':
             index = (data.x >= data.qmin) & (data.x <= data.qmax)
@@ -269,5 +283,4 @@
             #self._theory = np.zeros_like(self.Iq)
             q_vectors = [res.q_calc]
-            q_mono = []
         elif self.data_type == 'Iq-oriented':
             index = (data.x >= data.qmin) & (data.x <= data.qmax)
@@ -286,5 +299,4 @@
                                       qy_width=data.dxl[index])
             q_vectors = res.q_calc
-            q_mono = []
         else:
             raise ValueError("Unknown data type") # never gets here
@@ -293,5 +305,4 @@
         # so we can save/restore state
         self._kernel_inputs = q_vectors
-        self._kernel_mono_inputs = q_mono
         self._kernel = None
         self.Iq, self.dIq, self.index = Iq, dIq, index
@@ -331,7 +342,4 @@
         if self._kernel is None:
             self._kernel = self._model.make_kernel(self._kernel_inputs)
-            self._kernel_mono = (
-                self._model.make_kernel(self._kernel_mono_inputs)
-                if self._kernel_mono_inputs else None)
 
         Iq_calc = call_kernel(self._kernel, pars, cutoff=cutoff)
@@ -341,17 +349,10 @@
         # TODO: refactor so we don't store the result in the model
         self.Iq_calc = Iq_calc
-        if self.data_type == 'sesans':
-            Iq_mono = (call_kernel(self._kernel_mono, pars, mono=True)
-                       if self._kernel_mono_inputs else None)
-            result = sesans.transform(self._data,
-                                      self._kernel_inputs[0], Iq_calc,
-                                      self._kernel_mono_inputs, Iq_mono)
-        else:
-            result = self.resolution.apply(Iq_calc)
-            if hasattr(self.resolution, 'nx'):
-                self.Iq_calc = (
-                    self.resolution.qx_calc, self.resolution.qy_calc,
-                    np.reshape(Iq_calc, (self.resolution.ny, self.resolution.nx))
-                )
+        result = self.resolution.apply(Iq_calc)
+        if hasattr(self.resolution, 'nx'):
+            self.Iq_calc = (
+                self.resolution.qx_calc, self.resolution.qy_calc,
+                np.reshape(Iq_calc, (self.resolution.ny, self.resolution.nx))
+            )
         return result
 
Index: sasmodels/sesans.py
===================================================================
--- sasmodels/sesans.py	(revision 9f91afe4393cba3b6fa1421712fdcad1689ba25f)
+++ sasmodels/sesans.py	(revision fa79f5c490394c8fb6afdf72be2204a960727194)
@@ -13,5 +13,5 @@
 
 import numpy as np  # type: ignore
-from numpy import pi, exp  # type: ignore
+from numpy import pi  # type: ignore
 from scipy.special import j0
 
