IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 23, 2008, 2:40:16 PM (18 years ago)
Author:
Paul Price
Message:

Adding additional analysis metadata.

File:
1 edited

Legend:

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

    r17496 r17783  
    44 *  @author GLG, MHPCC
    55 *
    6  *  @version $Revision: 1.90 $ $Name: not supported by cvs2svn $
    7  *  @date $Date: 2008-05-01 19:20:51 $
     6 *  @version $Revision: 1.91 $ $Name: not supported by cvs2svn $
     7 *  @date $Date: 2008-05-24 00:40:16 $
    88 *
    99 *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
     
    493493
    494494
    495 int pmSubtractionRejectStamps(pmSubtractionStampList *stamps, const psVector *deviations,
    496                               psImage *subMask, float sigmaRej, int footprint)
     495int pmSubtractionRejectStamps(float *rms, int *num, pmSubtractionStampList *stamps,
     496                              const psVector *deviations, psImage *subMask, float sigmaRej,
     497                              int footprint)
    497498{
    498499    PM_ASSERT_SUBTRACTION_STAMP_LIST_NON_NULL(stamps, -1);
     
    513514    }
    514515
     516    totalSquareDev = sqrt(totalSquareDev / (double)numStamps); // Convert to RMS
     517
     518    if (rms) {
     519        *rms = totalSquareDev;
     520    }
     521    if (num) {
     522        *num = numStamps;
     523    }
     524
    515525    if (numStamps == 0) {
    516526        psError(PS_ERR_UNKNOWN, true, "No good stamps found.");
     
    520530    if (!isfinite(sigmaRej) || sigmaRej <= 0.0) {
    521531        // User just wanted to calculate and record the RMS for posterity
    522         psLogMsg("psModules.imcombine", PS_LOG_INFO, "RMS deviation: %f", sqrt(totalSquareDev / numStamps));
     532        psLogMsg("psModules.imcombine", PS_LOG_INFO, "RMS deviation from %d stamps: %lf",
     533                 numStamps, totalSquareDev);
    523534        return 0;
    524535    }
    525536
    526     float limit = sigmaRej * sqrt(totalSquareDev / (double)numStamps); // Limit on maximum deviation
     537    float limit = sigmaRej * totalSquareDev; // Limit on maximum deviation
    527538    psTrace("psModules.imcombine", 1, "Deviation limit: %f\n", limit);
    528539
Note: See TracChangeset for help on using the changeset viewer.