Changeset 9524 for trunk/ippScripts/scripts/phase0_exp.pl
- Timestamp:
- Oct 12, 2006, 2:00:09 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/phase0_exp.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/phase0_exp.pl
r9502 r9524 100 100 } 101 101 my @backgrounds; # Array of backgrounds 102 my @ stdevs; # Array of background standard deviations\102 my @variances; # Array of background standard deviations\ 103 103 my $obsType; # Observation type 104 104 … … 124 124 125 125 my $stdev = get_value($imfile, PHASE0_BG_MEAN_STDEV()); 126 push @ stdevs, $stdev;126 push @variances, $stdev**2; 127 127 } 128 128 … … 147 147 my $stats = Statistics::Descriptive::Sparse->new; # Statistics calculator 148 148 $stats->add_data(@backgrounds); 149 push @command, ( '-' . PHASE0_BG() ), $stats->mean(), ( '-' . PHASE0_BG_STDEV() ); 150 if (scalar @backgrounds == 1) { 151 push @command, 1; 152 } else { 153 push @command, $stats->standard_deviation(); 154 } 149 push @command, ( '-' . PHASE0_BG() ), $stats->mean(); 150 push @command, ( '-' . PHASE0_BG_MEAN_STDEV() ), ( $stats->standard_deviation() || 0 ) 155 151 } 156 152 { 157 153 my $stats = Statistics::Descriptive::Sparse->new; # Statistics calculator 158 $stats->add_data(@ stdevs);159 push @command, ( '-' . PHASE0_BG_ MEAN_STDEV() ), $stats->mean();154 $stats->add_data(@variances); 155 push @command, ( '-' . PHASE0_BG_STDEV() ), sqrt( $stats->mean() ); 160 156 } 161 157
Note:
See TracChangeset
for help on using the changeset viewer.
