IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12691 for trunk/psLib


Ignore:
Timestamp:
Mar 29, 2007, 4:53:26 PM (19 years ago)
Author:
Paul Price
Message:

Replacing log messages with warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psStats.c

    r12608 r12691  
    1313 * use ->min and ->max (PS_STAT_USE_RANGE)
    1414 *
    15  *  @version $Revision: 1.205 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2007-03-28 00:49:13 $
     15 *  @version $Revision: 1.206 $ $Name: not supported by cvs2svn $
     16 *  @date $Date: 2007-03-30 02:53:26 $
    1717 *
    1818 *  Copyright 2006 IfA, University of Hawaii
     
    223223vectorMinMax(myVector, maskVector, maskVal, stats): calculates the minimum and maximum of the input vector.
    224224If there was a problem with the calculation, this routine sets stats->max and stats->min to NAN.  Return the
    225 number of valid values in the vector (those not masked or outside the specified range.
     225number of valid values in the vector (those not masked or outside the specified range).
    226226XXX : using the method below, with a single loop for various options
    227227      costs only a small amount and is much easier to debug. running 10000 tests
     
    393393    if (isnan(stats->sampleMean)) {
    394394        stats->sampleStdev = NAN;
    395         psLogMsg(__func__, PS_LOG_WARN, "WARNING: vectorSampleStdev(): vectorSampleMean() reported a NAN mean.\n");
     395        psWarning("WARNING: vectorSampleStdev(): vectorSampleMean() reported a NAN mean.\n");
    396396        psTrace("psLib.math", 4, "---- %s() end ----\n", __func__);
    397397        return false;
     
    429429    if (count == 0) {
    430430        stats->sampleStdev = NAN;
    431         psLogMsg(__func__, PS_LOG_WARN, "WARNING: vectorSampleStdev(): no valid psVector elements (%ld).  Setting stats->sampleStdev = NAN.\n", count);
     431        psWarning("WARNING: vectorSampleStdev(): no valid psVector elements (%ld).  Setting stats->sampleStdev = NAN.\n", count);
    432432        return false;
    433433    }
    434434    if (count == 1) {
    435435        stats->sampleStdev = 0.0;
    436         psLogMsg(__func__, PS_LOG_WARN, "WARNING: vectorSampleStdev(): only one valid psVector elements (%ld).  Setting stats->sampleStdev = 0.0.\n", count);
     436        psWarning("WARNING: vectorSampleStdev(): only one valid psVector elements (%ld).  Setting stats->sampleStdev = 0.0.\n", count);
    437437        return false;
    438438    }
     
    502502    vectorSampleMedian(myVector, tmpMask, maskVal, stats);
    503503    if (isnan(stats->sampleMedian)) {
    504         psLogMsg(__func__, PS_LOG_WARN, "Call to vectorSampleMedian returned NAN\n");
     504        psWarning("Call to vectorSampleMedian returned NAN\n");
    505505        psTrace("psLib.math", 4, "---- %s(false) end ----\n", __func__);
    506506        psFree(tmpMask);
     
    512512    vectorSampleStdev(myVector, errors, tmpMask, maskVal, stats);
    513513    if (isnan(stats->sampleStdev)) {
    514         psLogMsg(__func__, PS_LOG_WARN, "Call to vectorSampleStdev returned NAN\n");
     514        psWarning("Call to vectorSampleStdev returned NAN\n");
    515515        psTrace("psLib.math", 4, "---- %s(false) end ----\n", __func__);
    516516        psFree(tmpMask);
     
    13621362        PS_BIN_FOR_VALUE (binMin, histogram->bounds, guessMean - minFitSigma*guessStdev, 0);
    13631363        PS_BIN_FOR_VALUE (binMax, histogram->bounds, guessMean + maxFitSigma*guessStdev, 0);
    1364         if (binMin == binMax) {
    1365             psAbort ("invalid range for fitted mean");   
    1366         }
     1364        if (binMin == binMax) {
     1365            psAbort ("invalid range for fitted mean");
     1366        }
    13671367
    13681368        // search for mode (peak of histogram within range mean-2sigma - mean+2sigma
     
    15571557        // However, it is also not used anywhere, yet.
    15581558        //
    1559         psLogMsg(__func__, PS_LOG_WARN, "WARNING: vectorSmoothHistGaussian() on non-uniform histograms has not been tested or used.\n");
     1559        psWarning("WARNING: vectorSmoothHistGaussian() on non-uniform histograms has not been tested or used.\n");
    15601560
    15611561        for (long i = 0; i < numBins; i++) {
     
    19231923        psStatsOptions option = psStatsOptionFromString(statString);
    19241924        if (option == 0) {
    1925             psLogMsg(__func__, PS_LOG_WARN, "Unable to interpret statistic option: %s --- ignored.\n",
     1925            psWarning("Unable to interpret statistic option: %s --- ignored.\n",
    19261926                     statString);
    19271927            continue;
Note: See TracChangeset for help on using the changeset viewer.