Index: /tags/ipp-pv3-20140616/ippScripts/Build.PL
===================================================================
--- /tags/ipp-pv3-20140616/ippScripts/Build.PL	(revision 36951)
+++ /tags/ipp-pv3-20140616/ippScripts/Build.PL	(revision 36952)
@@ -135,5 +135,13 @@
         scripts/psphot_fullforce_warp.pl
         scripts/psphot_fullforce_summary.pl
-        scripts/stack_bkg_mk_mdc.pl
+        scripts/sc_mk_stack_mdc.pl
+        scripts/sc_prepare_camera.pl
+        scripts/sc_prepare_chip.pl
+        scripts/sc_prepare_stack.pl
+        scripts/sc_prepare_warp.pl
+        scripts/sc_remote_exec.pl
+        scripts/sc_transfer_tool.pl
+        scripts/sc_validate_files.pl
+        scripts/sc_validate_processing.pl
     )],
     dist_abstract => 'Scripts for running the Pan-STARRS IPP',
Index: /tags/ipp-pv3-20140616/ippScripts/MANIFEST
===================================================================
--- /tags/ipp-pv3-20140616/ippScripts/MANIFEST	(revision 36951)
+++ /tags/ipp-pv3-20140616/ippScripts/MANIFEST	(revision 36952)
@@ -49,3 +49,12 @@
 scripts/lap_science.pl
 scripts/regenerate_background.pl
+scripts/sc_mk_stack_mdc.pl
+scripts/sc_prepare_camera.pl
+scripts/sc_prepare_chip.pl
+scripts/sc_prepare_stack.pl
+scripts/sc_prepare_warp.pl
+scripts/sc_remote_exec.pl
+scripts/sc_transfer_tool.pl
+scripts/sc_validate_files.pl
+scripts/sc_validate_processing.pl
 t/00_distribution.t
Index: /tags/ipp-pv3-20140616/ippScripts/scripts/sc_prepare_stack.pl
===================================================================
--- /tags/ipp-pv3-20140616/ippScripts/scripts/sc_prepare_stack.pl	(revision 36951)
+++ /tags/ipp-pv3-20140616/ippScripts/scripts/sc_prepare_stack.pl	(revision 36952)
@@ -168,4 +168,11 @@
 	my $remote_path_base = uri_local_to_remote($warp_path_base);
 	$warp_path_base_string .= " $remote_path_base ";
+
+	# Append file names to transfer lists so we can recover if warps are deleted.
+	uri_to_outputs($warp_path_base . ".fits");
+	uri_to_outputs($warp_path_base . ".wt.fits");
+	uri_to_outputs($warp_path_base . ".mask.fits");
+	uri_to_outputs($warp_path_base . ".cmf");
+#	uri_to_outputs($warp_path_base . ".psf");
     }
     my $mk_mdc_command = "mkdir -p $remote_outdir && sc_mk_stack_mdc.pl $warp_path_base_string > ${remote_outroot}.in.mdc";
@@ -182,5 +189,5 @@
     $ppstack_command    .= " -R PPSTACK.UNCONV.VARIANCE FITS.TYPE COMP_STACK";
     $ppstack_command    .= " -tracedest ${remote_outroot}.trace -log ${remote_outroot}.log ";
-    $ppstack_command    .= " -threads 10 ";
+    $ppstack_command    .= " -threads 4 ";
     $ppstack_command    .= " -dumpconfig ${remote_outroot}.mdc ";
     $ppstack_command    .= " -stack_id $stack_id -skycell_id $skycell_id -tess_id $tess_id ";
Index: /tags/ipp-pv3-20140616/ippScripts/scripts/sc_prepare_warp.pl
===================================================================
--- /tags/ipp-pv3-20140616/ippScripts/scripts/sc_prepare_warp.pl	(revision 36951)
+++ /tags/ipp-pv3-20140616/ippScripts/scripts/sc_prepare_warp.pl	(revision 36952)
@@ -27,5 +27,5 @@
 my $max_time      = 8;                      # longest allocation to ask for
 my $remote_hostname= "LANL/Mustang";         # Name of the remote node.
-my @return_component_list = ("DBINFO.EXP", "PSWARP.CONFIG", "PSWARP.OUTPUT", "PSWARP.OUTPUT.MASK", "PSWARP.OUTPUT.VARIANCE", "PSWARP.OUTPUT.SOURCES","LOG.EXP","TRACE.EXP");
+my @return_component_list = ("DBINFO.EXP", "PSWARP.CONFIG", "PSWARP.OUTPUT", "PSWARP.OUTPUT.MASK", "PSWARP.OUTPUT.VARIANCE", "PSWARP.OUTPUT.SOURCES","PSPHOT.PSF.SAVE","LOG.EXP","TRACE.EXP");
 # Look for programs we need
 my $missing_tools;
Index: /tags/ipp-pv3-20140616/ippScripts/scripts/sc_transfer_tool.pl
===================================================================
--- /tags/ipp-pv3-20140616/ippScripts/scripts/sc_transfer_tool.pl	(revision 36951)
+++ /tags/ipp-pv3-20140616/ippScripts/scripts/sc_transfer_tool.pl	(revision 36952)
@@ -51,4 +51,6 @@
 while(<I>) {
     chomp;
+    $i = int(rand($#filehandles));
+
     my $fline;
     if ($fetch) {
@@ -57,10 +59,10 @@
     if (($fetch)&&(!(-e $_))) {  # We are fetching, and do not already have this file.
 	print { $filehandles[$i] } $fline;
-	$i++;
+#	$i++;
     }
     elsif (!($fetch)) { # We are pushing
 #	if (-e "${local_tmp}/$_") { 
 	    print { $filehandles[$i] } "${local_tmp}/$_" . "\n";
-	    $i++;
+#	    $i++;
 #	}
 #	else { # But somehow couldn't find the file we expected
@@ -69,5 +71,5 @@
 #	}
     }
-    if ($i >= $threads) { $i = 0; }
+#    if ($i >= $threads) { $i = 0; }
 }
 close(I);
