Index: trunk/ippScripts/scripts/ipp_serial_detrend.pl
===================================================================
--- trunk/ippScripts/scripts/ipp_serial_detrend.pl	(revision 12800)
+++ trunk/ippScripts/scripts/ipp_serial_detrend.pl	(revision 13937)
@@ -65,6 +65,8 @@
 		my $camera = $item->{camera};
 		my $workdir = $item->{workdir};
-		
+		my $reduction = $item->{reduction};
+
 		my $command = "$detrend_process_imfile --det_id $det_id --exp_tag $exp_tag --class_id $class_id --det_type $det_type --input_uri $uri --camera $camera --dbname $dbname";
+		$command .= " --reduction $reduction" if defined $reduction;
 		$command .= " --workdir $workdir" if defined $workdir;
 		my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
@@ -119,6 +121,8 @@
 	my $camera = $item->{camera};
 	my $workdir = $item->{workdir};
+	my $reduction = $item->{reduction};
 
 	my $command = "$detrend_stack --det_id $det_id --iteration $iteration --class_id $class_id --det_type $det_type --camera $camera --dbname $dbname";
+	$command .= " --reduction $reduction" if defined $reduction;
 	$command .= " --workdir $workdir" if defined $workdir;
     	my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
@@ -235,6 +239,8 @@
 		my $mode = $item->{mode};
 		my $workdir = $item->{workdir};
+		my $reduction = $item->{reduction};
 
 		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";
+		$command .= " --reduction $reduction" if defined $reduction;
 		$command .= " --detrend $detrend" if defined $detrend;
 		$command .= " --workdir $workdir" if defined $workdir;
