IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 25, 2008, 4:06:44 PM (18 years ago)
Author:
Paul Price
Message:

Avoiding use of sqrt.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmStack.c

    r18182 r19207  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2008-06-19 01:59:59 $
     10 *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2008-08-26 02:06:44 $
    1212 *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
    1313 *
     
    316316              // Use variance to check that the two are consistent
    317317              float diff = pixelData->data.F32[0] - pixelData->data.F32[1];
    318               float sigma = sqrtf(pixelVariances->data.F32[0] + pixelVariances->data.F32[1]);
    319               if (fabs(diff) > rej * sigma) {
     318              float sigma2 = pixelVariances->data.F32[0] + pixelVariances->data.F32[1];
     319              if (PS_SQR(diff) > PS_SQR(rej) * sigma2) {
    320320                  // Not consistent: mark both for inspection
    321321                  combineInspect(inputs, x, y, pixelSources->data.U16[0]);
Note: See TracChangeset for help on using the changeset viewer.