Index: /trunk/ippScripts/scripts/detrend_norm_apply.pl
===================================================================
--- /trunk/ippScripts/scripts/detrend_norm_apply.pl	(revision 9144)
+++ /trunk/ippScripts/scripts/detrend_norm_apply.pl	(revision 9145)
@@ -56,9 +56,9 @@
 my $b1name = $outputRoot . '.' . $classId . '.b1.fits';	# Output file with binning 1
 my $b2name = $outputRoot . '.' . $classId . '.b2.fits';	# Output file with binning 2
-my $statName = $outputRoot . '.' . $classId . '.stats'; # Statistics file
+my $statsName = $outputRoot . '.' . $classId . '.stats'; # Statistics file
 
 # Run ppArith
 {
-    my $command = "$ppImage -file $input $outputRoot -norm $value -stat $statName -recipe PPIMAGE " . RECIPE(); # Command to run
+    my $command = "$ppImage -file $input $outputRoot -norm $value -stat $statsName -recipe PPIMAGE " . RECIPE(); # Command to run
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run(command => $command, verbose => 1);
@@ -67,5 +67,5 @@
     die "Can't find expected output file: $b1name\n" if not -e $b1name;
     die "Can't find expected output file: $b2name\n" if not -e $b2name;
-    die "Can't find expected output file: $statName\n" if not -e $statName;
+    die "Can't find expected output file: $statsName\n" if not -e $statsName;
 }
 
Index: /trunk/ippScripts/scripts/detrend_norm_exp.pl
===================================================================
--- /trunk/ippScripts/scripts/detrend_norm_exp.pl	(revision 9144)
+++ /trunk/ippScripts/scripts/detrend_norm_exp.pl	(revision 9145)
@@ -29,5 +29,5 @@
     -exitval => 3,
 ) unless defined $det_id
-     and defined $iteration
+     and defined $iter
      and defined $camera
      and defined $det_type;
@@ -89,5 +89,5 @@
 
 # Generate the file list, and get the statistics
-my $outputRoot = $camera . '.' . $detType . '.norm.' . $detId . '.' . $iter; # Root output name
+my $outputRoot = $camera . '.' . $det_type . '.norm.' . $det_id . '.' . $iter; # Root output name
 my $list1Name = $outputRoot . '.b1.list'; # Name for the input file list for binning 1
 my $list2Name = $outputRoot . '.b2.list'; # Name for the input file list for binning 2
Index: /trunk/ippScripts/scripts/detrend_process_exp.pl
===================================================================
--- /trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 9144)
+++ /trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 9145)
@@ -27,6 +27,5 @@
     -exitval => 3,
 ) unless defined $det_id
-     and defined $exp_tag
-     and defined $det_type;
+    and defined $exp_tag;
 
 use constant RECIPE1 => 'PPIMAGE_J1'; # Recipe to use for ppImage to make JPEGs
@@ -86,5 +85,5 @@
 
 # Generate the file list, and get the statistics
-my $outputRoot = $exp_tag . '.detproc.' . $det_id . '.' . $iter; # Root output name
+my $outputRoot = $exp_tag . '.detproc.' . $det_id; # Root output name
 my $list1Name = $outputRoot . '.b1.list'; # Name for the input file list for binning 1
 my $list2Name = $outputRoot . '.b2.list'; # Name for the input file list for binning 2
@@ -124,5 +123,5 @@
 # Add the result into the database
 unless ($no_update) {
-    my $command = "$dettool -addprocessedexp -det_id $det_id -iteration $iter -exp_tag $exp_tag " .
+    my $command = "$dettool -addprocessedexp -det_id $det_id -exp_tag $exp_tag " .
 	"-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $jpeg1Name -b2_uri $jpeg2Name " .
 	"-bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev"; # Command to run
Index: /trunk/ippScripts/scripts/detrend_stack.pl
===================================================================
--- /trunk/ippScripts/scripts/detrend_stack.pl	(revision 9144)
+++ /trunk/ippScripts/scripts/detrend_stack.pl	(revision 9145)
@@ -15,5 +15,5 @@
 use Pod::Usage qw( pod2usage );
 
-my ($det_id, $iter, $class_id, $det_type, $camera);
+my ($det_id, $iter, $class_id, $det_type, $camera, $no_update);
 GetOptions(
     'det_id|d=s'        => \$det_id,
Index: /trunk/ippScripts/scripts/phase0_exp.pl
===================================================================
--- /trunk/ippScripts/scripts/phase0_exp.pl	(revision 9144)
+++ /trunk/ippScripts/scripts/phase0_exp.pl	(revision 9145)
@@ -11,4 +11,5 @@
 
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
+use Pod::Usage qw( pod2usage );
 
 my ($exptag, $no_update);
