Index: explore/beta/HSS_SQ.m
===================================================================
--- explore/beta/HSS_SQ.m	(revision e262dd68f6ba42ac365c68553db9621443f502ee)
+++ explore/beta/HSS_SQ.m	(revision e262dd68f6ba42ac365c68553db9621443f502ee)
@@ -0,0 +1,13 @@
+function Sq=HSS_SQ(volF,Q)
+%Sq=HSS_SQ(volF,Q), Q is a normalzied scattering wavevector by the diamter of the particle
+
+a1=-(1+2*volF)^2/(1-volF)^4;
+a2=6*volF*(1+0.5*volF)^2/(1-volF)^4;
+a3=volF*a1/2;
+%pi = 3.14159265358979;
+
+cq=4*pi*(a1./Q.^3 .* (sin(Q)-Q.*cos(Q)) + ...
+    a2./Q.^4 .* (2*Q.*sin(Q)- (Q.^2 - 2) .* cos(Q) - 2) + ...
+    a3./Q.^6 .* ((4*Q.^3 - 24 * Q) .* sin(Q) - (Q.^4 -12 * Q.^2 + 24) .* cos(Q) + 24) );
+
+Sq = 1 ./ (1 - cq * volF * 6 / pi);
Index: explore/beta/sasfit_compare.py
===================================================================
--- explore/beta/sasfit_compare.py	(revision 0076d6e49bf28a25df70c57acf73948ec9a498b3)
+++ explore/beta/sasfit_compare.py	(revision e262dd68f6ba42ac365c68553db9621443f502ee)
@@ -222,13 +222,7 @@
     if radius_effective is None:
         radius_effective = radius_eff/total_weight
-    SQ = hardsphere_simple(q, radius_effective, volfraction)
     if norm == 'sasfit':
-        beta = F1**2/F2
-        SQ_EFF = 1 + beta*(SQ - 1)
         IQD = F2
-        IQSD = IQD*SQ
-        IQBD = IQD*SQ_EFF
     elif norm == 'sasview':
-        SQ_EFF = None
         # Note: internally, sasview uses F2/total_volume because:
         #   average_volume = total_volume/total_weight
@@ -237,16 +231,13 @@
         #     = F2/total_volume
         IQD = F2/average_volume*1e-4*volfraction
-        IQSD = IQD*SQ
-        IQBD = None
     elif norm == 'yun':
-        #F1 /= average_volume
-        #F2 /= average_volume**2
         F1 *= 1e-6  # Yun is using sld in 1/A^2, not 1e-6/A^2
         F2 *= 1e-12
-        beta = F1**2/F2
-        SQ_EFF = 1 + beta*(SQ - 1)
         IQD = F2/average_volume*1e8*volfraction
-        IQSD = IQD*SQ
-        IQBD = IQD*SQ_EFF
+    SQ = hardsphere_simple(q, radius_effective, volfraction)
+    beta = F1**2/F2
+    SQ_EFF = 1 + beta*(SQ - 1)
+    IQSD = IQD*SQ
+    IQBD = IQD*SQ_EFF
     return Theory(Q=q, F1=F1, F2=F2, P=IQD, S=SQ, I=IQSD, Seff=SQ_EFF, Ibeta=IQBD)
 
@@ -279,28 +270,18 @@
     if radius_effective is None:
         radius_effective = radius
-    SQ = hardsphere_simple(q, radius_effective, volfraction)
-    volume = 4./3.*pi*radius**3
     average_volume = total_volume/total_weight
     if norm == 'sasfit':
-        beta = F1**2/F2
-        SQ_EFF = 1 + beta*(SQ - 1)
         IQD = F2
-        IQSD = IQD*SQ
-        IQBD = IQD*SQ_EFF
     elif norm == 'sasview':
-        SQ_EFF = None
         IQD = F2/average_volume*1e-4*volfraction
-        IQSD = IQD*SQ
-        IQBD = None
     elif norm == 'yun':
-        # Note: yun uses gauss limits from R0/10 to R0 + 5 sigma steps sigma/100
-        # With pd = 0.1, that's 14 sigma, or 1400 points.
         F1 *= 1e-6  # Yun is using sld in 1/A^2, not 1e-6/A^2
         F2 *= 1e-12
-        beta = F1**2/F2
-        SQ_EFF = 1 + beta*(SQ - 1)
         IQD = F2/average_volume*1e8*volfraction
-        IQSD = IQD*SQ
-        IQBD = IQD*SQ_EFF
+    SQ = hardsphere_simple(q, radius_effective, volfraction)
+    beta = F1**2/F2
+    SQ_EFF = 1 + beta*(SQ - 1)
+    IQSD = IQD*SQ
+    IQBD = IQD*SQ_EFF
     return Theory(Q=q, F1=F1, F2=F2, P=IQD, S=SQ, I=IQSD, Seff=SQ_EFF, Ibeta=IQBD)
 
@@ -454,4 +435,6 @@
 
 def compare_yun_sphere_gauss():
+    # Note: yun uses gauss limits from R0/10 to R0 + 5 sigma steps sigma/100
+    # With pd = 0.1, that's 14 sigma and 1400 points.
     pars = {
         'radius': 20, 'radius_pd': 0.1, 'radius_pd_type': 'gaussian',
Index: explore/beta/sphereFormFactor.m
===================================================================
--- explore/beta/sphereFormFactor.m	(revision e262dd68f6ba42ac365c68553db9621443f502ee)
+++ explore/beta/sphereFormFactor.m	(revision e262dd68f6ba42ac365c68553db9621443f502ee)
@@ -0,0 +1,5 @@
+function data=sphereFormFactor(Q,radius)
+
+data= ( 3 * (sin(Q*radius) - Q*radius.*cos(Q*radius)) ./ (Q*radius).^3).^2 ;
+
+return;
