Index: park_integration/AbstractFitEngine.py
===================================================================
--- park_integration/AbstractFitEngine.py	(revision 4c7186549ac9c6dfa4288d3b684f247114f43f4c)
+++ park_integration/AbstractFitEngine.py	(revision 4c7186549ac9c6dfa4288d3b684f247114f43f4c)
@@ -0,0 +1,59 @@
+
+class FitEngine:
+    
+    def _concatenateData(self, listdata=[]):
+        """  
+            _concatenateData method concatenates each fields of all data contains ins listdata.
+            @param listdata: list of data 
+            
+            @return xtemp, ytemp,dytemp:  x,y,dy respectively of data all combined
+                if xi,yi,dyi of two or more data are the same the second appearance of xi,yi,
+                dyi is ignored in the concatenation.
+                
+            @raise: if listdata is empty  will return None
+            @raise: if data in listdata don't contain dy field ,will create an error
+            during fitting
+        """
+        if listdata==[]:
+            raise ValueError, " data list missing"
+        else:
+            xtemp=[]
+            ytemp=[]
+            dytemp=[]
+               
+            for data in listdata:
+                for i in range(len(data.x)):
+                    xtemp.append(data.x[i])
+                    ytemp.append(data.y[i])
+                    if data.dy is not None and len(data.dy)==len(data.y):   
+                        dytemp.append(data.dy[i])
+                    else:
+                        raise RuntimeError, "Fit._concatenateData: y-errors missinge"
+            return xtemp, ytemp,dytemp
+    
+      
+class Parameter:
+    """
+        Class to handle model parameters
+    """
+    def __init__(self, model, name, value=None):
+            self.model = model
+            self.name = name
+            if not value==None:
+                self.model.setParam(self.name, value)
+           
+    def set(self, value):
+        """
+            Set the value of the parameter
+        """
+        self.model.setParam(self.name, value)
+
+    def __call__(self):
+        """ 
+            Return the current value of the parameter
+        """
+        return self.model.getParam(self.name)
+    
+
+
+    
Index: park_integration/Fitting.py
===================================================================
--- park_integration/Fitting.py	(revision 4dd63eb2815955372311dc0d6bab3c6529bd7f57)
+++ park_integration/Fitting.py	(revision 4c7186549ac9c6dfa4288d3b684f247114f43f4c)
@@ -66,3 +66,4 @@
         """remove   fitarrange in Uid"""
         self._engine.remove_Fit_Problem(Uid)
- 
+
+
Index: park_integration/ParkFitting.py
===================================================================
--- park_integration/ParkFitting.py	(revision 4dd63eb2815955372311dc0d6bab3c6529bd7f57)
+++ park_integration/ParkFitting.py	(revision 4c7186549ac9c6dfa4288d3b684f247114f43f4c)
@@ -14,4 +14,5 @@
 from sans.guitools.plottables import Data1D
 from Loader import Load
+from AbstractFitEngine import FitEngine, Parameter
 
 class SansParameter(park.Parameter):
@@ -152,5 +153,5 @@
             
             
-class ParkFit:
+class ParkFit(FitEngine):
     """ 
         ParkFit performs the Fit.This class can be used as follow:
@@ -308,64 +309,5 @@
             del self.fitArrangeList[Uid]
             
-    def _concatenateData(self, listdata=[]):
-        """  
-            _concatenateData method concatenates each fields of all data contains ins listdata.
-            @param listdata: list of data 
-            
-            @return xtemp, ytemp,dytemp:  x,y,dy respectively of data all combined
-                if xi,yi,dyi of two or more data are the same the second appearance of xi,yi,
-                dyi is ignored in the concatenation.
-                
-            @raise: if listdata is empty  will return None
-            @raise: if data in listdata don't contain dy field ,will create an error
-            during fitting
-        """
-        if listdata==[]:
-            raise ValueError, " data list missing"
-        else:
-            xtemp=[]
-            ytemp=[]
-            dytemp=[]
-            dx=None 
-            for data in listdata:
-                for i in range(len(data.x)):
-                    if not data.x[i] in xtemp:
-                        xtemp.append(data.x[i])
-                       
-                    if not data.y[i] in ytemp:
-                        ytemp.append(data.y[i])
-                    if data.dy and len(data.dy)>0:   
-                        if not data.dy[i] in dytemp:
-                            dytemp.append(data.dy[i])
-                    else:
-                        raise ValueError,"dy is missing will not be able to fit later on"
-            return xtemp, ytemp,dytemp,dx
- 
-           
-class Parameter:
-    """
-        Class to handle model parameters
-    """
-    def __init__(self, model, name, value=None):
-            self.model = model
-            self.name = name
-            if not value==None:
-                self.model.setParam(self.name, value)
-           
-    def set(self, value):
-        """
-            Set the value of the parameter
-        """
-        self.model.setParam(self.name, value)
-
-    def __call__(self):
-        """ 
-            Return the current value of the parameter
-        """
-        return self.model.getParam(self.name)
-    
-
-
-    
+      
    
     
Index: park_integration/ScipyFitting.py
===================================================================
--- park_integration/ScipyFitting.py	(revision 4dd63eb2815955372311dc0d6bab3c6529bd7f57)
+++ park_integration/ScipyFitting.py	(revision 4c7186549ac9c6dfa4288d3b684f247114f43f4c)
@@ -7,5 +7,5 @@
 from Loader import Load
 from scipy import optimize
-
+from AbstractFitEngine import FitEngine, Parameter
 
 class FitArrange:
@@ -56,5 +56,5 @@
         self.dList=[]
             
-class ScipyFit:
+class ScipyFit(FitEngine):
     """ 
         ScipyFit performs the Fit.This class can be used as follow:
@@ -123,38 +123,4 @@
         return chisqr, out, cov
     
-    def _concatenateData(self, listdata=[]):
-        """  
-            _concatenateData method concatenates each fields of all data contains ins listdata.
-            @param listdata: list of data 
-            
-            @return xtemp, ytemp,dytemp:  x,y,dy respectively of data all combined
-                if xi,yi,dyi of two or more data are the same the second appearance of xi,yi,
-                dyi is ignored in the concatenation.
-                
-            @raise: if listdata is empty  will return None
-            @raise: if data in listdata don't contain dy field ,will create an error
-            during fitting
-        """
-        if listdata==[]:
-            raise ValueError, " data list missing"
-        else:
-            xtemp=[]
-            ytemp=[]
-            dytemp=[]
-               
-            for data in listdata:
-                for i in range(len(data.x)):
-                    if not data.x[i] in xtemp:
-                        xtemp.append(data.x[i])
-                       
-                    if not data.y[i] in ytemp:
-                        ytemp.append(data.y[i])
-                    if data.dy and len(data.dy)>0:   
-                        if not data.dy[i] in dytemp:
-                            dytemp.append(data.dy[i])
-                    else:
-                        raise ValueError,"dy is missing will not be able to fit later on"
-            return xtemp, ytemp,dytemp
-        
     def set_model(self,model,name,Uid,pars={}):
         """ 
@@ -222,28 +188,5 @@
         if self.fitArrangeList.has_key(Uid):
             del self.fitArrangeList[Uid]
-                
-
-class Parameter:
-    """
-        Class to handle model parameters
-    """
-    def __init__(self, model, name, value=None):
-            self.model = model
-            self.name = name
-            if not value==None:
-                self.model.setParam(self.name, value)
-           
-    def set(self, value):
-        """
-            Set the value of the parameter
-        """
-        self.model.setParam(self.name, value)
-
-    def __call__(self):
-        """ 
-            Return the current value of the parameter
-        """
-        return self.model.getParam(self.name)
-    
+      
 def fitHelper(model, pars, x, y, err_y ,qmin=None, qmax=None):
     """
