IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 3, 2021, 2:22:19 PM (5 years ago)
Author:
eugene
Message:

raise a warning, rather that fail with an error, if we cannot generate the curve of growth

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmGrowthCurveGenerate.c

    r36856 r41534  
    8787        }
    8888    }
    89     psAssert (growths->n, "cannot build growth curve (psf model is invalid everywhere)");
     89    // psAssert (growths->n, "cannot build growth curve (psf model is invalid everywhere)");
     90    // if we cannot generate a curve-of-growth, warn but do not raise an error or abort
     91    if (!growths->n) {
     92      psWarning ("cannot build growth curve (psf model is invalid everywhere)");
     93      psFree (growths);
     94      return false;
     95    }
    9096
    9197    // just use a simple sample median to get the 'best' value from each growth curve...
     
    102108    }
    103109    if (!psVectorStats (stats, values, NULL, NULL, 0)) {
    104         psError(PS_ERR_UNKNOWN, false, "failure to measure stats");
     110        // if we cannot generate a curve-of-growth, warn but do not raise an error or abort
     111        psWarning("failure to measure stats for curve of growth");
     112        psFree (growths);
     113        psFree (stats);
     114        psFree (values);
    105115        return false;
    106116    }
     
    120130        }
    121131        if (!psVectorStats (stats, values, NULL, NULL, 0)) {
    122             psError(PS_ERR_UNKNOWN, false, "failure to measure stats");
     132            // psError(PS_ERR_UNKNOWN, false, "failure to measure stats");
     133            psWarning("failure to measure stats for curve of growth");
     134            psFree (growths);
     135            psFree (stats);
     136            psFree (values);
    123137            return false;
    124138        }
     
    290304        } else {
    291305            if (!psVectorStats (stats, values, NULL, NULL, 0)) {
    292                 psError(PS_ERR_UNKNOWN, false, "failure to measure stats");
     306                // psError(PS_ERR_UNKNOWN, false, "failure to measure stats");
     307                psWarning("failure to measure stats for curve of growth (from sources)");
     308                psFree (growths);
     309                psFree (stats);
     310                psFree (values);
    293311                return false;
    294312            }
Note: See TracChangeset for help on using the changeset viewer.