Index: trunk/ippScripts/scripts/detrend_process_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 18562)
+++ trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 19127)
@@ -25,5 +25,5 @@
 
 my ( $det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $outroot, $dbname, $reduction,
-     $verbose, $no_update, $no_op, $redirect );
+     $threads, $verbose, $no_update, $no_op, $redirect );
 GetOptions(
     'det_id|d=s'        => \$det_id,
@@ -37,4 +37,5 @@
     'dbname|d=s'        => \$dbname, # Database name
     'reduction=s'       => \$reduction, # Reduction class
+    'threads=s'       	=> \$threads,   # Number of threads to use for ppImage
     'verbose'           => \$verbose,   # Print to stdout
     'no-update'         => \$no_update,
@@ -107,4 +108,5 @@
     $command .= " -stats $outputStats";
     $command .= " -tracedest $traceDest -log $logDest";
+    $command .= " -threads $threads" if defined $threads;
     $command .= " -dbname $dbname" if defined $dbname;
 
