Index: /trunk/tools/diff_outputs.pl
===================================================================
--- /trunk/tools/diff_outputs.pl	(revision 27025)
+++ /trunk/tools/diff_outputs.pl	(revision 27026)
@@ -35,5 +35,5 @@
                              'JPEG1' => '.b1.jpg', # Binned JPEG
                              'JPEG2' => '.b2.jpg', # Binned JPEG
-                             'KERNEL' => '.subkernel', # Convolution kernel
+#                             'KERNEL' => '.subkernel', # Convolution kernel
                              'INVERSE.IMAGE' => '.inv.fits', # Image
                              'INVERSE.MASK' => '.inv.mask.fits', # Mask
@@ -49,8 +49,21 @@
                          };
 
+# Products that get magicked
+use constant MAGIC => { 'IMAGE' => 1,
+                        'MASK' => 1,
+                        'VARIANCE' => 1,
+                        'SOURCES' => 1,
+                        'INVERSE.IMAGE' => 1,
+                        'INVERSE.MASK' => 1,
+                        'INVERSE.VARIANCE' => 1,
+                        'INVERSE.SOURCES' => 1,
+};
+
+
 my ($db_host, $db_name, $db_user, $db_pw); # Database details
 my ($diff_id, $skycell_id);     # Diff and skycell of interest
 my ($input);                    # Input list
 my ($products);                 # Products of interest
+my ($muggle);                   # Not magicked?
 
 GetOptions(
@@ -62,4 +75,5 @@
            'skycell_id=s' => \$skycell_id, # Skycell identifier
            'products=s' => \$products, # Products of interest
+           'muggle'   => \$muggle, # Not magicked?
            ) or die "Unable to parse arguments.\n";
 die "Unknown option: @ARGV\n" if @ARGV;
@@ -105,5 +119,12 @@
     foreach my $product ( @products ) {
         next if (not defined $diff->{bothways} or $diff->{bothways} eq 'NULL' or not $diff->{bothways}) and $product =~ /INVERSE/;
-        copy_extension( $diff->{path_base}, ${EXTENSIONS()}{$product} );
+        my $path = $diff->{path_base};
+        if (defined $muggle and defined ${MAGIC()}{$product}) {
+            my @path = split /\//, $path;
+            my $last = pop @path;
+            push @path, "SR_$last";
+            $path = join '/', @path;
+        }
+        copy_extension( $path, ${EXTENSIONS()}{$product} );
     }
 }
