Index: branches/pap/ippScripts/scripts/diff_skycell.pl
===================================================================
--- branches/pap/ippScripts/scripts/diff_skycell.pl	(revision 23948)
+++ branches/pap/ippScripts/scripts/diff_skycell.pl	(revision 25027)
@@ -35,5 +35,5 @@
 }
 
-my ($diff_id, $dbname, $threads, $outroot, $reduction, $verbose, $no_update, $no_op, $redirect);
+my ($diff_id, $dbname, $threads, $outroot, $reduction, $inverse, $verbose, $no_update, $no_op, $redirect);
 my ($skycell_id, $diff_skyfile_id);
 GetOptions(
@@ -44,4 +44,5 @@
     'threads=s'         => \$threads,   # Number of threads to use
     'outroot=s'         => \$outroot, # Output root name
+    'inverse'           => \$inverse, # Make inverse subtraction?
     'reduction=s'       => \$reduction, # Reduction class
     'verbose'           => \$verbose,   # Print to stdout
@@ -96,5 +97,4 @@
 my $camera;                     # Camera
 my ($inputMagic, $templateMagic); # Are the inputs been magicked?
-my $inverse = 1;                # Generate inverse subtraction if warp-warp
 foreach my $file (@$files) {
     if (defined $file->{template} and $file->{template}) {
@@ -107,5 +107,4 @@
             # template is a stack so it doesn't need to be magicked
             $templateMagic = 1;
-            $inverse = 0;
             ## use an explicit stack name for psphot output objects
         } else {
@@ -123,5 +122,4 @@
             $inputVariance = "PPSTACK.OUTPUT.VARIANCE";
             $inputSources = "PSPHOT.OUT.CMF.MEF";  ## this must be consistent with the value in stack_skycell.pl:161
-            $inverse = 0;
         } else {
             $inputMask = "PSWARP.OUTPUT.MASK";
@@ -297,5 +295,5 @@
     # Add the subtraction result
     {
-        my $command = "$difftool -adddiffskyfile -diff_id $diff_id -skycell_id $skycell_id -uri $outputName -path_base $outroot";
+        my $command = "$difftool -adddiffskyfile -diff_id $diff_id -skycell_id $skycell_id -path_base $outroot";
         $command .= " $cmdflags";
         $command .= " -magicked" if $magicked;
