IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 12, 2008, 4:59:10 PM (18 years ago)
Author:
Paul Price
Message:

Can't figure out why the weightings which are being placed on readout->analysis aren't getting to the combination stage, so I'm putting them in a vector and passing them explicitly.

File:
1 edited

Legend:

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

    r20659 r20711  
    444444    psVector *matchChi2 = psVectorAlloc(num, PS_TYPE_F32); // chi^2 for stamps when matching
    445445    psVectorInit(matchChi2, NAN);
     446    psVector *weightings = psVectorAlloc(num, PS_TYPE_F32); // Combination weightings for images (1/noise^2)
     447    psVectorInit(weightings, NAN);
    446448    for (int i = 0; i < num; i++) {
    447449        psTrace("ppStack", 2, "Convolving input %d of %d to target PSF....\n", i, num);
     
    482484        psArray *sources = haveSources ? globalSources : indSources->data[i]; // Sources for matching
    483485        psTimerStart("PPSTACK_MATCH");
    484         if (!ppStackMatch(readout, &regions, &kernels, &matchChi2->data.F32[i],
     486        if (!ppStackMatch(readout, &regions, &kernels, &matchChi2->data.F32[i], &weightings->data.F32[i],
    485487                          sources, targetPSF, rng, config)) {
    486488            psErrorStackPrint(stderr, "Unable to match image %d --- ignoring.", i);
     
    718720            psArrayAdd(job->args, 1, subRegions);
    719721            psArrayAdd(job->args, 1, subKernels);
     722            psArrayAdd(job->args, 1, weightings);
    720723            psArrayAdd(job->args, 1, matchChi2);
    721724            if (!psThreadJobAddPending(job)) {
     
    725728                psFree(stack);
    726729                psFree(inputMask);
     730                psFree(weightings);
    727731                psFree(matchChi2);
    728732                psFree(view);
     
    961965            psArrayAdd(job->args, 1, outRO);
    962966            psArrayAdd(job->args, 1, rejected);
     967            psArrayAdd(job->args, 1, weightings);
    963968            if (!psThreadJobAddPending(job)) {
    964969                psFree(job);
Note: See TracChangeset for help on using the changeset viewer.