IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 28, 2006, 6:38:42 PM (20 years ago)
Author:
magnier
Message:

changed return value for psVectorFit functions to bool; now using stats->option to set FitClip

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psCoord.c

    r10823 r10848  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.128 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2006-12-22 21:19:47 $
     12*  @version $Revision: 1.129 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2006-12-29 04:38:42 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    905905    }
    906906
    907     trans->x = psVectorFitPolynomial2D(trans->x, NULL, 0, xOut, NULL, xIn, yIn);
    908     trans->y = psVectorFitPolynomial2D(trans->y, NULL, 0, yOut, NULL, xIn, yIn);
     907    bool result = true;
     908    result &= psVectorFitPolynomial2D(trans->x, NULL, 0, xOut, NULL, xIn, yIn);
     909    result &= psVectorFitPolynomial2D(trans->y, NULL, 0, yOut, NULL, xIn, yIn);
    909910    psFree(xIn);
    910911    psFree(yIn);
     
    912913    psFree(yOut);
    913914
    914     if ((trans->x == NULL) || (trans->y == NULL)) {
     915    if (!result) {
    915916        psError( PS_ERR_UNKNOWN, true, "psVectorFitPolynomial2D() returned NULL: could not fit a 2-D polynomial to the data.\n");
    916917        return(false);
     
    997998    }
    998999
    999     myPT->x = psVectorFitPolynomial2D(myPT->x, NULL, 0, xOut, NULL, xIn, yIn);
    1000     myPT->y = psVectorFitPolynomial2D(myPT->y, NULL, 0, yOut, NULL, xIn, yIn);
     1000    bool result = true;
     1001    result &= psVectorFitPolynomial2D(myPT->x, NULL, 0, xOut, NULL, xIn, yIn);
     1002    result &= psVectorFitPolynomial2D(myPT->y, NULL, 0, yOut, NULL, xIn, yIn);
    10011003
    10021004    psFree(inCoord);
     
    10071009    psFree(yOut);
    10081010
    1009     if ((myPT->x == NULL) || (myPT->y == NULL)) {
     1011    if (!result) {
    10101012        psError( PS_ERR_UNKNOWN, true, "psVectorFitPolynomial2D() returned NULL: could not fit a 2-D polynomial to the data.\n");
    10111013        psFree(out);
Note: See TracChangeset for help on using the changeset viewer.