Index: /trunk/ippScripts/scripts/ipp_serial_detrend.pl
===================================================================
--- /trunk/ippScripts/scripts/ipp_serial_detrend.pl	(revision 12663)
+++ /trunk/ippScripts/scripts/ipp_serial_detrend.pl	(revision 12664)
@@ -12,9 +12,7 @@
 
 my ($dbname,			# Database name to use
-    $workdir,			# Working directory
     );
 GetOptions(
 	   'dbname|d=s'  => \$dbname,
-	   'workdir|w=s' => \$workdir,
 ) or pod2usage( 2 );
 
@@ -94,4 +92,5 @@
 	my $det_id = $item->{det_id};
 	my $det_type = $item->{det_type};
+	my $workdir = $item->{workdir};
 
 	my $command = "$detrend_process_exp --det_id $det_id --det_type $det_type --exp_tag $exp_tag --camera $camera --dbname $dbname";
@@ -118,4 +117,5 @@
 	my $det_type = $item->{det_type};
 	my $camera = $item->{camera};
+	my $workdir = $item->{workdir};
 
 	my $command = "$detrend_stack --det_id $det_id --iteration $iteration --class_id $class_id --det_type $det_type --camera $camera --dbname $dbname";
@@ -140,4 +140,5 @@
 	my $iteration = $item->{iteration};
 	my $det_type = $item->{det_type};
+	my $workdir = $item->{workdir};
 
 	my $command = "$detrend_norm_calc --det_id $det_id --iteration $iteration --det_type $det_type --dbname $dbname";
@@ -166,4 +167,5 @@
 	my $uri = $item->{uri};
 	my $camera = $item->{camera};
+	my $workdir = $item->{workdir};
 
 	my $command = "$detrend_norm_apply --det_id $det_id --iteration $iteration --class_id $class_id --value $value --input_uri $uri --camera $camera --det_type $det_type --dbname $dbname";
@@ -192,4 +194,5 @@
 	my $uri = $item->{uri};
 	my $camera = $item->{camera};
+	my $workdir = $item->{workdir};
 
 	my $command = "$detrend_norm_exp --det_id $det_id --iteration $iteration --camera $camera --det_type $det_type --dbname $dbname";
@@ -230,4 +233,5 @@
 		my $uri = $item->{uri};
 		my $mode = $item->{mode};
+		my $workdir = $item->{workdir};
 
 		my $command = "$detrend_resid --det_id $det_id --iteration $iteration --exp_tag $exp_tag --class_id $class_id --det_type $det_type --camera $camera --input_uri $uri --mode $mode --dbname $dbname";
@@ -261,4 +265,5 @@
 	my $iteration = $item->{iteration};
 	my $det_type = $item->{det_type};
+	my $workdir = $item->{workdir};
 
 	my $command = "$detrend_reject_imfile --det_id $det_id --iteration $iteration --exp_tag $exp_tag --det_type $det_type --camera $camera --dbname $dbname";
@@ -284,4 +289,5 @@
 	my $iteration = $item->{iteration};
 	my $det_type = $item->{det_type};
+	my $workdir = $item->{workdir};
 
 	my $command = "$detrend_reject_exp --det_id $det_id --iteration $iteration --det_type $det_type --camera $camera --dbname $dbname";
