Index: sansmodels/include/GelFit.h
===================================================================
--- sansmodels/include/GelFit.h	(revision 0da4eba9ae2364228607b8b104a26ea93d6e3f51)
+++ sansmodels/include/GelFit.h	(revision 0da4eba9ae2364228607b8b104a26ea93d6e3f51)
@@ -0,0 +1,53 @@
+#if !defined(GelFit_h)
+#define GelFit_h
+#include "parameters.hh"
+
+/**
+ * Structure definition for GelFitModel (factor) parameters
+ */
+//[PYTHONCLASS] = GelFitModel
+//[DESCRIPTION] =<text>Structure factor for interacting particles:                   .
+//  Shibayama-Geissler Two-Length Scale Fit for Gels
+//  (GelFit)
+//
+//  Sibayama; Tanaka; Han J Chem Phys(1992), 97(9), 6829-6841
+//  Mallam; Horkay; Hecht; Rennie; Geissler, Macromol(1991), 24, 543
+//	 </text>
+
+class GelFitModel{
+public:
+
+  // Model parameters
+
+  /// Something lScale
+  //  [DEFAULT]=lScale= 3.5
+  Parameter lScale;
+
+  //  [DEFAULT]=gScale= 1.7
+  Parameter gScale;
+
+  //  [DEFAULT]=zeta= 16
+  Parameter zeta;
+  
+  //  [DEFAULT]=radius= 104
+  Parameter radius;
+
+  //  [DEFAULT]=scale= 2
+  Parameter scale;
+
+  //  [DEFAULT]=background= 0.01
+  Parameter background;
+
+
+  // Constructor
+  GelFitModel();
+
+  // 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/GelFit.cpp
===================================================================
--- sansmodels/src/c_models/GelFit.cpp	(revision 0da4eba9ae2364228607b8b104a26ea93d6e3f51)
+++ sansmodels/src/c_models/GelFit.cpp	(revision 0da4eba9ae2364228607b8b104a26ea93d6e3f51)
@@ -0,0 +1,118 @@
+
+/*
+	This software was developed by the University of Tennessee as part of the
+	Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
+	project funded by the US National Science Foundation.
+
+	If you use DANSE applications to do scientific research that leads to
+	publication, we ask that you acknowledge the use of the software with the
+	following sentence:
+
+	"This work benefited from DANSE software developed under NSF award DMR-0520547."
+
+	copyright 2008, University of Tennessee
+    
+    SHIBAYAMA-GEISSLER TWO-LENGTH SCALE SCATTERING FUNCTION FOR GELS
+
+    See Sibayama, Tanaka & Han, J Chem Phys, (1992), 97(9), 6829-6841
+    or  Mallam, Horkay, Hecht, Rennie & Geissler, Macromol, (1991), 24, 543
+
+    Ported to C++ from Fortran by Robert Whitley (2012)
+*/
+
+#include <math.h>
+#include "parameters.hh"
+#include <stdio.h>
+using namespace std;
+#include "GelFit.h"
+
+typedef struct {
+  double lScale;
+  double gScale;
+  double zeta;
+  double radius;
+  double scale;
+  double background;
+}
+
+GelFitModel :: GelFitModel()
+{
+    lScale = Parameter(3.5);
+    gScale = Parameter(1.7);
+    zeta = Parameter(16.0);
+    radius = Parameter(104.0,true);
+    radius.set_min(2.0);
+    scale = Parameter(2.0,true);
+    background = Parameter(0.01);
+}
+
+double GelFitModel :: operator()(double q) 
+{
+    double dp[3];
+    dp[0] = zeta();
+    dp[1] = radius();
+    dp[2] = scale();
+    
+    if (dp[2] <= 0)
+    {
+        //cout << "\n\nThe Scaling Exponent must be > 0";
+        //cout << "\nWill set to 2.0";
+        dp[2] = 2.0;
+    }
+
+    // Lorentzian Term
+    ////////////////////////double a(x[i]*x[i]*zeta*zeta);
+    double a(q*q*dp[0]*dp[0]);
+    double b(1.0 + (((dp[2] + 1.0)/3.0)*a) );
+    double c(pow(b, (dp[2]/2.0) ) );
+    
+    // Exponential Term
+    ////////////////////////double d(x[i]*x[i]*rg*rg);
+    double d(q*q*dp[1]*dp[1]);
+    double e(-1.0*(d/3.0) );
+    double f(exp(e));
+        
+        // Scattering Law
+        ///////////////////////////////ycal[j] = ((lScale/c) + (gScale*f) + bkgd);
+    return ((lScale()/c) + (gScale()*f) + background());
+}
+
+
+/**
+ * Function to evaluate 2D scattering function
+ * @param q_x: value of Q along x
+ * @param q_y: value of Q along y
+ * @return: function value
+ */
+double GelFitModel :: operator()(double qx, double qy) 
+{
+  double q = sqrt(qx*qx + qy*qy);
+  return (*this).operator()(q);
+}
+
+/**
+ * Function to evaluate 2D scattering function
+ * @param pars: parameters of the cylinder
+ * @param q: q-value
+ * @param phi: angle phi
+ * @return: function value
+ */
+double GelFitModel :: evaluate_rphi(double q, double phi) 
+{
+  double qx = q*cos(phi);
+  double qy = q*sin(phi);
+  return (*this).operator()(qx, qy);
+}
+/**
+ * Function to calculate effective radius
+ * @return: effective radius value
+ */
+double GelFitModel :: calculate_ER() 
+{
+  //NOT implemented yet!!!
+  return 0.0;
+}
+double GelFitModel :: calculate_VR() 
+{
+  return 1.0;
+}
