IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 9, 2008, 10:40:17 AM (18 years ago)
Author:
Paul Price
Message:

Wasn't using variance factors when comparing 2 values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_080908/psModules/src/imcombine/pmStack.c

    r19336 r19439  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2008-09-03 19:42:54 $
     10 *  @version $Revision: 1.38.2.1 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2008-09-09 20:40:17 $
    1212 *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
    1313 *
     
    309309              }
    310310          }
    311           if (useVariance && safe && numIter > 0) {
     311          if (useVariance && numIter > 0) {
    312312              // Use variance to check that the two are consistent
    313313              float diff = pixelData->data.F32[0] - pixelData->data.F32[1];
    314               float sigma2 = pixelVariances->data.F32[0] + pixelVariances->data.F32[1];
     314              float sigma2 = pixelVariances->data.F32[0] * varFactors->data.F32[0] +
     315                  pixelVariances->data.F32[1] * varFactors->data.F32[1];
    315316              if (PS_SQR(diff) > PS_SQR(rej) * sigma2) {
    316317                  // Not consistent: mark both for inspection
     
    354355              float median, stdev;    // Median and stdev of the combination, for rejection
    355356
    356               if (!combinationMedianStdev(&median, useVariance ? NULL : &stdev, pixelData, pixelMasks, sort)) {
     357              if (!combinationMedianStdev(&median, useVariance ? NULL : &stdev,
     358                                          pixelData, pixelMasks, sort)) {
    357359                  psWarning("Bad median/stdev at %d,%d", x, y);
    358360                  break;
Note: See TracChangeset for help on using the changeset viewer.