Index: trunk/psphot/src/psphotStackMatchPSFsUtils.c
===================================================================
--- trunk/psphot/src/psphotStackMatchPSFsUtils.c	(revision 30624)
+++ trunk/psphot/src/psphotStackMatchPSFsUtils.c	(revision 31154)
@@ -64,5 +64,5 @@
         }
 	if (!source->peak) continue;
-	if (source->peak->SN < SN_MIN) continue;
+	if (sqrt(source->peak->detValue) < SN_MIN) continue;
         coordsFromSource(&x->data.F32[numGood], &y->data.F32[numGood], source);
         numGood++;
@@ -81,5 +81,5 @@
         }
 	if (!source->peak) continue;
-	if (source->peak->SN < SN_MIN) continue;
+	if (sqrt(source->peak->detValue) < SN_MIN) continue;
         float xSource, ySource;         // Coordinates of source
         coordsFromSource(&xSource, &ySource, source);
@@ -287,5 +287,5 @@
 
     float penalty = psMetadataLookupF32(NULL, subRecipe, "PENALTY"); // Penalty for wideness
-    int threads = psMetadataLookupS32(NULL, config->arguments, "-threads"); // Number of threads
+    int threads = psMetadataLookupS32(NULL, config->arguments, "NTHREADS"); // Number of threads
 
     int order = psMetadataLookupS32(NULL, subRecipe, "SPATIAL.ORDER"); // Spatial polynomial order
@@ -363,5 +363,5 @@
 
 	// we need to register the FWHM values for use downstream 
-	pmSubtractionSetFWHMs(options->inputSeeing->data.F32[index], options->targetSeeing);
+	pmSubtractionSetFWHMs(options->targetSeeing, options->inputSeeing->data.F32[index]);
 
 	pmSubtractionParamScaleOptions(scale, scaleRef, scaleMin, scaleMax);
