IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19487


Ignore:
Timestamp:
Sep 11, 2008, 10:52:16 AM (18 years ago)
Author:
Paul Price
Message:

Don't use variance factors.

File:
1 edited

Legend:

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

    r19482 r19487  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2008-09-11 03:37:58 $
     10 *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2008-09-11 20:52:16 $
    1212 *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
    1313 *
     
    3030#define PIXEL_LIST_BUFFER 100           // Number of entries to add to pixel list at a time
    3131#define PIXEL_MAP_BUFFER 2              // Number of entries to add to pixel map at a time
    32 
     32//#define VARIANCE_FACTORS                // Use variance factors when calculating the variances?
    3333#define NUM_DIRECT_STDEV 5              // For less than this number of values, measure stdev directly
    3434
     
    312312              // Use variance to check that the two are consistent
    313313              float diff = pixelData->data.F32[0] - pixelData->data.F32[1];
     314#if VARIANCE_FACTORS
    314315              float sigma2 = pixelVariances->data.F32[0] * varFactors->data.F32[pixelSources->data.U16[0]] +
    315316                  pixelVariances->data.F32[1] * varFactors->data.F32[pixelSources->data.U16[1]];
     317#else
     318              float sigma2 = pixelVariances->data.F32[0] + pixelVariances->data.F32[1];
     319#endif
    316320              if (PS_SQR(diff) > PS_SQR(rej) * sigma2) {
    317321                  // Not consistent: mark both for inspection
     
    342346                  float rej2 = PS_SQR(rej); // Rejection level squared
    343347                  for (int i = 0; i < num; i++) {
     348#if VARIANCE_FACTORS
    344349                      pixelVariances->data.F32[i] *= rej2 * varFactors->data.F32[pixelSources->data.U16[i]];
     350#else
     351                      pixelVariances->data.F32[i] *= rej2;
     352#endif
    345353                  }
    346354              }
Note: See TracChangeset for help on using the changeset viewer.