Index: sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp	(revision 9ce41c6f9cb652f9c0a81a779f2dd143382ac661)
+++ sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -18,5 +18,5 @@
  *
  * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY binaryHs.h
+ *          DO NOT MODIFY THIS FILE, MODIFY binaryHS.h
  *          AND RE-RUN THE GENERATOR SCRIPT
  *
@@ -33,5 +33,5 @@
 #include <math.h>
 #include <time.h>
-#include "binaryHs.h"
+#include "binaryHS.h"
 }
 
Index: sansmodels/src/sans/models/c_models/DiamCyl.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/DiamCyl.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/DiamCyl.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -141,5 +141,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/DiamEllip.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/DiamEllip.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/DiamEllip.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -139,5 +139,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/Hardsphere.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/Hardsphere.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/Hardsphere.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -122,5 +122,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/HayterMSA.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/HayterMSA.cpp	(revision 8b677ec179ed4330f2cd7aa10775e6423875e7ad)
+++ sansmodels/src/sans/models/c_models/HayterMSA.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -136,5 +136,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/SquareWell.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/SquareWell.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/SquareWell.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -128,5 +128,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/StickyHS.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/StickyHS.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/StickyHS.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -130,5 +130,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/binaryHS.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/binaryHS.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/binaryHS.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -118,5 +118,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/binaryHS_PSF11.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/binaryHS_PSF11.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/binaryHS_PSF11.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -116,5 +116,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/coreshellcylinder.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/coreshellcylinder.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/coreshellcylinder.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -216,5 +216,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/coreshellsphere.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/coreshellsphere.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/coreshellsphere.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -116,5 +116,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/cylinder.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/cylinder.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/cylinder.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -183,5 +183,48 @@
 	return (*this).operator()(qx, qy);
 }
-
+/**
+ * Function to calculate effective radius
+ * @return: effective radius value
+ */
+double CylinderModel :: calculate_ER() {
+	CylinderParameters dp;
+
+	dp.radius     = radius();
+	dp.length     = length();
+	double rad_out = 0.0;
+
+	// Perform the computation, with all weight points
+	double sum = 0.0;
+	double norm = 0.0;
+
+	// Get the dispersion points for the major shell
+	vector<WeightPoint> weights_length;
+	length.get_weights(weights_length);
+
+	// Get the dispersion points for the minor shell
+	vector<WeightPoint> weights_radius ;
+	radius.get_weights(weights_radius);
+
+	// Loop over major shell weight points
+	for(int i=0; i< (int)weights_length.size(); i++) {
+		dp.length = weights_length[i].value;
+		for(int k=0; k< (int)weights_radius.size(); k++) {
+			dp.radius = weights_radius[k].value;
+			//Note: output of "DiamCyl(dp.length,dp.radius)" is DIAMETER.
+			sum +=weights_length[i].weight
+				* weights_radius[k].weight*DiamCyl(dp.length,dp.radius)/2.0;
+			norm += weights_length[i].weight* weights_radius[k].weight;
+		}
+	}
+	if (norm != 0){
+		//return the averaged value
+		rad_out =  sum/norm;}
+	else{
+		//return normal value
+		//Note: output of "DiamCyl(dp.length,dp.radius)" is DIAMETER.
+		rad_out = DiamCyl(dp.length,dp.radius)/2.0;}
+
+	return rad_out;
+}
 // Testing code
 int main(void)
@@ -234,47 +277,3 @@
 	return 0;
 }
-/**
- * Function to calculate effective radius
- * @param pars: parameters of the sphere
- * @return: effective radius value
- */
-double CylinderModel :: calculate_ER() {
-	CylinderParameters dp;
-
-	dp.radius     = radius();
-	dp.length     = length();
-	double rad_out = 0.0;
-
-	// Perform the computation, with all weight points
-	double sum = 0.0;
-	double norm = 0.0;
-
-	// Get the dispersion points for the major shell
-	vector<WeightPoint> weights_length;
-	length.get_weights(weights_length);
-
-	// Get the dispersion points for the minor shell
-	vector<WeightPoint> weights_radius ;
-	radius.get_weights(weights_radius);
-
-	// Loop over major shell weight points
-	for(int i=0; i< (int)weights_length.size(); i++) {
-		dp.length = weights_length[i].value;
-		for(int k=0; k< (int)weights_radius.size(); k++) {
-			dp.radius = weights_radius[k].value;
-			//Note: output of "DiamCyl(dp.length,dp.radius)" is DIAMETER.
-			sum +=weights_length[i].weight
-				* weights_radius[k].weight*DiamCyl(dp.length,dp.radius)/2.0;
-			norm += weights_length[i].weight* weights_radius[k].weight;
-		}
-	}
-	if (norm != 0){
-		//return the averaged value
-		rad_out =  sum/norm;}
-	else{
-		//return normal value
-		//Note: output of "DiamCyl(dp.length,dp.radius)" is DIAMETER.
-		rad_out = DiamCyl(dp.length,dp.radius)/2.0;}
-
-	return rad_out;
-}
+
Index: sansmodels/src/sans/models/c_models/ellipsoid.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/ellipsoid.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/ellipsoid.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -186,5 +186,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/ellipticalcylinder.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/ellipticalcylinder.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/ellipticalcylinder.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -29,4 +29,5 @@
 extern "C" {
 	#include "libCylinder.h"
+	#include "libStructureFactor.h"
 	#include "elliptical_cylinder.h"
 }
@@ -222,8 +223,60 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
 double EllipticalCylinderModel :: calculate_ER() {
-//NOT implemented yet!!!
-}
+	EllipticalCylinderParameters dp;
+	dp.r_minor    = r_minor();
+	dp.r_ratio    = r_ratio();
+	dp.length     = length();
+	double rad_out = 0.0;
+	double pi = 4.0*atan(1.0);
+	double suf_rad = sqrt(dp.r_minor*dp.r_minor*dp.r_ratio);
+
+	// Perform the computation, with all weight points
+	double sum = 0.0;
+	double norm = 0.0;
+
+	// Get the dispersion points for the r_minor
+	vector<WeightPoint> weights_rad;
+	r_minor.get_weights(weights_rad);
+
+	// Get the dispersion points for the r_ratio
+	vector<WeightPoint> weights_rat;
+	r_ratio.get_weights(weights_rat);
+
+	// Get the dispersion points for the length
+	vector<WeightPoint> weights_len;
+	length.get_weights(weights_len);
+
+	// Loop over minor radius weight points
+	for(int i=0; i<weights_rad.size(); i++) {
+		dp.r_minor = weights_rad[i].value;
+
+		// Loop over length weight points
+		for(int j=0; j<weights_len.size(); j++) {
+			dp.length = weights_len[j].value;
+
+			// Loop over r_ration weight points
+			for(int m=0; m<weights_rat.size(); m++) {
+				dp.r_ratio = weights_rat[m].value;
+				//Calculate surface averaged radius
+				suf_rad = sqrt(dp.r_minor * dp.r_minor * dp.r_ratio);
+
+				//Note: output of "DiamCyl(dp.length,dp.radius)" is DIAMETER.
+				sum +=weights_rad[i].weight *weights_len[j].weight
+					* weights_rat[m].weight*DiamCyl(dp.length, suf_rad)/2.0;
+				norm += weights_rad[i].weight *weights_len[j].weight* weights_rat[m].weight;
+			}
+		}
+	}
+	if (norm != 0){
+		//return the averaged value
+		rad_out =  sum/norm;}
+	else{
+		//return normal value
+		//Note: output of "DiamCyl(dp.length,dp.radius)" is DIAMETER.
+		rad_out = DiamCyl(dp.length, suf_rad)/2.0;}
+
+	return rad_out;
+}
Index: sansmodels/src/sans/models/c_models/flexiblecylinder.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/flexiblecylinder.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/flexiblecylinder.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -127,5 +127,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/hollowcylinder.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/hollowcylinder.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/hollowcylinder.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -210,5 +210,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/lamellar.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/lamellar.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/lamellar.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -102,5 +102,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/lamellarFF_HG.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/lamellarFF_HG.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/lamellarFF_HG.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -115,5 +115,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/lamellarPS.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/lamellarPS.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/lamellarPS.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -111,5 +111,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/lamellarPS_HG.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/lamellarPS_HG.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/lamellarPS_HG.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -131,5 +131,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/modelTemplate.txt
===================================================================
--- sansmodels/src/sans/models/c_models/modelTemplate.txt	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/modelTemplate.txt	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -82,5 +82,4 @@
     def calculate_ER(self):
         """ Calculate the effective radius for P(q)*S(q)
-            @param x: input q, or [q,phi]
             @return: the value of the effective radius
         """       
Index: sansmodels/src/sans/models/c_models/multishell.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/multishell.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/multishell.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -122,5 +122,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/parallelepiped.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/parallelepiped.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/parallelepiped.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -30,4 +30,5 @@
 extern "C" {
 	#include "libCylinder.h"
+	#include "libStructureFactor.h"
 	#include "parallelepiped.h"
 }
@@ -36,5 +37,5 @@
 	scale      = Parameter(1.0);
 	short_a     = Parameter(35.0, true);
-	short_a.set_max(1.0);
+	short_a.set_min(1.0);
 	short_b     = Parameter(75.0, true);
 	short_b.set_min(1.0);
@@ -95,5 +96,4 @@
 			for(int k=0; k< (int)weights_long_c.size(); k++) {
 				dp[3] = weights_long_c[k].value;
-
 				sum += weights_short_a[i].weight * weights_short_b[j].weight
 					* weights_long_c[k].weight * Parallelepiped(dp, q);
@@ -104,4 +104,5 @@
 		}
 	}
+
 	return sum/norm + background();
 }
@@ -226,8 +227,62 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
 double ParallelepipedModel :: calculate_ER() {
-//NOT implemented yet!!!
-}
+	ParallelepipedParameters dp;
+	dp.short_a   = short_a();
+	dp.short_b   = short_b();
+	dp.long_c  = long_c();
+	double rad_out = 0.0;
+	double pi = 4.0*atan(1.0);
+	double suf_rad = sqrt(dp.short_a*dp.short_b/pi);
+
+	// Perform the computation, with all weight points
+	double sum = 0.0;
+	double norm = 0.0;
+
+	// Get the dispersion points for the short_edgeA
+	vector<WeightPoint> weights_short_a;
+	short_a.get_weights(weights_short_a);
+
+	// Get the dispersion points for the longer_edgeB
+	vector<WeightPoint> weights_short_b;
+	short_b.get_weights(weights_short_b);
+
+	// Get angular averaging for the longuest_edgeC
+	vector<WeightPoint> weights_long_c;
+	long_c.get_weights(weights_long_c);
+
+	// Loop over radius weight points
+	for(int i=0; i< (int)weights_short_a.size(); i++) {
+		dp.short_a = weights_short_a[i].value;
+
+		// Loop over longer_edgeB weight points
+		for(int j=0; j< (int)weights_short_b.size(); j++) {
+			dp.short_b = weights_short_b[j].value;
+
+			// Average over longuest_edgeC distribution
+			for(int k=0; k< (int)weights_long_c.size(); k++) {
+				dp.long_c = weights_long_c[k].value;
+				//Calculate surface averaged radius
+				//This is rough approximation.
+				suf_rad = sqrt(dp.short_a*dp.short_b/pi);
+
+				//Note: output of "DiamCyl(dp.length,dp.radius)" is DIAMETER.
+				sum +=weights_short_a[i].weight* weights_short_b[j].weight
+					* weights_long_c[k].weight*DiamCyl(dp.long_c, suf_rad)/2.0;
+				norm += weights_short_a[i].weight* weights_short_b[j].weight*weights_long_c[k].weight;
+			}
+		}
+	}
+
+	if (norm != 0){
+		//return the averaged value
+		rad_out =  sum/norm;}
+	else{
+		//return normal value
+		//Note: output of "DiamCyl(length,radius)" is DIAMETER.
+		rad_out = DiamCyl(dp.long_c, suf_rad)/2.0;}
+	return rad_out;
+
+}
Index: sansmodels/src/sans/models/c_models/sphere.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/sphere.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/sphere.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -98,5 +98,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/spheroid.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/spheroid.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/spheroid.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -247,5 +247,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/stackeddisks.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/stackeddisks.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/stackeddisks.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -219,5 +219,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
Index: sansmodels/src/sans/models/c_models/triaxialellipsoid.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/triaxialellipsoid.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/triaxialellipsoid.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -29,4 +29,5 @@
 extern "C" {
 	#include "libCylinder.h"
+	#include "libStructureFactor.h"
 	#include "triaxial_ellipsoid.h"
 }
@@ -219,8 +220,66 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
 double TriaxialEllipsoidModel :: calculate_ER() {
-//NOT implemented yet!!!
-}
+	TriaxialEllipsoidParameters dp;
+
+	dp.semi_axisA   = semi_axisA();
+	dp.semi_axisB     = semi_axisB();
+	//polar axis C
+	dp.semi_axisC     = semi_axisC();
+
+	double rad_out = 0.0;
+	//Surface average radius at the equat. cross section.
+	double suf_rad = sqrt(dp.semi_axisA * dp.semi_axisB);
+
+	// Perform the computation, with all weight points
+	double sum = 0.0;
+	double norm = 0.0;
+
+	// Get the dispersion points for the semi_axis A
+	vector<WeightPoint> weights_semi_axisA;
+	semi_axisA.get_weights(weights_semi_axisA);
+
+	// Get the dispersion points for the semi_axis B
+	vector<WeightPoint> weights_semi_axisB;
+	semi_axisB.get_weights(weights_semi_axisB);
+
+	// Get the dispersion points for the semi_axis C
+	vector<WeightPoint> weights_semi_axisC;
+	semi_axisC.get_weights(weights_semi_axisC);
+
+	// Loop over semi axis A weight points
+	for(int i=0; i< (int)weights_semi_axisA.size(); i++) {
+		dp.semi_axisA = weights_semi_axisA[i].value;
+
+		// Loop over semi axis B weight points
+		for(int j=0; j< (int)weights_semi_axisB.size(); j++) {
+			dp.semi_axisB = weights_semi_axisB[j].value;
+
+			// Loop over semi axis C weight points
+			for(int k=0; k < (int)weights_semi_axisC.size(); k++) {
+				dp.semi_axisC = weights_semi_axisC[k].value;
+
+				//Calculate surface averaged radius
+				suf_rad = sqrt(dp.semi_axisA * dp.semi_axisB);
+
+				//Sum
+				sum += weights_semi_axisA[i].weight
+					* weights_semi_axisB[j].weight
+					* weights_semi_axisC[k].weight * DiamEllip(dp.semi_axisC, suf_rad)/2.0;
+				//Norm
+				norm += weights_semi_axisA[i].weight* weights_semi_axisB[j].weight
+					* weights_semi_axisC[k].weight;
+			}
+		}
+	}
+	if (norm != 0){
+		//return the averaged value
+		rad_out =  sum/norm;}
+	else{
+		//return normal value
+		rad_out = DiamEllip(dp.semi_axisC, suf_rad)/2.0;}
+
+	return rad_out;
+}
Index: sansmodels/src/sans/models/c_models/vesicle.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/vesicle.cpp	(revision 5eb91544a3ee42b368ccec3ebcf8e95f75b020a2)
+++ sansmodels/src/sans/models/c_models/vesicle.cpp	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
@@ -108,5 +108,4 @@
 /**
  * Function to calculate effective radius
- * @param pars: parameters of the sphere
  * @return: effective radius value
  */
