Index: trunk/ippScripts/scripts/detrend_process_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 10700)
+++ trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 11297)
@@ -19,9 +19,10 @@
 use Pod::Usage qw( pod2usage );
 
-my ($det_id, $exp_tag, $camera, $no_update);
+my ($det_id, $exp_tag, $camera, $dbname, $no_update);
 GetOptions(
     'det_id|d=s'        => \$det_id,
     'exp_tag|e=s'       => \$exp_tag,
     'camera|c=s'        => \$camera,
+    'dbname|d=s'        => \$dbname, # Database name
     'no-update'         => \$no_update
 ) or pod2usage( 2 );
@@ -53,4 +54,5 @@
 {
     my $command = "$dettool -processedimfile -det_id $det_id -exp_tag $exp_tag"; # Command to run
+    $command .= " -dbname $dbname" if defined $dbname;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run(command => $command, verbose => 1);
@@ -139,4 +141,5 @@
 	"-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $jpeg1 -b2_uri $jpeg2 " .
 	"-bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev"; # Command to run
+    $command .= " -dbname $dbname" if defined $dbname;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run(command => $command, verbose => 1);
