Index: trunk/ippScripts/scripts/stack_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/stack_skycell.pl	(revision 17943)
+++ trunk/ippScripts/scripts/stack_skycell.pl	(revision 18482)
@@ -128,5 +128,6 @@
     my $mask = $ipprc->filename( "PSWARP.OUTPUT.MASK", $file->{path_base} ); # Mask name
     my $weight = $ipprc->filename( "PSWARP.OUTPUT.WEIGHT", $file->{path_base} ); # Weight name
-    my $psf = $ipprc->filename( "PSPHOT.PSF.SAVE", $file->{path_base} ); # Weight name
+    my $psf = $ipprc->filename( "PSPHOT.PSF.SAVE", $file->{path_base} ); # PSF name
+    my $sources = $ipprc->filename("PSWARP.OUTPUT.SOURCES", $file->{path_base}); # Sources name
 
     &my_die("Image $image does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $image );
@@ -134,4 +135,5 @@
     &my_die("Weight $weight does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $weight );
     &my_die("PSF $psf does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $psf );
+    &my_die("Sources $sources does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $sources );
 
     print $listFile "\tIMAGE\tSTR\t" . $image . "\n";
@@ -139,4 +141,5 @@
     print $listFile "\tWEIGHT\tSTR\t" . $weight . "\n";
     print $listFile "\tPSF\tSTR\t" . $psf . "\n";
+    print $listFile "\tSOURCES\tSTR\t" . $sources . "\n";
 
     ### XXX NEED TO UPDATE THESE appropriately
@@ -144,11 +147,4 @@
 
     print $listFile "END\n\n";
-
-    # XXX details about supplying sources, etc, need to be specified in the libraries
-    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 );
-    }
-
 }
 
@@ -170,5 +166,4 @@
     $command .= " -recipe PPSUB STACK";
     $command .= " -recipe PPSTATS WARPSTATS";
-    $command .= " -sources $inputSources";
     $command .= " -photometry";
     $command .= " -tracedest $traceDest -log $logDest";
