Index: trunk/ippScripts/scripts/ipp_serial_detrend.pl
===================================================================
--- trunk/ippScripts/scripts/ipp_serial_detrend.pl	(revision 14407)
+++ trunk/ippScripts/scripts/ipp_serial_detrend.pl	(revision 14411)
@@ -40,5 +40,5 @@
 # Process raw imfiles
 {
-    my $command = "$dettool -toprocessedimfile";
+    my $command = "$dettool -toprocessedimfile -dbname $dbname";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run( command => $command, verbose => 1 );
@@ -84,5 +84,5 @@
 # Process raw exposures
 {
-    my $command = "$dettool -toprocessedexp";
+    my $command = "$dettool -toprocessedexp -dbname $dbname";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run( command => $command, verbose => 1 );
@@ -109,5 +109,5 @@
 # Stack
 {
-    my $command = "$dettool -tostacked";
+    my $command = "$dettool -tostacked -dbname $dbname";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run( command => $command, verbose => 1 );
@@ -136,5 +136,5 @@
 # Calculate normalisation
 {
-    my $command = "$dettool -tonormalizedstat";
+    my $command = "$dettool -tonormalizedstat -dbname $dbname";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run( command => $command, verbose => 1 );
@@ -159,5 +159,5 @@
 # Apply normalisation
 {
-    my $command = "$dettool -tonormalize";
+    my $command = "$dettool -tonormalize -dbname $dbname";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run( command => $command, verbose => 1 );
@@ -186,5 +186,5 @@
 # Examine normalised exposure
 {
-    my $command = "$dettool -tonormalizedexp";
+    my $command = "$dettool -tonormalizedexp -dbname $dbname";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run( command => $command, verbose => 1 );
@@ -213,5 +213,5 @@
 # Get residuals
 {
-    my $command = "$dettool -toresidimfile";
+    my $command = "$dettool -toresidimfile -dbname $dbname";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run( command => $command, verbose => 1 );
@@ -262,5 +262,5 @@
 # Reject based on imfiles
 {
-    my $command = "$dettool -toresidexp";
+    my $command = "$dettool -toresidexp -dbname $dbname";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run( command => $command, verbose => 1 );
@@ -288,5 +288,5 @@
 # Reject based on exposures
 {
-    my $command = "$dettool -residdetrun";
+    my $command = "$dettool -residdetrun -dbname $dbname";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run( command => $command, verbose => 1 );
