IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 4, 2009, 10:24:33 AM (17 years ago)
Author:
Paul Price
Message:

Calculate covariance matrix for output.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_20090128/pswarp/src/pswarpTransformReadout.c

    r21235 r21282  
    2626    psImageMaskType maskBad  = pmConfigMaskGet("BAD.WARP", config);
    2727    psAssert(mdok, "MASK.INPUT was not defined");
     28
     29    if (!input->covariance) {
     30        input->covariance = psImageCovarianceNone();
     31    }
    2832
    2933    int nThreads = psMetadataLookupS32(&mdok, config->arguments, "NTHREADS"); // Number of threads
     
    122126    int xMin = output->image->numCols, xMax = 0, yMin = output->image->numRows, yMax = 0; // Bounds
    123127    int goodPixels = 0;                 // total number of good pixels across all tiles
     128    psList *covariances = psMetadataLookupPtr(&mdok, output->analysis,
     129                                              PSWARP_ANALYSIS_COVARIANCES); // Collection of covar. matrices
     130    if (!covariances) {
     131        covariances = psListAlloc(NULL);
     132        psMetadataAddList(output->analysis, PS_LIST_TAIL, PSWARP_ANALYSIS_COVARIANCES, 0,
     133                          "Collection of covariance matrices", covariances);
     134    }
    124135    while ((job = psThreadJobGetDone()) != NULL) {
    125136        if (job->args->n < 1) {
     
    133144            yMin = PS_MIN(args->yMin, yMin);
    134145            yMax = PS_MAX(args->yMax, yMax);
     146            if (args->covariance) {
     147                psListAdd(covariances, PS_LIST_TAIL, args->covariance);
     148            }
    135149        }
    136150        psFree(job);
Note: See TracChangeset for help on using the changeset viewer.