IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 30, 2013, 4:48:58 PM (13 years ago)
Author:
eugene
Message:

updates from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130711/ppStack/src/ppStackMatch.c

    r35455 r36071  
    467467                sum += kernels->rms;
    468468                num++;
    469                 //              psLogMsg("ppStack", PS_LOG_INFO, "KERNMATCHDUMP %d %d %g %g %g\n",
    470                 //                       index,num,kernels->mean,kernels->rms,sum);
     469                //                              psLogMsg("ppStack", PS_LOG_INFO, "KERNMATCHDUMP %d %d %g %g %g %g\n",
     470                //                                       index,num,kernels->mean,kernels->rms,sum,psImageCovarianceFactor(readout->covariance));
    471471            }
    472472            psFree(iter);
    473             options->matchChi2->data.F32[index] = sum / (psImageCovarianceFactor(readout->covariance) * num);
     473
     474            // Apply the covariance factor to the chi^2 value
     475            double covar_factor = 1.0;
     476            if (type != PM_SUBTRACTION_KERNEL_SIMPLE) { // Except if we're using simple kernels.
     477              covar_factor = psImageCovarianceFactor(readout->covariance);
     478            }
     479            options->matchChi2->data.F32[index] = sum / (covar_factor * num);
    474480
    475481        }
Note: See TracChangeset for help on using the changeset viewer.