IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19966


Ignore:
Timestamp:
Oct 7, 2008, 2:52:13 PM (18 years ago)
Author:
Paul Price
Message:

value = sqrt(value) is not good when value is undefined.
I think RMS should be robust stdev, not robust median.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStats/src/ppStatsFromMetadataStats.c

    r19965 r19966  
    22
    33// calculate the stats for the non-constant entries (already calculated)
    4 bool ppStatsFromMetadataStats(psArray *entries) {
    5 
     4bool ppStatsFromMetadataStats(psArray *entries)
     5{
    66    for (int i = 0; i < entries->n; i++) {
    77        ppStatsEntry *entry = entries->data[i];
     
    1818        psStatsOptions option;
    1919        if (!strcasecmp (entry->statistic, "RMS")) {
    20             option = psStatsOptionFromString ("ROBUST_MEDIAN");
     20            option = psStatsOptionFromString ("ROBUST_STDEV");
    2121        } else if (!strcasecmp (entry->statistic, "SUM")) {
    2222            option = psStatsOptionFromString ("SAMPLE_MEAN");
     
    3535        double value;
    3636        if (!strcasecmp (entry->statistic, "RMS")) {
    37             value = sqrt(value);
     37            value = stats->robustStdev;
    3838        } else if (!strcasecmp (entry->statistic, "SUM")) {
    3939            value = stats->sampleMean * entry->vector->n;
Note: See TracChangeset for help on using the changeset viewer.