Index: sasmodels/compare.py
===================================================================
--- sasmodels/compare.py	(revision f72d70a9055bf8a3cc610ed4abd84799154108ca)
+++ sasmodels/compare.py	(revision f72d70a9055bf8a3cc610ed4abd84799154108ca)
@@ -30,4 +30,5 @@
 
 import sys
+import os
 import math
 import datetime
@@ -40,5 +41,5 @@
 from . import kerneldll
 from . import exception
-from .data import plot_theory, empty_data1D, empty_data2D
+from .data import plot_theory, empty_data1D, empty_data2D, load_data
 from .direct_model import DirectModel
 from .convert import revert_name, revert_pars, constrain_new_to_old
@@ -85,4 +86,5 @@
     -html shows the model docs instead of running the model
     -title="note" adds note to the plot title, after the model name
+    -data="path" uses q, dq from the data file
 
 Any two calculation engines can be selected for comparison:
@@ -747,4 +749,5 @@
     comp = opts['engines'][1] if have_comp else None
     data = opts['data']
+    use_data = have_base ^ have_comp
 
     # Plot if requested
@@ -763,5 +766,5 @@
     if have_base:
         if have_comp: plt.subplot(131)
-        plot_theory(data, base_value, view=view, use_data=False, limits=limits)
+        plot_theory(data, base_value, view=view, use_data=use_data, limits=limits)
         plt.title("%s t=%.2f ms"%(base.engine, base_time))
         #cbar_title = "log I"
@@ -769,6 +772,6 @@
         if have_base: plt.subplot(132)
         if not opts['is2d'] and have_base:
-            plot_theory(data, base_value, view=view, use_data=False, limits=limits)
-        plot_theory(data, comp_value, view=view, use_data=False, limits=limits)
+            plot_theory(data, base_value, view=view, use_data=use_data, limits=limits)
+        plot_theory(data, comp_value, view=view, use_data=use_data, limits=limits)
         plt.title("%s t=%.2f ms"%(comp.engine, comp_time))
         #cbar_title = "log I"
@@ -784,5 +787,5 @@
             err[err>cutoff] = cutoff
         #err,errstr = base/comp,"ratio"
-        plot_theory(data, None, resid=err, view=errview, use_data=False)
+        plot_theory(data, None, resid=err, view=errview, use_data=use_data)
         if view == 'linear':
             plt.xscale('linear')
@@ -834,5 +837,5 @@
 VALUE_OPTIONS = [
     # Note: random is both a name option and a value option
-    'cutoff', 'random', 'nq', 'res', 'accuracy', 'title',
+    'cutoff', 'random', 'nq', 'res', 'accuracy', 'title', 'data',
     ]
 
@@ -951,4 +954,5 @@
         'html'      : False,
         'title'     : None,
+        'data'      : None,
     }
     engines = []
@@ -971,5 +975,6 @@
         elif arg.startswith('-cutoff='):   opts['cutoff'] = float(arg[8:])
         elif arg.startswith('-random='):   opts['seed'] = int(arg[8:])
-        elif arg.startswith('-title'):     opts['title'] = arg[7:]
+        elif arg.startswith('-title='):    opts['title'] = arg[7:]
+        elif arg.startswith('-data='):     opts['data'] = arg[6:]
         elif arg == '-random':  opts['seed'] = np.random.randint(1000000)
         elif arg == '-preset':  opts['seed'] = -1
@@ -1112,5 +1117,8 @@
 
     # Create the computational engines
-    data, _ = make_data(opts)
+    if opts['data'] is not None:
+        data = load_data(os.path.expanduser(opts['data']))
+    else:
+        data, _ = make_data(opts)
     if n1:
         base = make_engine(model_info, data, engines[0], opts['cutoff'])
Index: sasmodels/data.py
===================================================================
--- sasmodels/data.py	(revision 40a87fa5096610e24c3ead10299f609e99f093f2)
+++ sasmodels/data.py	(revision a769b5498ef3f5b7e8381de3d1a999a46950a84b)
@@ -54,4 +54,8 @@
     if data is None:
         raise IOError("Data %r could not be loaded" % filename)
+    if hasattr(data, 'x'):
+        data.qmin, data.qmax = data.x.min(), data.x.max()
+        data.mask = (np.isnan(data.y) if data.y is not None
+                     else np.zeros_like(data.x, dtype='bool'))
     return data
 
@@ -348,5 +352,5 @@
     # data, but they already handle the masking and graph markup already, so
     # do not repeat.
-    if hasattr(data, 'lam'):
+    if hasattr(data, 'isSesans') and data.isSesans:
         _plot_result_sesans(data, None, None, use_data=True, limits=limits)
     elif hasattr(data, 'qx_data'):
@@ -376,5 +380,5 @@
     *Iq_calc* is the raw theory values without resolution smearing
     """
-    if hasattr(data, 'lam'):
+    if hasattr(data, 'isSesans') and data.isSesans:
         _plot_result_sesans(data, theory, resid, use_data=True, limits=limits)
     elif hasattr(data, 'qx_data'):
Index: sasmodels/direct_model.py
===================================================================
--- sasmodels/direct_model.py	(revision b397165ea71fa5026c955689596b9f7baf7bd132)
+++ sasmodels/direct_model.py	(revision a769b5498ef3f5b7e8381de3d1a999a46950a84b)
@@ -192,5 +192,5 @@
 
         # interpret data
-        if hasattr(data, 'lam'):
+        if hasattr(data, 'isSesans') and data.isSesans:
             self.data_type = 'sesans'
         elif hasattr(data, 'qx_data'):
