Index: sasmodels/resolution.py
===================================================================
--- sasmodels/resolution.py	(revision 589b74079ad4b029df7c721c049f64c5f9594672)
+++ sasmodels/resolution.py	(revision 26b848d716e8373e478c74385700a483e7cea44b)
@@ -11,4 +11,5 @@
 
 from sasmodels import sesans
+from sasmodels.sesans import SesansTransform as SesansTransform
 
 __all__ = ["Resolution", "Perfect1D", "Pinhole1D", "Slit1D",
@@ -57,25 +58,4 @@
         return theory
 
-
-class SESANS1D(Resolution):
-    def __init__(self, data, H0, H, q_calc):
-        self.q = data.x
-        self.H0 = H0
-        self.H = H
-        self.data=data
-        self.q_calc = q_calc
-    def apply(self, theory):
-        return sesans.SesansTransform.apply(theory)
-        #return sesans.hankeltrafo(self.H0, self.H, theory)
-
-"""
-    def __init__(self, data, q_calc):
-        self.q = data.x
-        self.data = data
-        self.q_calc = q_calc
-
-    def apply(self, theory):
-        return sesans.transform(self.data, self.q_calc, theory, None, None)
-"""
 class Pinhole1D(Resolution):
     r"""
Index: sasmodels/sesans.py
===================================================================
--- sasmodels/sesans.py	(revision 589b74079ad4b029df7c721c049f64c5f9594672)
+++ sasmodels/sesans.py	(revision 26b848d716e8373e478c74385700a483e7cea44b)
@@ -14,53 +14,10 @@
 import numpy as np  # type: ignore
 from numpy import pi, exp  # type: ignore
-#from scipy.special import jv as besselj
 from scipy.special import j0
 #from mpmath import j0 as j0
-#from mpmath import besselj
-#from mpmath import mpf
-from src.sas.sascalc.data_util.nxsunit import Converter
-#from sas.sasgui.perspectives.fitting.fitpage import FitPage
-#import direct_model.DataMixin as model
         
-def make_q(q_max, Rmax):
-    r"""
-    Return a $q$ vector suitable for SESANS covering from $2\pi/ (10 R_{\max})$
-    to $q_max$. This is the integration range of the Hankel transform; bigger range and 
-    more points makes a better numerical integration.
-    Smaller q_min will increase reliable spin echo length range. 
-    Rmax is the "radius" of the largest expected object and can be set elsewhere.
-    q_max is determined by the acceptance angle of the SESANS instrument.
-    """
-    from sas.sascalc.data_util.nxsunit import Converter
-
-    q_min = dq = 0.1 * 2*pi / Rmax
-    return np.arange(q_min,
-                     Converter(q_max[1])(q_max[0],
-                                         units="1/A"),
-                     dq)
-
-def Hankelconstructor(data):
-    Rmax = 1000000
-    #Rmax = #value in text box?
-    q_calc = make_q(data.sample.zacceptance, Rmax)
-    SElength = Converter(data._xunit)(data.x, "A")
-    dq = q_calc[1] - q_calc[0]
-    H0 = dq / (2 * pi) * q_calc
-    repSE, repq = np.meshgrid(SElength,q_calc)
-    repq=np.array(repq,dtype='f')
-    repSE=np.array(repSE,dtype='f')
-    H = dq / (2 * pi) * j0(repSE*repq)*repq
-    return H0, H, q_calc
-
-def hankeltrafo(H0, H, Iq_calc):
-    G0 = np.dot(H0, Iq_calc)
-    G = np.dot(H.T, Iq_calc)
-    P = G - G0
-    return P  # This is the logarithmic Polarization, not the linear one as found in Andersson2008!
-
-
 class SesansTransform(object):
     #: Set of spin-echo lengths in the measured data
-    SElength = None  # type: np.ndarray
+    SE = None  # type: np.ndarray
     #: Maximum acceptance of scattering vector in the spin echo encoding dimension (for ToF: Q of min(R) and max(lam))
     zaccept = None # type: float
@@ -89,5 +46,5 @@
         q_min = dq = 0.1 * 2*pi / self.Rmax
         q_max = self.zaccept
-        q=np.arange(q_min,q_max)
+        q=np.arange(q_min, q_max, q_min)
         self.q = q
         self.dq = dq
@@ -100,9 +57,21 @@
 
         H0 = dq / (2 * pi) * q
-        repSE, repq = np.meshgrid(SElength,q)
-        repq=np.array(repq,dtype='f')
-        repSE=np.array(repSE,dtype='f')
+        repSE, repq = np.meshgrid(SElength, q)
+        repq=np.array(repq,dtype='float32')
+        repSE=np.array(repSE,dtype='float32')
         H = dq / (2 * pi) * j0(repSE*repq)*repq
 
         self._H, self._H0 = H, H0
 
+class SESANS1D(SesansTransform):
+    def __init__(self, data, _H0, _H, q_calc):
+        # x values of the data (Sasview requires these to be named "q")
+        self.q = data.x
+        self._H0 = _H0
+        self._H = _H
+        # Pysmear does some checks on the smearer object, these checks require the "data" object...
+        self.data=data
+        # q values of the SAS model
+        self.q_calc = q_calc # These are the MODEL's q values used by the smearer (in this case: the Hankel transform)
+    def apply(self, theory):
+        return SesansTransform.apply(self,theory)
