Index: src/sas/sascalc/corfunc/transform_thread.py
===================================================================
--- src/sas/sascalc/corfunc/transform_thread.py	(revision c72829533b5fef8ae525bccfe32be80c455714df)
+++ src/sas/sascalc/corfunc/transform_thread.py	(revision 9b90bf84a52cb67272ccbed5bac69156a6ca6bc3)
@@ -37,5 +37,6 @@
             # ----- 1D Correlation Function -----
             gamma1 = dct((iqs-background)*qs**2)
-            gamma1 = gamma1 / gamma1.max()
+            Q = gamma1.max()
+            gamma1 /= Q
 
             if self.check_if_cancelled(): return
@@ -52,36 +53,39 @@
 
             # ----- Interface Distribution function -----
-            dmax = 200.0 # Max real space value to calculate IDF up to
-            dstep = 0.5
-            qmax = 1.0 # Max q value to integrate up to when calculating IDF
+            # dmax = 200.0 # Max real space value to calculate IDF up to
+            # dstep = 0.5 # Evaluate the IDF in steps of dstep along the real axis
+            # qmax = 1.0 # Max q value to integrate up to when calculating IDF
 
             # Units of x axis depend on qmax (for some reason?). This scales
             # the xgamma array appropriately, since qmax was set to 0.6 in
             # the original fortran code.
-            x_scale = qmax / 0.6
+            # x_scale = qmax / 0.6
 
-            xgamma = np.arange(0, dmax/x_scale, step=dstep/x_scale)
-            idf = np.zeros(len(xgamma))
+            # xgamma = np.arange(0, dmax/x_scale, step=dstep/x_scale)
+            # idf = np.zeros(len(xgamma))
+            idf = dct(-qs**4 * (iqs-background))
+            idf[0] = trapz(-qs**4 * (iqs-background), qs)
+            idf /= Q
 
             # nth moment = integral(q^n * I(q), q=0, q=inf)
-            moment = np.zeros(5)
-            for n in range(5):
-                integrand = qs**n * (iqs-background)
-                moment[n] = trapz(integrand[qs < qmax], qs[qs < qmax])
-                if self.check_if_cancelled(): return
-
-            # idf(x) = -integral(q^4 * I(q)*cos(qx), q=0, q=inf) / 2nd moment
-            # => idf(0) = -integral(q^4 * I(q), 0, inf) / (2nd moment)
-            #  = -(4th moment)/(2nd moment)
-            idf[0] = -moment[4] / moment[2]
-            for i in range(1, len(xgamma)):
-                d = xgamma[i]
-
-                integrand = -qs**4 * (iqs-background) * np.cos(d*qs)
-                idf[i] = trapz(integrand[qs < qmax], qs[qs < qmax])
-                idf[i] /= moment[2]
-                if self.check_if_cancelled(): return
-
-            xgamma *= x_scale
+            # moment = np.zeros(5)
+            # for n in range(5):
+            #     integrand = qs**n * (iqs-background)
+            #     moment[n] = trapz(integrand[qs < qmax], qs[qs < qmax])
+            #     if self.check_if_cancelled(): return
+            #
+            # # idf(x) = -integral(q^4 * I(q)*cos(qx), q=0, q=inf) / 2nd moment
+            # # => idf(0) = -integral(q^4 * I(q), 0, inf) / (2nd moment)
+            # #  = -(4th moment)/(2nd moment)
+            # idf[0] = -moment[4] / moment[2]
+            # for i in range(1, len(xgamma)):
+            #     d = xgamma[i]
+            #
+            #     integrand = -qs**4 * (iqs-background) * np.cos(d*qs)
+            #     idf[i] = trapz(integrand[qs < qmax], qs[qs < qmax])
+            #     idf[i] /= moment[2]
+            #     if self.check_if_cancelled(): return
+            #
+            # xgamma *= x_scale
 
         except Exception as e:
@@ -99,5 +103,5 @@
         transform1 = Data1D(xs, gamma1)
         transform3 = Data1D(xs[xs <= 200], gamma3)
-        idf = Data1D(xgamma, idf)
+        idf = Data1D(xs, idf)
 
         transforms = (transform1, transform3, idf)
Index: src/sas/sasgui/perspectives/corfunc/corfunc.py
===================================================================
--- src/sas/sasgui/perspectives/corfunc/corfunc.py	(revision 7dda833a648fe9c4be0256b3048be490124ed4a1)
+++ src/sas/sasgui/perspectives/corfunc/corfunc.py	(revision 9b90bf84a52cb67272ccbed5bac69156a6ca6bc3)
@@ -192,8 +192,9 @@
             new_plot.xaxis("{x}", 'A')
             new_plot.yaxis("{g_1}", '')
-
+            # Linear scale
             new_plot.xtransform = 'x'
             new_plot.ytransform = 'y'
             group_id = GROUP_ID_IDF
+            # Show IDF as a curve instead of points
             new_plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM
         new_plot.id = label
Index: src/sas/sasgui/perspectives/corfunc/corfunc_panel.py
===================================================================
--- src/sas/sasgui/perspectives/corfunc/corfunc_panel.py	(revision c72829533b5fef8ae525bccfe32be80c455714df)
+++ src/sas/sasgui/perspectives/corfunc/corfunc_panel.py	(revision 9b90bf84a52cb67272ccbed5bac69156a6ca6bc3)
@@ -277,10 +277,13 @@
         self._transformed_data = transforms
         (transform1, transform3, idf) = transforms
-        plot_x = transform1.x[np.where(transform1.x <= 200)]
-        plot_y = transform1.y[np.where(transform1.x <= 200)]
+        plot_x = transform1.x[transform1.x <= 200]
+        plot_y = transform1.y[transform1.x <= 200]
         self._manager.show_data(Data1D(plot_x, plot_y), TRANSFORM_LABEL1)
         # No need to shorten gamma3 as it's only calculated up to x=200
         self._manager.show_data(transform3, TRANSFORM_LABEL3)
-        self._manager.show_data(idf, IDF_LABEL)
+
+        plot_x = idf.x[idf.x <= 200]
+        plot_y = idf.y[idf.x <= 200]
+        self._manager.show_data(Data1D(plot_x, plot_y), IDF_LABEL)
 
         # Only enable extract params button if a fourier trans. has been done
