IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 11, 2008, 6:12:42 PM (18 years ago)
Author:
Paul Price
Message:

Correcting stack variances for the imperfect convolution. Changed (again) the way the deviations are calculated; they're now straight chi2, which allows us to estimate how the variance factor needs to be changed in order to correct for it. Moving additional values into pmSubtractionKernels so that this can be calculated from a kernel that has been read in (very useful for debugging, also nice to have a record of the quality of the fit).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmSubtractionMatch.c

    r19482 r19532  
    370370            memCheck("kernels");
    371371
    372             float rmsStamps = NAN;      // RMS for stamps
    373             int numStamps = 0;          // Number of good stamps
    374372            int numRejected = -1;       // Number of rejected stamps in each iteration
    375373            for (int k = 0; k < iter && numRejected != 0; k++) {
     
    407405
    408406                psTrace("psModules.imcombine", 3, "Rejecting stamps...\n");
    409                 numRejected = pmSubtractionRejectStamps(&rmsStamps, &numStamps, stamps, deviations,
    410                                                         subMask, rej, footprint);
     407                numRejected = pmSubtractionRejectStamps(kernels, stamps, deviations, subMask, rej, footprint);
    411408                if (numRejected < 0) {
    412409                    psError(PS_ERR_UNKNOWN, false, "Unable to reject stamps.");
     
    430427                    goto MATCH_ERROR;
    431428                }
    432                 pmSubtractionRejectStamps(&rmsStamps, &numStamps, stamps, deviations,
    433                                           subMask, NAN, footprint);
     429                pmSubtractionRejectStamps(kernels, stamps, deviations, subMask, NAN, footprint);
    434430                psFree(deviations);
    435431            }
    436432            psFree(stamps);
    437433            stamps = NULL;
    438 
    439             if (subMode == PM_SUBTRACTION_MODE_1 || subMode == PM_SUBTRACTION_MODE_DUAL) {
    440                 psMetadataAddS32(conv1->analysis, PS_LIST_TAIL, PM_SUBTRACTION_ANALYSIS_STAMPS_NUM,
    441                                  PS_META_DUPLICATE_OK, "Number of good stamps", numStamps);
    442                 psMetadataAddF32(conv1->analysis, PS_LIST_TAIL, PM_SUBTRACTION_ANALYSIS_STAMPS_RMS,
    443                                  PS_META_DUPLICATE_OK, "RMS deviation of stamps", rmsStamps);
    444             }
    445             if (subMode == PM_SUBTRACTION_MODE_2 || subMode == PM_SUBTRACTION_MODE_DUAL) {
    446                 psMetadataAddS32(conv2->analysis, PS_LIST_TAIL, PM_SUBTRACTION_ANALYSIS_STAMPS_NUM,
    447                                  PS_META_DUPLICATE_OK, "Number of good stamps", numStamps);
    448                 psMetadataAddF32(conv2->analysis, PS_LIST_TAIL, PM_SUBTRACTION_ANALYSIS_STAMPS_RMS,
    449                                  PS_META_DUPLICATE_OK, "RMS deviation of stamps", rmsStamps);
    450             }
    451434
    452435            memCheck("solution");
Note: See TracChangeset for help on using the changeset viewer.