IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 12, 2006, 2:00:09 PM (20 years ago)
Author:
Paul Price
Message:

Using correct statistics: mean is mean of the background, stdev is the global stdev (\sum s_i2) / N, mean stdev is the stdev of the means.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/phase0_exp.pl

    r9502 r9524  
    100100}
    101101my @backgrounds;                # Array of backgrounds
    102 my @stdevs;                        # Array of background standard deviations\
     102my @variances;                        # Array of background standard deviations\
    103103my $obsType;                        # Observation type
    104104 
     
    124124   
    125125    my $stdev = get_value($imfile, PHASE0_BG_MEAN_STDEV());
    126     push @stdevs, $stdev;
     126    push @variances, $stdev**2;
    127127}
    128128
     
    147147        my $stats = Statistics::Descriptive::Sparse->new; # Statistics calculator
    148148        $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 )
    155151    }
    156152    {
    157153        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() );
    160156    }
    161157   
Note: See TracChangeset for help on using the changeset viewer.