IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23767


Ignore:
Timestamp:
Apr 9, 2009, 9:50:48 AM (17 years ago)
Author:
Paul Price
Message:

Covariance matrices should be averaged (otherwise, central value is N instead of 1, but stacking the covariance matrices shouldn't change the scale of the variance). Also, this operation should be done after the final rejection of images, not before (or images that weren't rejected might be included when they shouldn't be).

Location:
trunk/ppStack/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackCombineFinal.c

    r23341 r23767  
    4747    }
    4848
     49    // Sum covariance matrices
     50    for (int i = 0; i < options->num; i++) {
     51        if (options->inputMask->data.U8[i]) {
     52            psFree(options->covariances->data[i]);
     53            options->covariances->data[i] = NULL;
     54        }
     55    }
     56    options->outRO->covariance = psImageCovarianceAverage(options->covariances);
     57    psFree(options->covariances); options->covariances = NULL;
     58
    4959#ifdef TESTING
    5060    pmStackVisualPlotTestImage(outRO->image, "combined_initial.fits");
  • trunk/ppStack/src/ppStackCombineInitial.c

    r23576 r23767  
    8787#endif
    8888
    89     // Sum covariance matrices
    90     for (int i = 0; i < options->num; i++) {
    91         if (options->inputMask->data.U8[i]) {
    92             psFree(options->covariances->data[i]);
    93             options->covariances->data[i] = NULL;
    94         }
    95     }
    96     options->outRO->covariance = psImageCovarianceSum(options->covariances);
    97     psFree(options->covariances); options->covariances = NULL;
    9889    psFree(options->matchChi2); options->matchChi2 = NULL;
    9990
Note: See TracChangeset for help on using the changeset viewer.