IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19357


Ignore:
Timestamp:
Sep 4, 2008, 1:56:52 PM (18 years ago)
Author:
Paul Price
Message:

Always record the RMS.

File:
1 edited

Legend:

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

    r19344 r19357  
    446446
    447447    // Get bounds of threshold region
    448     // Start with the entire kernel, and keep reducing the size of the box until it drops below threshold
    449     int box = kernels->size;                    // Size of box with bad pixels
    450     for (double sumBox = sumKernel2; box > 0; box--) {
     448    // Start with the entire kernel, and keep reducing the size of the box until it sum goes above threshold
     449    int box = kernels->size;            // Size of box with bad pixels
     450    for (double sumBox = 0.0; sumBox < threshold && box > 0; box--) {
    451451        for (int x = -box; x <= box; x++) {
    452             sumBox -= PS_SQR(kernel->kernel[-box][x]) + PS_SQR(kernel->kernel[box][x]);
     452            sumBox += PS_SQR(kernel->kernel[-box][x]) + PS_SQR(kernel->kernel[box][x]);
    453453        }
    454454        for (int y = -box + 1; y <= box - 1; y++) {
    455455            // Note: not doing corners
    456             sumBox -= PS_SQR(kernel->kernel[y][-box]) + PS_SQR(kernel->kernel[y][box]);
    457         }
    458         if (sumBox < threshold) {
    459             break;
     456            sumBox += PS_SQR(kernel->kernel[y][-box]) + PS_SQR(kernel->kernel[y][box]);
    460457        }
    461458    }
     
    731728    }
    732729
     730    psLogMsg("psModules.imcombine", PS_LOG_INFO, "RMS deviation from %d stamps: %lf", numStamps, rms);
     731
    733732    if (!isfinite(sigmaRej) || sigmaRej <= 0.0) {
    734733        // User just wanted to calculate and record the RMS for posterity
    735         psLogMsg("psModules.imcombine", PS_LOG_INFO, "RMS deviation from %d stamps: %lf",
    736                  numStamps, rms);
    737734        return 0;
    738735    }
Note: See TracChangeset for help on using the changeset viewer.