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/pmSubtraction.c

    r19482 r19532  
    665665
    666666
    667 int pmSubtractionRejectStamps(float *rmsPtr, int *numPtr, pmSubtractionStampList *stamps,
    668                               const psVector *deviations, psImage *subMask, float sigmaRej,
    669                               int footprint)
    670 {
     667int pmSubtractionRejectStamps(pmSubtractionKernels *kernels, pmSubtractionStampList *stamps,
     668                              const psVector *deviations, psImage *subMask, float sigmaRej, int footprint)
     669{
     670    PM_ASSERT_SUBTRACTION_KERNELS_NON_NULL(kernels, false);
    671671    PM_ASSERT_SUBTRACTION_STAMP_LIST_NON_NULL(stamps, -1);
    672672    PS_ASSERT_VECTOR_NON_NULL(deviations, -1);
     
    678678    // the distribution is actually something like a chi^2 or Student's t, both of which become Gaussian-like
    679679    // with large N.  Therefore, let's just treat this as a Gaussian distribution.
     680
     681    kernels->mean = NAN;
     682    kernels->rms = NAN;
     683    kernels->numStamps = -1;
    680684
    681685    int numStamps = 0;                  // Number of used stamps
     
    721725    psTrace("psModules.imcombine", 1, "RMS deviation: %f\n", rms);
    722726
    723     if (rmsPtr) {
    724         *rmsPtr = rms;
    725     }
    726     if (numPtr) {
    727         *numPtr = numStamps;
    728     }
    729 
    730     psLogMsg("psModules.imcombine", PS_LOG_INFO, "RMS deviation from %d stamps: %lf", numStamps, rms);
     727    kernels->mean = mean;
     728    kernels->rms = rms;
     729    kernels->numStamps = numStamps;
     730
     731    psLogMsg("psModules.imcombine", PS_LOG_INFO, "Mean deviation from %d stamps: %lf +/- %lf",
     732             numStamps, mean, rms);
    731733
    732734    if (!isfinite(sigmaRej) || sigmaRej <= 0.0) {
    733         // User just wanted to calculate and record the RMS for posterity
     735        // User just wanted to calculate and record the deviation for posterity
    734736        return 0;
    735737    }
Note: See TracChangeset for help on using the changeset viewer.