Index: trunk/ippScripts/scripts/diff_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/diff_skycell.pl	(revision 30598)
+++ trunk/ippScripts/scripts/diff_skycell.pl	(revision 30599)
@@ -117,7 +117,12 @@
 }
 
+# ppSub does (input) - (template) after PSF-match convolution.  
+# one of the files needs to be assigned to 'input' and the other to 'template'.
+# if either of these is a WARP, then we can perform magic on it.  If we are going to 
+# run magic, then we need to save the convolved version of the OTHER image
+# (see magic_process.pl:155)
+
 foreach my $file (@$files) {
     if (defined $file->{template} and $file->{template}) {
-#        $template = $file->{uri};
         $templatePath = $file->{path_base};
         if ($file->{warp_id} == 0) {
@@ -142,8 +147,7 @@
             $templateSources = "PSWARP.OUTPUT.SOURCES";
             $templateMagic = $file->{magicked};
-            $saveRefConv = 1;
-        }
-    } else {
-#        $input = $file->{uri};
+            $saveInConv = 1;
+        }
+    } else {
         $inputPath = $file->{path_base};
         $inputMagic = $file->{magicked};    # if input is a stack the output can't be "magicked"
@@ -165,5 +169,5 @@
             $inputVariance = "PSWARP.OUTPUT.VARIANCE";
             $inputSources = "PSWARP.OUTPUT.SOURCES";
-            $saveInConv = 1;
+            $saveRefConv = 1;
         }
     }
