Index: trunk/ippScripts/scripts/detrend_process_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 10742)
+++ trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 11297)
@@ -18,5 +18,5 @@
 use Pod::Usage qw( pod2usage );
 
-my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $camera, $no_update);
+my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $camera, $bdname, $no_update);
 GetOptions(
     'det_id|d=s'        => \$det_id,
@@ -26,4 +26,5 @@
     'input_uri|u=s'     => \$input_uri,
     'camera|c=s'        => \$camera,
+    'dbname|d=s'        => \$dbname, # Database name
     'no-update'         => \$no_update
 ) or pod2usage( 2 );
@@ -122,4 +123,5 @@
     }
     $command .= " -bg_mean_stdev " . $stats->bg_mean_stdev();
+    $command .= " -dbname $dbname" if defined $dbname;
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
