Index: trunk/ippScripts/scripts/stack_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/stack_skycell.pl	(revision 26105)
+++ trunk/ippScripts/scripts/stack_skycell.pl	(revision 26600)
@@ -165,4 +165,5 @@
 }
 my $convolve = metadataLookupBool($recipe, 'CONVOLVE'); # Convolve inputs?
+my $photometry = metadataLookupBool($recipe, 'PHOTOMETRY'); # perform photometry?
 
 
@@ -205,5 +206,6 @@
 my $outputMask = $ipprc->filename("PPSTACK.OUTPUT.MASK", $outroot);
 my $outputWeight = $ipprc->filename("PPSTACK.OUTPUT.VARIANCE", $outroot);
-my $outputSources = $ipprc->filename("PSPHOT.OUT.CMF.MEF", $outroot); ## this must be consistent with the value in diff_skycell.pl:101
+my $outputSources = $photometry ? $ipprc->filename("PSPHOT.OUT.CMF.MEF", $outroot) : undef; ## this must be consistent with the value in diff_skycell.pl:101
+
 ## use an explicit stack name for psphot output objects
 #my $bin1Name =  $ipprc->filename("PPSTACK.BIN1", $outroot);
@@ -236,5 +238,4 @@
     $command .= " -F SOURCE.PLOT.PSFMODEL SOURCE.PLOT.SKY.PSFMODEL";
     $command .= " -F SOURCE.PLOT.APRESID SOURCE.PLOT.SKY.APRESID";
-    $command .= " -photometry";
     $command .= " -threads $threads" if defined $threads;
     $command .= " -debug-stack" if defined $debug;
@@ -282,5 +283,7 @@
         &my_die("Couldn't find expected output file: $outputMask", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
         &my_die("Couldn't find expected output file: $outputWeight", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight);
-        &my_die("Couldn't find expected output file: $outputSources", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources);
+	if ($photometry) {
+	    &my_die("Couldn't find expected output file: $outputSources", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources);
+	}
 #       &my_die("Couldn't find expected output file: $bin1Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name);
 #       &my_die("Couldn't find expected output file: $bin2Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name);
