IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20333


Ignore:
Timestamp:
Oct 22, 2008, 12:28:44 PM (18 years ago)
Author:
Paul Price
Message:

Catch case when sumKernel = 0.

File:
1 edited

Legend:

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

    r20325 r20333  
    77 *  @author Paul Price, IfA
    88 *
    9  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2008-10-22 18:40:36 $
     9 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2008-10-22 22:28:44 $
    1111 *
    1212 *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
     
    431431        *varianceValue = sumVariance / (sumKernel2 - sumBad); \
    432432    } \
    433     if (sumBad == 0) { \
     433    if (sumKernel == 0.0) { \
     434        /* No kernel contributions */ \
     435        if (haveMask && maskValue) { \
     436            *maskValue |= interp->badMask; \
     437        } \
     438        status = PS_INTERPOLATE_STATUS_BAD; \
     439    } else if (sumBad == 0) { \
    434440        /* Completely good pixel */ \
    435441        status = PS_INTERPOLATE_STATUS_GOOD; \
Note: See TracChangeset for help on using the changeset viewer.