IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroModelFitBoresite.c

    r21409 r23989  
    6262
    6363    // center (Xo) = mean(Xo), RX = range / 2
    64     psVectorStats (stats, Xo, NULL, NULL, 0);
     64    if (!psVectorStats (stats, Xo, NULL, NULL, 0)) {
     65        psError(PS_ERR_UNKNOWN, false, "failure to measure stats");
     66        return NULL;
     67    }
    6568    params->data.F32[PAR_X0] = stats->sampleMean;
    6669    params->data.F32[PAR_RX] = (stats->max - stats->min) / 2.0;
    6770
    6871    // center (Yo) = mean(Yo), RY = range / 2
    69     psVectorStats (stats, Yo, NULL, NULL, 0);
     72    if (!psVectorStats (stats, Yo, NULL, NULL, 0)) {
     73        psError(PS_ERR_UNKNOWN, false, "failure to measure stats");
     74        return NULL;
     75    }
    7076    params->data.F32[PAR_Y0] = stats->sampleMean;
    7177    params->data.F32[PAR_RY] = (stats->max - stats->min) / 2.0;
Note: See TracChangeset for help on using the changeset viewer.