Index: DataLoader/data_info.py
===================================================================
--- DataLoader/data_info.py	(revision 9198b8310ebd4e2c3eabca485fa5c08200add7cf)
+++ DataLoader/data_info.py	(revision b39c817abd04851d62b16436a6591cd1b1d7fa0c)
@@ -18,4 +18,6 @@
 copyright 2008, University of Tennessee
 """
+
+#TODO: Keep track of data manipulation in the 'process' data structure.
 
 from sans.guitools.plottables import Data1D as plottable_1D
@@ -71,8 +73,8 @@
     ## Sample to detector distance [float] [mm]
     distance = None
-    distance_unit = 'm'
+    distance_unit = 'mm'
     ## Offset of this detector position in X, Y, (and Z if necessary) [Vector] [mm] 
     offset = Vector()
-    offset_unit = 'mm'
+    offset_unit = 'm'
     ## Orientation (rotation) of this detector in roll, pitch, and yaw [Vector] [degrees]
     orientation = Vector()
@@ -280,4 +282,97 @@
     errors = []
             
+    # Private method to perform operation. Not implemented for DataInfo,
+    # but should be implemented for each data class inherited from DataInfo
+    # that holds actual data (ex.: Data1D)
+    def _perform_operation(self, other, operation): return NotImplemented
+
+    def __add__(self, other):
+        """
+            Add two data sets
+            
+            @param other: data set to add to the current one
+            @return: new data set
+            @raise ValueError: raised when two data sets are incompatible
+        """
+        def operation(a, b): return a+b
+        return self._perform_operation(other, operation)
+        
+    def __radd__(self, other):
+        """
+            Add two data sets
+            
+            @param other: data set to add to the current one
+            @return: new data set
+            @raise ValueError: raised when two data sets are incompatible
+        """
+        def operation(a, b): return b+a
+        return self._perform_operation(other, operation)
+        
+    def __sub__(self, other):
+        """
+            Subtract two data sets
+            
+            @param other: data set to subtract from the current one
+            @return: new data set
+            @raise ValueError: raised when two data sets are incompatible
+        """
+        def operation(a, b): return a-b
+        return self._perform_operation(other, operation)
+        
+    def __rsub__(self, other):
+        """
+            Subtract two data sets
+            
+            @param other: data set to subtract from the current one
+            @return: new data set
+            @raise ValueError: raised when two data sets are incompatible
+        """
+        def operation(a, b): return b-a
+        return self._perform_operation(other, operation)
+        
+    def __mul__(self, other):
+        """
+            Multiply two data sets
+            
+            @param other: data set to subtract from the current one
+            @return: new data set
+            @raise ValueError: raised when two data sets are incompatible
+        """
+        def operation(a, b): return a*b
+        return self._perform_operation(other, operation)
+        
+    def __rmul__(self, other):
+        """
+            Multiply two data sets
+            
+            @param other: data set to subtract from the current one
+            @return: new data set
+            @raise ValueError: raised when two data sets are incompatible
+        """
+        def operation(a, b): return b*a
+        return self._perform_operation(other, operation)
+        
+    def __div__(self, other):
+        """
+            Divided a data set by another
+            
+            @param other: data set that the current one is divided by
+            @return: new data set
+            @raise ValueError: raised when two data sets are incompatible
+        """
+        def operation(a, b): return a/b
+        return self._perform_operation(other, operation)
+        
+    def __rdiv__(self, other):
+        """
+            Divided a data set by another
+            
+            @param other: data set that the current one is divided by
+            @return: new data set
+            @raise ValueError: raised when two data sets are incompatible
+        """
+        def operation(a, b): return b/a
+        return self._perform_operation(other, operation)            
+            
 class Data1D(plottable_1D, DataInfo):
     """
@@ -309,5 +404,4 @@
             _str += "%s\n" % str(item)
         
-        
         _str += "Data:\n"
         _str += "   Type:         %s\n" % self.__class__.__name__
@@ -319,4 +413,11 @@
 
     def clone_without_data(self, length=0):
+        """
+            Clone the current object, without copying the data (which
+            will be filled out by a subsequent operation).
+            The data arrays will be initialized to zero.
+            
+            @param length: length of the data array to be initialized
+        """
         from copy import deepcopy
         
@@ -401,93 +502,2 @@
         return result
         
-
-    def __add__(self, other):
-        """
-            Add two data sets
-            
-            @param other: data set to add to the current one
-            @return: new data set
-            @raise ValueError: raised when two data sets are incompatible
-        """
-        def operation(a, b): return a+b
-        return self._perform_operation(other, operation)
-        
-    def __radd__(self, other):
-        """
-            Add two data sets
-            
-            @param other: data set to add to the current one
-            @return: new data set
-            @raise ValueError: raised when two data sets are incompatible
-        """
-        def operation(a, b): return b+a
-        return self._perform_operation(other, operation)
-        
-    def __sub__(self, other):
-        """
-            Subtract two data sets
-            
-            @param other: data set to subtract from the current one
-            @return: new data set
-            @raise ValueError: raised when two data sets are incompatible
-        """
-        def operation(a, b): return a-b
-        return self._perform_operation(other, operation)
-        
-    def __rsub__(self, other):
-        """
-            Subtract two data sets
-            
-            @param other: data set to subtract from the current one
-            @return: new data set
-            @raise ValueError: raised when two data sets are incompatible
-        """
-        def operation(a, b): return b-a
-        return self._perform_operation(other, operation)
-        
-    def __mul__(self, other):
-        """
-            Multiply two data sets
-            
-            @param other: data set to subtract from the current one
-            @return: new data set
-            @raise ValueError: raised when two data sets are incompatible
-        """
-        def operation(a, b): return a*b
-        return self._perform_operation(other, operation)
-        
-    def __rmul__(self, other):
-        """
-            Multiply two data sets
-            
-            @param other: data set to subtract from the current one
-            @return: new data set
-            @raise ValueError: raised when two data sets are incompatible
-        """
-        def operation(a, b): return b*a
-        return self._perform_operation(other, operation)
-        
-    def __div__(self, other):
-        """
-            Divided a data set by another
-            
-            @param other: data set that the current one is divided by
-            @return: new data set
-            @raise ValueError: raised when two data sets are incompatible
-        """
-        def operation(a, b): return a/b
-        return self._perform_operation(other, operation)
-        
-    def __rdiv__(self, other):
-        """
-            Divided a data set by another
-            
-            @param other: data set that the current one is divided by
-            @return: new data set
-            @raise ValueError: raised when two data sets are incompatible
-        """
-        def operation(a, b): return b/a
-        return self._perform_operation(other, operation)
-        
-
-
Index: DataLoader/readers/cansas_reader.py
===================================================================
--- DataLoader/readers/cansas_reader.py	(revision 8780e9a7e98f59c06b1819f1e068b7e84f496efc)
+++ DataLoader/readers/cansas_reader.py	(revision b39c817abd04851d62b16436a6591cd1b1d7fa0c)
@@ -22,4 +22,10 @@
 from DataLoader.data_info import Data1D, Collimation, Detector, Process
 from xml import xpath
+
+has_converter = True
+try:
+    from data_util.nxsunit import Converter
+except:
+    has_converter = False
 
 def get_node_text(node):
@@ -87,5 +93,5 @@
     if content is not None:
         try:
-            value = float(content)        
+            value = float(content)   
         except:
             # Could not pass, skip and return None
@@ -113,6 +119,4 @@
     value, attr = get_float(location, node)
     if value is not None:
-        exec "storage.%s = value" % variable
-        
         # If the entry has units, check to see that they are
         # compatible with what we currently have in the data object
@@ -121,6 +125,19 @@
             exec "local_unit = storage.%s_unit.lower()" % toks[0]
             if attr['unit'].lower()!=local_unit:
-                raise ValueError, "CanSAS reader: unrecognized %s unit [%s]; expecting [%s]" \
-                    % (variable, attr['unit'], local_unit)
+                if has_converter==True:
+                    try:
+                        conv = Converter(attr['unit'])
+                        exec "storage.%s = %g" % (variable, conv(value, units=local_unit))
+                    except:
+                        raise ValueError, "CanSAS reader: could not convert %s unit [%s]; expecting [%s]\n  %s" \
+                        % (variable, attr['unit'], local_unit, sys.exc_value)
+                else:
+                    raise ValueError, "CanSAS reader: unrecognized %s unit [%s]; expecting [%s]" \
+                        % (variable, attr['unit'], local_unit)
+            else:
+                exec "storage.%s = value" % variable
+        else:
+            exec "storage.%s = value" % variable
+            
 
 def _store_content(location, node, variable, storage):
