Index: branches/czw_branch/20120906/ippScripts/scripts/skycell_jpeg.pl
===================================================================
--- branches/czw_branch/20120906/ippScripts/scripts/skycell_jpeg.pl	(revision 34533)
+++ branches/czw_branch/20120906/ippScripts/scripts/skycell_jpeg.pl	(revision 34628)
@@ -269,10 +269,10 @@
     my %tangents = ();
 
-    my %products = ('image' => "PPSTACK.OUTPUT",
-		    'mask'  => "PPSTACK.OUTPUT.MASK",
-		    'variance' => "PPSTACK.OUTPUT.VARIANCE",
-		    'exp'   => "PPSTACK.OUTPUT.EXP",
-		    'num'   => "PPSTACK.OUTPUT.EXPNUM",
-#		    'bkg'   => "PPSTACK.OUTPUT.BKG"
+    my %products = ('image' => "PPSTACK.UNCONV",
+		    'mask'  => "PPSTACK.UNCONV.MASK",
+		    'variance' => "PPSTACK.UNCONV.VARIANCE",
+		    'exp'   => "PPSTACK.UNCONV.EXP",
+		    'num'   => "PPSTACK.UNCONV.EXPNUM",
+		    'bkg'   => "PPSTACK.OUTPUT.BKGMODEL"
 	);
     
@@ -292,7 +292,5 @@
 	unless (exists($tangents{$projection_cell})) {
 	    # Make a temp file and fill, but be sure to save 
-	    
 	    foreach my $key (keys %products) {
-		
 		($tempFile, $tempName) = tempfile("/tmp/skycell.$projection_cell.$key.XXXX",
 						  UNLINK => !$save_temps);
@@ -321,4 +319,13 @@
 	    $command = "$ppSkycell -images $tangents{$projection_cell}{$key}{NAME}";
 	    $command .= " ${outroot}.${projection_cell}.${key} ";
+	    if ($key eq 'bkg') {
+		$command .= " -Di BIN1 1 -Di BIN2 1 ";
+	    }
+	    elsif ($key eq 'image') {
+		$command .= " -masks $tangents{$projection_cell}{mask}{NAME} ";
+	    }
+	    elsif ($key eq 'mask') { 
+		next; # This should be made with the images.
+	    }
 	    print "$command\n";
 	    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose);
