Index: /branches/eam_branch_20080706/ippScripts/scripts/stack_skycell.pl
===================================================================
--- /branches/eam_branch_20080706/ippScripts/scripts/stack_skycell.pl	(revision 18527)
+++ /branches/eam_branch_20080706/ippScripts/scripts/stack_skycell.pl	(revision 18528)
@@ -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";
Index: /branches/eam_branch_20080706/ippTasks/diff.pro
===================================================================
--- /branches/eam_branch_20080706/ippTasks/diff.pro	(revision 18527)
+++ /branches/eam_branch_20080706/ippTasks/diff.pro	(revision 18528)
@@ -115,5 +115,5 @@
     book setword diffSkyfile $pageName pantaskState RUN
     book getword diffSkyfile $pageName diff_id -var DIFF_ID
-    book getword diffSkyfile $pageName tess_id -var TESS_ID
+    book getword diffSkyfile $pageName tess_id -var TESS_DIR
     book getword diffSkyfile $pageName skycell_id -var SKYCELL_ID
     book getword diffSkyfile $pageName camera -var CAMERA
@@ -127,5 +127,6 @@
     $WORKDIR = $WORKDIR_TEMPLATE
 
-    sprintf outroot "%s/tess_%s/%s/%s.%s.dif.%s" $WORKDIR $TESS_ID $SKYCELL_ID $TESS_ID $SKYCELL_ID $DIFF_ID
+    basename $TESS_DIR -var TESS_ID
+    sprintf outroot "%s/%s/%s/%s.%s.dif.%s" $WORKDIR $TESS_ID $SKYCELL_ID $TESS_ID $SKYCELL_ID $DIFF_ID
 
     ## generate output log based on filerule (convert the URI to a PATH)
Index: /branches/eam_branch_20080706/ippTasks/stack.pro
===================================================================
--- /branches/eam_branch_20080706/ippTasks/stack.pro	(revision 18527)
+++ /branches/eam_branch_20080706/ippTasks/stack.pro	(revision 18528)
@@ -115,6 +115,7 @@
     book setword stackSumSkyfile $pageName pantaskState RUN
     book getword stackSumSkyfile $pageName stack_id -var STACK_ID
-    book getword stackSumSkyfile $pageName tess_id -var TESS_ID
+    book getword stackSumSkyfile $pageName tess_id -var TESS_DIR
     book getword stackSumSkyfile $pageName skycell_id -var SKYCELL_ID
+    book getword stackSumSkyfile $pageName camera -var CAMERA
     book getword stackSumSkyfile $pageName workdir -var WORKDIR_TEMPLATE
     book getword stackSumSkyfile $pageName dbname -var DBNAME
@@ -126,5 +127,6 @@
     $WORKDIR = $WORKDIR_TEMPLATE
 
-    sprintf outroot "%s/tess_%s/%s/%s.%s.stk.%s" $WORKDIR $TESS_ID $SKYCELL_ID $TESS_ID $SKYCELL_ID $STACK_ID
+    basename $TESS_DIR -var TESS_ID
+    sprintf outroot "%s/%s/%s/%s.%s.stk.%s" $WORKDIR $TESS_ID $SKYCELL_ID $TESS_ID $SKYCELL_ID $STACK_ID
 
     ## generate output log based on filerule (convert the URI to a PATH) (use STACK_ID?)
@@ -132,5 +134,5 @@
     $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot`
     if ("$logfile" == "") 
-      echo "WARNING: logfile not defined in stack.pro:136"
+      echo "WARNING: logfile not defined in stack.pro:135"
       break
     end
