Index: trunk/ippScripts/scripts/diff_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/diff_skycell.pl	(revision 19197)
+++ trunk/ippScripts/scripts/diff_skycell.pl	(revision 19303)
@@ -99,5 +99,6 @@
             $templateMask = "PPSTACK.OUTPUT.MASK";
             $templateWeight = "PPSTACK.OUTPUT.WEIGHT";
-            $templateSources = "PSPHOT.OUTPUT";
+            $templateSources = "PSPHOT.OUT.CMF.MEF";  ## this must be consistent with the value in stack_skycell.pl:161
+	    ## use an explicit stack name for psphot output objects
         } else {
             $templateMask = "PSWARP.OUTPUT.MASK";
@@ -141,4 +142,12 @@
 $ipprc->define_camera($camera);
 
+# print "templateMask: $templateMask\n";
+# print "templatePath: $templatePath\n";
+# print "inputMask: $inputMask\n";
+# print "inputPath: $inputPath\n";
+# print "templateWeight: $templateWeight\n";
+# print "inputWeight: $inputWeight\n";
+# print "templateSources: $templateSources\n";
+
 $templateMask = $ipprc->filename($templateMask, $templatePath);
 $inputMask = $ipprc->filename($inputMask, $inputPath);
@@ -146,4 +155,12 @@
 $inputWeight = $ipprc->filename($inputWeight, $inputPath);
 $templateSources = $ipprc->filename($templateSources, $templatePath);
+
+print "templateMask: $templateMask\n";
+print "templatePath: $templatePath\n";
+print "inputMask: $inputMask\n";
+print "inputPath: $inputPath\n";
+print "templateWeight: $templateWeight\n";
+print "inputWeight: $inputWeight\n";
+print "templateSources: $templateSources\n";
 
 &my_die("Couldn't find input: $template", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($template);
@@ -159,5 +176,5 @@
 my $outputMask = $ipprc->filename("PPSUB.OUTPUT.MASK", $outroot);
 my $outputWeight = $ipprc->filename("PPSUB.OUTPUT.WEIGHT", $outroot);
-my $outputSources = $ipprc->filename("PSPHOT.OUTPUT", $outroot);
+my $outputSources = $ipprc->filename("PSPHOT.OUT.CMF.MEF", $outroot);
 #my $bin1Name =  $ipprc->filename("PPSUB.BIN1", $outroot);
 #my $bin2Name =  $ipprc->filename("PPSUB.BIN2", $outroot);
@@ -175,4 +192,5 @@
     $command .= " -stats $outputStats";
     $command .= " -recipe PPSTATS WARPSTATS";
+    $command .= " -F PSPHOT.OUTPUT PSPHOT.OUT.CMF.MEF";
     $command .= " -sources $templateSources";
     $command .= " -photometry";
