Index: trunk/ippScripts/scripts/detrend_reject_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_reject_imfile.pl	(revision 9446)
+++ trunk/ippScripts/scripts/detrend_reject_imfile.pl	(revision 9447)
@@ -122,5 +122,6 @@
     print $list2File File::Spec->rel2abs( $file->{b2_uri}, $ipprc->workdir() ) . "\n";
     push @means, $file->{bg};
-    push @stdevs, $file->{bg_stdev};
+    ## calculate the root-mean-square of the bd_stdevs
+    push @stdevs, $file->{bg_stdev}*$file->{bg_stdev};
 }
 close $list1File;
@@ -192,5 +193,5 @@
     $stdev = 0;
 }
-my $meanStdev = $stdevStats->mean(); # Mean of the sample of stdevs
+my $meanStdev = sqrt($stdevStats->mean()); # Root-Mean-Square of the sample of stdevs
 if (defined REJECT_SAMPLE_MEAN->{$det_type} and
     $stdev != 0 and
