Index: trunk/ippScripts/scripts/diff_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/diff_skycell.pl	(revision 19396)
+++ trunk/ippScripts/scripts/diff_skycell.pl	(revision 19461)
@@ -25,8 +25,9 @@
 use Pod::Usage qw( pod2usage );
 
-my ($diff_id, $dbname, $outroot, $verbose, $no_update, $no_op);
+my ($diff_id, $dbname, $threads, $outroot, $verbose, $no_update, $no_op);
 GetOptions(
     'diff_id|d=s'       => \$diff_id, # Diff identifier
     'dbname|d=s'        => \$dbname, # Database name
+    'threads=d'         => \$threads,   # Number of threads to use
     'outroot=s'         => \$outroot, # Output root name
     'verbose'           => \$verbose,   # Print to stdout
@@ -100,5 +101,5 @@
             $templateWeight = "PPSTACK.OUTPUT.WEIGHT";
             $templateSources = "PSPHOT.OUT.CMF.MEF";  ## this must be consistent with the value in stack_skycell.pl:161
-	    ## use an explicit stack name for psphot output objects
+            ## use an explicit stack name for psphot output objects
         } else {
             $templateMask = "PSWARP.OUTPUT.MASK";
@@ -192,4 +193,5 @@
     $command .= " -refweight $templateWeight";
     $command .= " -stats $outputStats";
+    $command .= " -threads $threads" if defined $threads;
     $command .= " -recipe PPSTATS WARPSTATS";
     $command .= " -F PSPHOT.OUTPUT PSPHOT.OUT.CMF.MEF";
