Index: trunk/ippScripts/scripts/diff_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/diff_skycell.pl	(revision 14274)
+++ trunk/ippScripts/scripts/diff_skycell.pl	(revision 14276)
@@ -88,6 +88,6 @@
 
 # Identify the input and the template
-my ($input, $inputMask, $inputPath); # Input file and path
-my ($template, $templateMask, $templatePath); # Template file and path
+my ($input, $inputMask, $inputWeight, $inputPath); # Input files and path
+my ($template, $templateMask, $templateWeight, $templatePath); # Template files and path
 my $tess_id;			# Tesselation identifier
 my $skycell_id;			# Skycell identifier
@@ -99,6 +99,8 @@
 	if ($file->{warp_id} == 0) {
 	    $templateMask = "PPSTACK.OUTPUT.MASK";
+	    $templateWeight = "PPSTACK.OUTPUT.WEIGHT";
 	} else {
 	    $templateMask = "PSWARP.OUTPUT.MASK";
+	    $templateWeight = "PSWARP.OUTPUT.WEIGHT";
 	}
     } else {
@@ -107,6 +109,8 @@
 	if ($file->{warp_id} == 0) {
 	    $inputMask = "PPSTACK.OUTPUT.MASK";
+	    $inputWeight = "PPSTACK.OUTPUT.WEIGHT";
 	} else {
 	    $inputMask = "PSWARP.OUTPUT.MASK";
+	    $inputWeight = "PSWARP.OUTPUT.WEIGHT";
 	}
     }
@@ -138,9 +142,13 @@
 $templateMask = $ipprc->filename($templateMask, $templatePath);
 $inputMask = $ipprc->filename($inputMask, $inputPath);
+$templateWeight = $ipprc->filename($templateWeight, $templatePath);
+$inputWeight = $ipprc->filename($inputWeight, $inputPath);
 
 &my_die("Couldn't find input: $template", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($template);
 &my_die("Couldn't find input: $templateMask", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateMask);
+&my_die("Couldn't find input: $templateWeight", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateWeight);
 &my_die("Couldn't find input: $input", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($input);
 &my_die("Couldn't find input: $inputMask", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inputMask);
+&my_die("Couldn't find input: $inputWeight", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inputWeight);
 
 # Get the output filenames
@@ -149,4 +157,5 @@
 my $outputName = $ipprc->filename("PPSUB.OUTPUT", $outputRoot);
 my $outputMask = $ipprc->filename("PPSUB.OUTPUT.MASK", $outputRoot);
+my $outputWeight = $ipprc->filename("PPSUB.OUTPUT.WEIGHT", $outputRoot);
 #my $bin1Name =  $ipprc->filename("PPSUB.BIN1", $outputRoot);
 #my $bin2Name =  $ipprc->filename("PPSUB.BIN2", $outputRoot);
@@ -164,4 +173,6 @@
     $command .= " -inmask $inputMask";
     $command .= " -refmask $templateMask";
+    $command .= " -inweight $inputWeight";
+    $command .= " -refweight $templateWeight";
     $command .= " -stats $outputStats";
     $command .= " -recipe PPSTATS WARPSTATS";
@@ -175,4 +186,5 @@
     &my_die("Couldn't find expected output file: $outputName", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputName);
     &my_die("Couldn't find expected output file: $outputMask", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
+    &my_die("Couldn't find expected output file: $outputWeight", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight);
 #    &my_die("Couldn't find expected output file: $bin1Name",    $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name);
 #    &my_die("Couldn't find expected output file: $bin2Name",    $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name);
