IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23989 for trunk/ppStats/src


Ignore:
Timestamp:
Apr 28, 2009, 11:21:56 AM (17 years ago)
Author:
eugene
Message:

always handle psVectorStats false return status (is an error); check for NAN results and handle as possible

Location:
trunk/ppStats/src
Files:
2 edited

Legend:

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

    r20888 r23989  
    3838
    3939        psStats *stats = psStatsAlloc(option);
    40         psVectorStats(stats, entry->vector, NULL, NULL, 0);
     40        if (!psVectorStats(stats, entry->vector, NULL, NULL, 0)) {
     41            psError(PS_ERR_UNKNOWN, false, "failure to measure stats for %s", entry->statistic);
     42            continue;
     43        }
    4144
    4245        double value;
  • trunk/ppStats/src/ppStatsReadout.c

    r21183 r23989  
    9292        }
    9393        if (!psVectorStats(data->stats, sampleValues, NULL, sampleMask, 1)) {
    94             psWarning("Unable to perform statistics on readout %s.\n", readoutName);
    95             psErrorClear();
    96         }
     94            psError(PS_ERR_UNKNOWN, false, "failure to measure stats for readout %s", readoutName);
     95        }
     96        // XXX raise if we get a NAN? psWarning("Unable to perform statistics on readout %s.\n", readoutName);
    9797        psFree(sampleValues);
    9898        psFree(sampleMask);
Note: See TracChangeset for help on using the changeset viewer.