Index: trunk/ippScripts/scripts/stack_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/stack_skycell.pl	(revision 14718)
+++ trunk/ippScripts/scripts/stack_skycell.pl	(revision 14898)
@@ -120,4 +120,5 @@
 				      UNLINK => !$save_temps );
 my $num = 0;
+my $inputSources;		# Sources to use as stamps
 foreach my $file (@$files) {
     print $listFile "INPUT$num\tMETADATA\n";
@@ -141,4 +142,10 @@
 
     print $listFile "END\n\n";
+
+    unless (defined $inputSources) {
+	$inputSources = $ipprc->filename("PSWARP.OUTPUT.SOURCES", $file->{path_base});
+	&my_die("Source file $inputSources does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $inputSources );
+    }
+	
 }
 
@@ -149,4 +156,5 @@
 my $outputMask = $ipprc->filename("PPSTACK.OUTPUT.MASK", $outputRoot);
 my $outputWeight = $ipprc->filename("PPSTACK.OUTPUT.WEIGHT", $outputRoot);
+my $outputSources = $ipprc->filename("PPSTACK.OUTPUT.SOURCES", $outputRoot);
 #my $bin1Name =  $ipprc->filename("PPSTACK.BIN1", $outputRoot);
 #my $bin2Name =  $ipprc->filename("PPSTACK.BIN2", $outputRoot);
@@ -158,4 +166,9 @@
     $command .= " -stats $outputStats";
     $command .= " -recipe PPSTATS WARPSTATS";
+    $command .= " -sources $inputSources";
+    $command .= " -target 5.0";
+    $command .= " -photometry";
+
+    print "\n\nWARNING: Convolving to 1 arcsec FWHM seeing!\n\n";
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
@@ -168,4 +181,5 @@
     &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);
 #    &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);
