Index: compare.py
===================================================================
--- compare.py	(revision d547f16727392afec3aa4475edc287b0348deca3)
+++ compare.py	(revision a503bfddd742ec35fe2b801f1d75a0a5f11eccfa)
@@ -156,5 +156,5 @@
     return data, index
 
-def compare(name, pars, Ncpu, Ngpu, opts, set_pars):
+def compare(name, pars, Ncpu, Nocl, opts, set_pars):
     opt_values = dict(split
                       for s in opts for split in ((s.split('='),))
@@ -185,8 +185,8 @@
 
     # OpenCl calculation
-    if Ngpu > 0:
-        gpu, gpu_time = eval_opencl(name, pars, data, dtype, Ngpu)
-        print "opencl t=%.1f ms, intensity=%.0f"%(gpu_time, sum(gpu[index]))
-        #print max(gpu), min(gpu)
+    if Nocl > 0:
+        ocl, ocl_time = eval_opencl(name, pars, data, dtype, Nocl)
+        print "opencl t=%.1f ms, intensity=%.0f"%(ocl_time, sum(ocl[index]))
+        #print max(ocl), min(ocl)
 
     # ctypes/sasview calculation
@@ -201,13 +201,13 @@
 
     # Compare, but only if computing both forms
-    if Ngpu > 0 and Ncpu > 0:
-        #print "speedup %.2g"%(cpu_time/gpu_time)
-        #print "max |gpu/cpu|", max(abs(gpu/cpu)), "%.15g"%max(abs(gpu)), "%.15g"%max(abs(cpu))
-        #cpu *= max(gpu/cpu)
-        resid, relerr = np.zeros_like(gpu), np.zeros_like(gpu)
-        resid[index] = (gpu - cpu)[index]
+    if Nocl > 0 and Ncpu > 0:
+        #print "speedup %.2g"%(cpu_time/ocl_time)
+        #print "max |ocl/cpu|", max(abs(ocl/cpu)), "%.15g"%max(abs(ocl)), "%.15g"%max(abs(cpu))
+        #cpu *= max(ocl/cpu)
+        resid, relerr = np.zeros_like(ocl), np.zeros_like(ocl)
+        resid[index] = (ocl - cpu)[index]
         relerr[index] = resid[index]/cpu[index]
         #bad = (relerr>1e-4)
-        #print relerr[bad],cpu[bad],gpu[bad],data.qx_data[bad],data.qy_data[bad]
+        #print relerr[bad],cpu[bad],ocl[bad],data.qx_data[bad],data.qy_data[bad]
         print "max(|ocl-%s|)"%comp, max(abs(resid[index]))
         print "max(|(ocl-%s)/%s|)"%(comp,comp), max(abs(relerr[index]))
@@ -220,21 +220,21 @@
     import matplotlib.pyplot as plt
     if Ncpu > 0:
-        if Ngpu > 0: plt.subplot(131)
+        if Nocl > 0: plt.subplot(131)
         plot_data(data, cpu, scale='log')
         plt.title("%s t=%.1f ms"%(comp,cpu_time))
-    if Ngpu > 0:
+    if Nocl > 0:
         if Ncpu > 0: plt.subplot(132)
-        plot_data(data, gpu, scale='log')
-        plt.title("opencl t=%.1f ms"%gpu_time)
-    if Ncpu > 0 and Ngpu > 0:
+        plot_data(data, ocl, scale='log')
+        plt.title("opencl t=%.1f ms"%ocl_time)
+    if Ncpu > 0 and Nocl > 0:
         plt.subplot(133)
         err = resid if '-abs' in opts else relerr
         errstr = "abs err" if '-abs' in opts else "rel err"
-        #err,errstr = gpu/cpu,"ratio"
+        #err,errstr = ocl/cpu,"ratio"
         plot_data(data, err, scale='linear')
         plt.title("max %s = %.3g"%(errstr, max(abs(err[index]))))
     if is2D: plt.colorbar()
 
-    if Ncpu > 0 and Ngpu > 0 and '-hist' in opts:
+    if Ncpu > 0 and Nocl > 0 and '-hist' in opts:
         plt.figure()
         v = relerr[index]
Index: sasmodels/convert.py
===================================================================
--- sasmodels/convert.py	(revision f4cf580e329add99780558498dbc8a8ab076ad24)
+++ sasmodels/convert.py	(revision a503bfddd742ec35fe2b801f1d75a0a5f11eccfa)
@@ -2,54 +2,4 @@
 Convert models to and from sasview.
 """
-PARAMETER_MAP = {
-    'CylinderModel': dict(
-        name='cylinder',
-        cyl_theta='theta', cyl_phi='phi',
-        sldCyl='sld', sldSolv='solvent_sld',
-        ),
-    'EllipsoidModel': dict(
-        name='ellipsoid',
-        axis_theta='theta', axis_phi='phi',
-        sldEll='sld', sldSolv='solvent_sld',
-        radius_a='rpolar', radius_b='requatorial',
-        ),
-    'CoreShellCylinderModel': dict(
-        name='core_shell_cylinder',
-        axis_theta='theta', axis_phi='phi',
-        ),
-    'TriaxialEllipsoidModel': dict(
-        name='triaxial_ellipsoid',
-        axis_theta='theta', axis_phi='phi', axis_psi='psi',
-        sldEll='sld', sldSolv='solvent_sld',
-        semi_axisA='req_minor', semi_axisB='req_major', semi_axisC='rpolar',
-        ),
-    'LamellarModel': dict(
-        name='lamellar',
-        sld_bi='sld', sld_sol='solvent_sld',
-        bi_thick='thickness',
-        ),
-    'CappedCylinderModel': dict(
-        name='capped_cylinder',
-        sld_capcyl='sld', sld_solv='solvent_sld',
-        len_cyl='length', rad_cyl='radius', rad_cap='cap_radius',
-        ),
-    'SphereModel': dict(
-        name='sphere',
-        sldSph='sld', sldSolv='solvent_sld',
-        radius='radius',  # listing identical parameters is optional
-        ),
-    }
-
-def _reverse_map():
-    retval = {}
-    for old_name,old_map in PARAMETER_MAP.items():
-        new_name = old_map['name']
-        new_map = dict((v,k) for k,v in old_map.items() if k != 'name')
-        new_map['name'] = old_name
-        retval[new_name] = new_map
-    return retval
-REVERSE_MAP = _reverse_map()
-del _reverse_map
-
 
 def _rename_pars(pars, mapping):
@@ -85,8 +35,7 @@
     Convert model from old style parameter names to new style.
     """
-    mapping = PARAMETER_MAP[name]
-    newname = mapping['name']
-    newpars = _rescale_sld(_rename_pars(pars, mapping))
-    return newname, newpars
+    raise NotImplementedError
+    # need to load all new models in order to determine old=>new
+    # model name mapping
 
 def _unscale_sld(pars):
@@ -103,6 +52,8 @@
     Convert model from new style parameter names to old style.
     """
-    mapping = REVERSE_MAP[name]
-    oldname = mapping['name']
+    sasmodels = __import__('sasmodels.models.'+name)
+    newmodel = getattr(sasmodels.models, name, None)
+    mapping = newmodel.oldpars
+    oldname = newmodel.oldname
     oldpars = _rename_pars(_unscale_sld(pars), mapping)
     return oldname, oldpars
Index: sasmodels/generate.py
===================================================================
--- sasmodels/generate.py	(revision b3f6bc3b9123ab59a035e8360b67cc7d380ea695)
+++ sasmodels/generate.py	(revision a503bfddd742ec35fe2b801f1d75a0a5f11eccfa)
@@ -128,7 +128,25 @@
     respectively.  These can also be defined in the last source file.
 
+    *Iq* and *Iqxy* also be instead be python functions defining the
+    kernel.  If they are marked as *Iq.vectorized = True* then the
+    kernel is passed the entire *q* vector at once, otherwise it is
+    passed values one *q* at a time.  The performance improvement of
+    this step is significant.
+
 An *info* dictionary is constructed from the kernel meta data and
-returned to the caller.  It includes the additional fields
-
+returned to the caller.
+
+Additional fields can be defined in the kernel definition file that
+are not needed for sas modelling.
+
+    *demo* is a dictionary of parameter=value defining a set of
+    parameters to use by default when *compare* is called.
+
+    *oldname* is the name of the model in sasview before sasmodels
+    was split into its own package, and *oldpars* is a dictionary
+    of *parameter: old_parameter* pairs defining the new names for
+    the parameters.  This is used by *compare* to check the values
+    of the new model against the values of the old model before
+    you are ready to add the new model to sasmodels.
 
 The model evaluator, function call sequence consists of q inputs and the return vector,
Index: sasmodels/models/capped_cylinder.py
===================================================================
--- sasmodels/models/capped_cylinder.py	(revision d547f16727392afec3aa4475edc287b0348deca3)
+++ sasmodels/models/capped_cylinder.py	(revision a503bfddd742ec35fe2b801f1d75a0a5f11eccfa)
@@ -173,3 +173,5 @@
     phi_pd=15, phi_pd_n=1,
     )
-
+oldname = 'CappedCylinderModel'
+oldpars = dict(sld='sld_capcyl', solvent_sld='sld_solv',
+               length='len_cyl', radius='rad_cyl', cap_radius='rad_cap')
Index: sasmodels/models/core_shell_cylinder.py
===================================================================
--- sasmodels/models/core_shell_cylinder.py	(revision d547f16727392afec3aa4475edc287b0348deca3)
+++ sasmodels/models/core_shell_cylinder.py	(revision a503bfddd742ec35fe2b801f1d75a0a5f11eccfa)
@@ -179,2 +179,4 @@
     phi_pd=15, phi_pd_n=1,
     )
+oldname = 'CoreShellCylinderModel'
+oldpars = dict(theta='axis_theta', phi='axis_phi')
Index: sasmodels/models/cylinder.py
===================================================================
--- sasmodels/models/cylinder.py	(revision d547f16727392afec3aa4475edc287b0348deca3)
+++ sasmodels/models/cylinder.py	(revision a503bfddd742ec35fe2b801f1d75a0a5f11eccfa)
@@ -151,9 +151,4 @@
     return 0.5 * (ddd)**(1./3.)
 
-# For testing against the old sasview models, include the converted parameter
-# names and the target sasview model name.
-oldname='CylinderModel'
-oldpars=dict(theta='cyl_theta', phi='cyl_phi', sld='sldCyl', solvent_sld='sldSolv')
-
 # parameters for demo
 demo = dict(
@@ -169,2 +164,7 @@
     )
 
+# For testing against the old sasview models, include the converted parameter
+# names and the target sasview model name.
+oldname='CylinderModel'
+oldpars=dict(theta='cyl_theta', phi='cyl_phi', sld='sldCyl', solvent_sld='sldSolv')
+
Index: sasmodels/models/ellipsoid.py
===================================================================
--- sasmodels/models/ellipsoid.py	(revision d547f16727392afec3aa4475edc287b0348deca3)
+++ sasmodels/models/ellipsoid.py	(revision a503bfddd742ec35fe2b801f1d75a0a5f11eccfa)
@@ -189,2 +189,6 @@
         phi_pd=15, phi_pd_n=1,
         )
+oldname = 'EllipsoidModel'
+oldpars = dict(theta='axis_theta', phi='axis_phi',
+               sld='sldEll', solvent_sld='sldSolv',
+               rpolar='radius_a', requatorial='radius_b')
Index: sasmodels/models/lamellar.py
===================================================================
--- sasmodels/models/lamellar.py	(revision d547f16727392afec3aa4475edc287b0348deca3)
+++ sasmodels/models/lamellar.py	(revision a503bfddd742ec35fe2b801f1d75a0a5f11eccfa)
@@ -101,2 +101,5 @@
         thickness_pd= 0.2, thickness_pd_n=40,
         )
+oldname = 'LamellarModel'
+oldpars = dict(sld='sld_bi', solvent_sld='sld_sol', thickness='bi_thick')
+
Index: sasmodels/models/sphere.py
===================================================================
--- sasmodels/models/sphere.py	(revision d547f16727392afec3aa4475edc287b0348deca3)
+++ sasmodels/models/sphere.py	(revision a503bfddd742ec35fe2b801f1d75a0a5f11eccfa)
@@ -116,2 +116,4 @@
         radius_pd=.2, radius_pd_n=45,
         )
+oldname = "SphereModel"
+oldpars = dict(sld='sldSph', solvent_sld='sldSolv', radius='radius')
Index: sasmodels/models/spherepy.py
===================================================================
--- sasmodels/models/spherepy.py	(revision d547f16727392afec3aa4475edc287b0348deca3)
+++ sasmodels/models/spherepy.py	(revision a503bfddd742ec35fe2b801f1d75a0a5f11eccfa)
@@ -133,2 +133,4 @@
     radius_pd=.2, radius_pd_n=45,
     )
+oldname = "SphereModel"
+oldpars = dict(sld='sldSph', solvent_sld='sldSolv', radius='radius')
Index: sasmodels/models/triaxial_ellipsoid.py
===================================================================
--- sasmodels/models/triaxial_ellipsoid.py	(revision d547f16727392afec3aa4475edc287b0348deca3)
+++ sasmodels/models/triaxial_ellipsoid.py	(revision a503bfddd742ec35fe2b801f1d75a0a5f11eccfa)
@@ -141,2 +141,7 @@
         psi_pd=15, psi_pd_n=1,
         )
+oldname = 'TriaxialEllipsoidModel'
+oldpars = dict(theta='axis_theta', phi='axis_phi', psi='axis_psi',
+               sld='sldEll',  solvent_sld='sldSolv',
+               req_minor='semi_axisA', req_major='semi_axisB',
+               rpolar='semi_axisC')
