Index: /branches/pap_branch_080320/ippScripts/scripts/detrend_stack.pl
===================================================================
--- /branches/pap_branch_080320/ippScripts/scripts/detrend_stack.pl	(revision 17207)
+++ /branches/pap_branch_080320/ippScripts/scripts/detrend_stack.pl	(revision 17208)
@@ -74,8 +74,7 @@
    [   
        #          KEYWORD                 STATISTIC          CHIPTOOL FLAG
-       { name => "bg",             type => "mean",  flag => "-bg",             dtype => "float" },
-       { name => "bg",             type => "stdev", flag => "-bg_mean_stdev",  dtype => "float" },
-       { name => "bg_stdev",       type => "rms",   flag => "-bg_stdev",       dtype => "float" },
-       # { name => "bg_mean_stdev",  type => "rms",   flag => "-bg_mean_stdev" },
+       { name => "ROBUST_MEDIAN",  type => "mean",  flag => "-bg",             dtype => "float" },
+       { name => "ROBUST_MEDIAN",  type => "stdev", flag => "-bg_mean_stdev",  dtype => "float" },
+       { name => "ROBUST_STDEV",   type => "rms",   flag => "-bg_stdev",       dtype => "float" },
    ];
 my $stats = PS::IPP::Metadata::Stats->new($STATS); # Stats parser
@@ -179,6 +178,5 @@
 # Stack the files
 unless ($no_op) {
-    
-    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run(command => $command, verbose => $verbose);
     unless ($success) {
