Index: trunk/ippScripts/scripts/detrend_resid.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_resid.pl	(revision 9095)
+++ trunk/ippScripts/scripts/detrend_resid.pl	(revision 9097)
@@ -15,10 +15,10 @@
 use Pod::Usage qw( pod2usage );
 
-my ($det_id, $iter, $exp_id, $class_id, $det_type, $detrend,
+my ($det_id, $iter, $exp_tag, $class_id, $det_type, $detrend,
         $input_uri, $no_update);
 GetOptions(
     'det_id|d=s'        => \$det_id,
     'iteration=s'       => \$iter,
-    'exp_id|e=s'        => \$exp_id,
+    'exp_tag|e=s'        => \$exp_tag,
     'class_id|i=s'      => \$class_id,
     'det_type|t=s'      => \$det_type,
@@ -30,9 +30,9 @@
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
 pod2usage(
-    -msg => "Required options: --det_id --iteration --exp_id --class_id --det_type --detrend --input_uri",
+    -msg => "Required options: --det_id --iteration --exp_tag --class_id --det_type --detrend --input_uri",
     -exitval => 3,
 ) unless defined $det_id
     and defined $iter
-    and defined $exp_id
+    and defined $exp_tag
     and defined $class_id
     and defined $det_type
@@ -71,5 +71,5 @@
 
 ### Output file names --- must match camera configuration!
-my $outputRoot = $exp_id . '.detresid.' . $det_id . '.' . $iter; # Root name
+my $outputRoot = $exp_tag . '.detresid.' . $det_id . '.' . $iter; # Root name
 my $outputName = $outputRoot . '.' . $class_id . '.fits'; # Name for 
 my $outputStats = $outputRoot . '.' . $class_id . '.stats';
@@ -106,5 +106,5 @@
 # Add the processed file to the database
 unless ($no_update) {
-    my $command = "$dettool -addresidimfile -det_id $det_id -iteration $iter -exp_id $exp_id " .
+    my $command = "$dettool -addresidimfile -det_id $det_id -iteration $iter -exp_tag $exp_tag " .
 	"-class_id $class_id -recip $recipe -uri $outputName -b1_uri $bin1Name " .
 	"-b2_uri $bin2Name"; # Command to run dettool
@@ -120,5 +120,5 @@
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run(command => $command, verbose => 1);
-    die "Unable to perform dettool -addprocessed for $det_id/$exp_id/$class_id: $error_code\n"
+    die "Unable to perform dettool -addprocessed for $det_id/$exp_tag/$class_id: $error_code\n"
 	if not $success;
 }
