IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2845


Ignore:
Timestamp:
Dec 29, 2004, 11:18:33 AM (22 years ago)
Author:
gusciora
Message:

Improving the tests and error condition code.

Location:
trunk/psModules/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/pmSubtractBias.c

    r2842 r2845  
    66 *  @author George Gusciora, MHPCC
    77 *
    8  *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-12-29 02:52:51 $
     8 *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-12-29 21:18:33 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    161161            "---- ScaleOverscanVector() begin ----\n");
    162162
     163    printf("HMMM: fit is %d\n", fit);
     164
    163165    if (NULL == overscanVector) {
    164166        return(overscanVector);
    165167    }
    166168
     169    // Allocate the new vector.
    167170    psVector *newVec = psVectorAlloc(n, PS_TYPE_F32);
     171
     172    //
     173    // If the new vector is the same size as the old, simply copy the data.
     174    if (n == overscanVector->n) {
     175        for (psS32 i = 0 ; i < n ; i++) {
     176            newVec->data.F32[i] = overscanVector->data.F32[i];
     177        }
     178        return(newVec);
     179    }
    168180    psPolynomial1D *myPoly;
    169181    psSpline1D *mySpline;
     
    220232    if ((overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)) {
    221233        psError(PS_ERR_UNKNOWN,true, "(overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)\n");
     234        return(in);
     235    }
     236    if ((fit != PM_OVERSCAN_NONE) &&
     237            (fit != PM_OVERSCAN_ROWS) &&
     238            (fit != PM_OVERSCAN_COLUMNS) &&
     239            (fit != PM_OVERSCAN_ALL)) {
     240        psError(PS_ERR_UNKNOWN, true, "fit is unallowable (%d)\n", fit);
     241        return(in);
     242    }
     243    if ((overScanAxis != PM_OVERSCAN_NONE) &&
     244            (overScanAxis != PM_OVERSCAN_ROWS) &&
     245            (overScanAxis != PM_OVERSCAN_COLUMNS) &&
     246            (overScanAxis != PM_OVERSCAN_ALL)) {
     247        psError(PS_ERR_UNKNOWN, true, "overScanAxis is unallowable (%d)\n", overScanAxis);
    222248        return(in);
    223249    }
  • trunk/psModules/src/pmSubtractSky.c

    r2838 r2845  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-12-28 19:04:29 $
     8 *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-12-29 21:18:33 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    423423    psTrace(".psModule.pmSubtractSky", 4,
    424424            "---- pmSubtractSky() begin ----\n");
     425    if ((fit != PM_FIT_NONE) &&
     426            (fit != PM_FIT_POLYNOMIAL) &&
     427            (fit != PM_FIT_SPLINE)) {
     428        psError(PS_ERR_UNKNOWN, true, "psFit is unallowable (%d)\n", fit);
     429        return(in);
     430    }
     431
    425432    psStatsOptions statOptions = 0;
    426433
Note: See TracChangeset for help on using the changeset viewer.