Index: fittingview/src/sans/perspectives/fitting/models.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/models.py	(revision 3764dbd7784ea7fd06bf5e52a0f00db712689917)
+++ fittingview/src/sans/perspectives/fitting/models.py	(revision a269378f07bb0f1d432ab514eb29b5d1d02c814a)
@@ -559,5 +559,5 @@
         self.shape_indep_list.append(TeubnerStreyModel)
         self.model_name_list.append(TeubnerStreyModel.__name__)
-        
+
         from sans.models.TwoLorentzianModel import TwoLorentzianModel
         self.shape_indep_list.append(TwoLorentzianModel)
Index: sansmodels/include/teubner_strey.h
===================================================================
--- sansmodels/include/teubner_strey.h	(revision a269378f07bb0f1d432ab514eb29b5d1d02c814a)
+++ sansmodels/include/teubner_strey.h	(revision a269378f07bb0f1d432ab514eb29b5d1d02c814a)
@@ -0,0 +1,64 @@
+#ifndef TEUBNER_STREY_H
+#define TEUBNER_STREY_H
+
+#include "parameters.hh"
+
+/**
+	This software was developed by Institut Laue-Langevin as part of
+	Distributed Data Analysis of Neutron Scattering Experiments (DANSE).
+
+	Copyright 2012 Institut Laue-Langevin
+
+**/
+
+/**
+   Scattering model class for the Teubner-Strey model given by 
+    Provide F(x) = 1/( scale + c1*(x)^(2)+  c2*(x)^(4)) + bkd
+**/
+
+
+// definition for model parameters
+
+// [PYTHONCLASS] = TeubnerStreyModel
+// [DISP_PARAMS] = scale, c1, c2, background
+// [DESCRIPTION] = <text>F(x) = 1/( scale + c1*(x)^(2)+  c2*(x)^(4)) + bkd </text>
+//       </text>
+// [FIXED] = 
+// [ORIENTATION_PARAMS] =
+
+class TeubnerStreyModel {
+
+public:
+  // Model parameters
+
+  /// Scale factor
+  // [DEFAULT]=scale=0.1
+  Parameter scale;
+
+  /// c1
+  // [DEFAULT]=c1=-30.0
+  Parameter c1;
+
+  /// c2
+  // [DEFAULT]=c2=5000.0
+  Parameter c2;
+
+  /// Background
+  // [DEFAULT]=background=0.0
+  Parameter background;
+
+  TeubnerStreyModel();
+
+  // Operators to get I(Q)
+  double operator()(double q);
+  double operator()(double qx, double qy);
+  double calculate_ER();
+  double calculate_VR();
+  double evaluate_rphi(double q, double phi);
+};
+
+
+#endif
+
+
+
Index: sansmodels/src/c_models/teubner_strey.cpp
===================================================================
--- sansmodels/src/c_models/teubner_strey.cpp	(revision a269378f07bb0f1d432ab514eb29b5d1d02c814a)
+++ sansmodels/src/c_models/teubner_strey.cpp	(revision a269378f07bb0f1d432ab514eb29b5d1d02c814a)
@@ -0,0 +1,76 @@
+/**
+	This software was developed by Institut Laue-Langevin as part of
+	Distributed Data Analysis of Neutron Scattering Experiments (DANSE).
+
+	Copyright 2012 Institut Laue-Langevin
+
+**/
+
+#include <math.h>
+#include "parameters.hh"
+#include "teubner_strey.h"
+
+TeubnerStreyModel::TeubnerStreyModel() {
+  scale = Parameter(0.1);
+  c1 = Parameter(-30.0);
+  c2 = Parameter(5000.0);
+  background = Parameter(0.0);
+}
+
+double TeubnerStreyModel::operator()(double q) { 
+  double d_scale = scale();
+  double d_c1 = c1();
+  double d_c2 = c2();
+  double d_background = background();
+
+  double term1 = d_c1 * pow(q,2);
+  double term2 = d_c2 * pow(q,4);
+
+  return 1/(d_scale + term1 + term2) + d_background;
+
+}
+
+
+double TeubnerStreyModel::operator()(double qx,double qy) {
+  double q = sqrt(qx*qx + qy*qy);
+  return this->operator()(q);
+}
+
+double TeubnerStreyModel::calculate_ER() {
+  return 0.0;
+}
+
+double TeubnerStreyModel::calculate_VR() {
+  return 0.0;
+}
+
+double TeubnerStreyModel::evaluate_rphi(double q,double phi) {
+  return 1.0;
+}
+
+
+/***
+    Notes
+
+    This file was ported from python to C++ at ILL Grenoble in
+    July 2012. In the original python file were two functions,
+    teubnerStreyLengths and teubnerStreyDistance that did not appear
+    to be used anywhere in the code. The source for them is below:
+
+    def teubnerStreyLengths(self):
+        """
+            Calculate the correlation length (L) 
+            @return L: the correlation distance 
+        """
+        return  math.pow( 1/2 * math.pow( (self.params['scale']/self.params['c2']), 1/2 )\
+                            +(self.params['c1']/(4*self.params['c2'])),-1/2 )
+    def teubnerStreyDistance(self):
+        """
+            Calculate the quasi-periodic repeat distance (D/(2*pi)) 
+            @return D: quasi-periodic repeat distance
+        """
+        return  math.pow( 1/2 * math.pow( (self.params['scale']/self.params['c2']), 1/2 )\
+                            -(self.params['c1']/(4*self.params['c2'])),-1/2 )
+
+
+***/
Index: nsmodels/src/sans/models/TeubnerStreyModel.py
===================================================================
--- sansmodels/src/sans/models/TeubnerStreyModel.py	(revision 1ed3834d2e968f8ff632d0b368f55ac28174df7a)
+++ 	(revision )
@@ -1,104 +1,0 @@
-#!/usr/bin/env python
-""" 
-    Provide F(x) = 1/( scale + c1*(x)^(2)+  c2*(x)^(4)) + bkd
-    Teubner-Strey function as a BaseComponent model
-    
-"""
-
-from sans.models.BaseComponent import BaseComponent
-import math
-
-class TeubnerStreyModel(BaseComponent):
-   
-    """
-        Class that evaluates  the TeubnerStrey model.
-        
-        F(x) = 1/( scale + c1*(x)^(2)+  c2*(x)^(4)) + bkd
-        
-        The model has Four parameters: 
-            scale  =  scale factor
-            c1     =  constant
-            c2     =  constant
-            bkd    =  incoherent background
-    """
-        
-    def __init__(self):
-        """ Initialization """
-        
-        # Initialize BaseComponent first, then sphere
-        BaseComponent.__init__(self)
-        
-        ## Name of the model
-        self.name = "Teubner Strey"
-        self.description="""The TeubnerStrey model.
-        F(x) = 1/( scale + c1*(x)^(2)+  c2*(x)^(4)) + bkd
-        
-        The model has Four parameters: 
-        scale  =  scale factor
-        c1     =  constant
-        c2     =  constant
-        bkd    =  incoherent background"""
-        ## Define parameters
-        self.params = {}
-        self.params['c1']     = -30.0
-        self.params['c2']     = 5000.0
-        self.params['scale']  = 0.1
-        self.params['background']    = 0.0
-
-        ## Parameter details [units, min, max]
-        self.details = {}
-        self.details['c1']    = ['', None, None ]
-        self.details['c2']    = ['', None, None ]
-        self.details['scale'] = ['', None, None]
-        self.details['background']   = ['[1/cm]', None, None]
-        #list of parameter that cannot be fitted
-        self.fixed= []
-               
-    def _TeubnerStrey(self, x):
-        """
-            Evaluate  F(x) = 1/( scale + c1*(x)^(2)+  c2*(x)^(4)) + bkd
-           
-        """
-        return 1/( self.params['scale']+ self.params['c1'] * math.pow(x ,2)\
-                + self.params['c2'] * math.pow(x ,4) ) + self.params['background']
-       
-   
-    def run(self, x = 0.0):
-        """ Evaluate the model
-            @param x: input q-value (float or [float, float] as [r, theta])
-            @return: (PowerLaw value)
-        """
-        if x.__class__.__name__ == 'list':
-            return self._TeubnerStrey(x[0])
-        elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
-        else:
-            return self._TeubnerStrey(x)
-   
-    def runXY(self, x = 0.0):
-        """ Evaluate the model
-            @param x: input q-value (float or [float, float] as [qx, qy])
-            @return: PowerLaw value
-        """
-        if x.__class__.__name__ == 'list':
-            q = math.sqrt(x[0]**2 + x[1]**2)
-            return self._TeubnerStrey(q)
-        elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
-        else:
-            return self._TeubnerStrey(x)
-        
-    def teubnerStreyLengths(self):
-        """
-            Calculate the correlation length (L) 
-            @return L: the correlation distance 
-        """
-        return  math.pow( 1/2 * math.pow( (self.params['scale']/self.params['c2']), 1/2 )\
-                            +(self.params['c1']/(4*self.params['c2'])),-1/2 )
-    def teubnerStreyDistance(self):
-        """
-            Calculate the quasi-periodic repeat distance (D/(2*pi)) 
-            @return D: quasi-periodic repeat distance
-        """
-        return  math.pow( 1/2 * math.pow( (self.params['scale']/self.params['c2']), 1/2 )\
-                            -(self.params['c1']/(4*self.params['c2'])),-1/2 )
