IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 14, 2008, 5:09:34 PM (17 years ago)
Author:
Paul Price
Message:

Catch sumKernel=0 to prevent FPE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageInterpolate.c

    r20333 r20758  
    77 *  @author Paul Price, IfA
    88 *
    9  *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2008-10-22 22:28:44 $
     9 *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2008-11-15 03:09:34 $
    1111 *
    1212 *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
     
    427427#define INTERPOLATE_RESULT() \
    428428    psImageInterpolateStatus status = PS_INTERPOLATE_STATUS_ERROR; /* Status of interpolation */ \
    429     *imageValue = sumImage / sumKernel; \
     429    *imageValue = sumKernel > 0 ? sumImage / sumKernel : interp->badImage; \
    430430    if (wantVariance) { \
    431431        *varianceValue = sumVariance / (sumKernel2 - sumBad); \
Note: See TracChangeset for help on using the changeset viewer.