IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21332


Ignore:
Timestamp:
Feb 5, 2009, 11:31:31 AM (17 years ago)
Author:
Paul Price
Message:

Get variance factor from covariance matrix, and use it. Don't use the chi2 "additional variance".

File:
1 edited

Legend:

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

    r21211 r21332  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.46.2.1 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2009-01-29 00:33:51 $
     10 *  @version $Revision: 1.46.2.2 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2009-02-05 21:31:31 $
    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 //#define VARIANCE_FACTORS                // Use variance factors when calculating the variances?
     32#define VARIANCE_FACTORS                // Use variance factors when calculating the variances?
     33//#define ADD_VARIANCE                  // Allow additional variance (besides variance factor)?
    3334#define NUM_DIRECT_STDEV 5              // For less than this number of values, measure stdev directly
    3435
     
    606607        weights->data.F32[i] = data->weight;
    607608        stack->data[i] = psMemIncrRefCounter(data->readout);
    608         // Variance factor
    609         float vf = psMetadataLookupF32(NULL, data->readout->parent->concepts, "CELL.VARFACTOR"); // Var factor
    610         if (!isfinite(vf)) {
    611             psWarning("Non-finite CELL.VARFACTOR for image %d --- setting to unity.", i);
    612             vf = 1.0;
    613         }
    614         varFactors->data.F32[i] = vf;
     609        varFactors->data.F32[i] = data->readout->covariance ?
     610            psImageCovarianceFactor(data->readout->covariance) : 1.0;
     611#if 0
    615612        if (isfinite(data->addVariance)) {
    616613            varFactors->data.F32[i] *= data->addVariance;
    617614        }
     615#endif
    618616        if (!haveRejects && !data->inspect) {
    619617            data->inspect = psPixelsAllocEmpty(PIXEL_LIST_BUFFER);
Note: See TracChangeset for help on using the changeset viewer.