Index: trunk/psphot/src/psphotSignificanceImage.c
===================================================================
--- trunk/psphot/src/psphotSignificanceImage.c	(revision 20453)
+++ trunk/psphot/src/psphotSignificanceImage.c	(revision 20463)
@@ -12,4 +12,5 @@
     // smooth the image and weight map
     psTimerStart ("psphot.smooth");
+    psImageConvolveSetThreads(true);
 
     // XXX we can a) choose fft to convolve if needed and b) multithread fftw
@@ -44,5 +45,5 @@
     // smooth the image, applying the mask as we go
     psImage *smooth_im = psImageCopy(NULL, readout->image, PS_TYPE_F32);
-    psImageSmoothMask(smooth_im, smooth_im, readout->mask, maskVal, SIGMA_SMTH, NSIGMA_SMTH, minGauss);
+    psImageSmoothMask_Threaded(smooth_im, smooth_im, readout->mask, maskVal, SIGMA_SMTH, NSIGMA_SMTH, minGauss);
     psLogMsg("psphot", PS_LOG_MINUTIA, "smooth image: %f sec\n", psTimerMark("psphot.smooth"));
 
@@ -55,5 +56,5 @@
     // effective per-pixel variance is maintained.
     psImage *smooth_wt = psImageCopy(NULL, readout->weight, PS_TYPE_F32);
-    psImageSmoothMask(smooth_wt, smooth_wt, readout->mask, maskVal, SIGMA_SMTH * M_SQRT1_2,
+    psImageSmoothMask_Threaded(smooth_wt, smooth_wt, readout->mask, maskVal, SIGMA_SMTH * M_SQRT1_2,
                       NSIGMA_SMTH, minGauss);
     psLogMsg("psphot", PS_LOG_MINUTIA, "smooth weight: %f sec\n", psTimerMark("psphot.smooth"));
@@ -130,2 +131,26 @@
 }
 
+# if (0) 
+{ 
+    // threadingdemo
+    // smooth the image, applying the mask as we go
+    psImage *smooth_im = psImageCopy(NULL, readout->image, PS_TYPE_F32);
+    psImageSmoothMask(smooth_im, smooth_im, readout->mask, maskVal, SIGMA_SMTH, NSIGMA_SMTH, minGauss);
+
+    psLogMsg("psphot", PS_LOG_INFO, "smooth image: %f sec\n", psTimerMark("psphot.smooth"));
+
+    psImageConvolveSetThreads(true);
+
+    psTimerStart ("psphot.smooth");
+
+    // XXX a quick test of the threaded version of the function:
+    psImage *smooth_test = psImageCopy(NULL, readout->image, PS_TYPE_F32);
+    psImageSmoothMask_Threaded(smooth_test, smooth_test, readout->mask, maskVal, SIGMA_SMTH, NSIGMA_SMTH, minGauss);
+
+    psLogMsg("psphot", PS_LOG_INFO, "smooth_threaded image: %f sec\n", psTimerMark("psphot.smooth"));
+
+    psphotSaveImage (NULL, smooth_im, "smooth_im.fits");
+    psphotSaveImage (NULL, smooth_test, "smooth_test.fits");
+    exit (0);
+}
+# endif
