Changeset 17783 for trunk/psModules/src/imcombine/pmSubtraction.c
- Timestamp:
- May 23, 2008, 2:40:16 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmSubtraction.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtraction.c
r17496 r17783 4 4 * @author GLG, MHPCC 5 5 * 6 * @version $Revision: 1.9 0$ $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 $ 8 8 * 9 9 * Copyright 2004-2007 Institute for Astronomy, University of Hawaii … … 493 493 494 494 495 int pmSubtractionRejectStamps(pmSubtractionStampList *stamps, const psVector *deviations, 496 psImage *subMask, float sigmaRej, int footprint) 495 int pmSubtractionRejectStamps(float *rms, int *num, pmSubtractionStampList *stamps, 496 const psVector *deviations, psImage *subMask, float sigmaRej, 497 int footprint) 497 498 { 498 499 PM_ASSERT_SUBTRACTION_STAMP_LIST_NON_NULL(stamps, -1); … … 513 514 } 514 515 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 515 525 if (numStamps == 0) { 516 526 psError(PS_ERR_UNKNOWN, true, "No good stamps found."); … … 520 530 if (!isfinite(sigmaRej) || sigmaRej <= 0.0) { 521 531 // 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); 523 534 return 0; 524 535 } 525 536 526 float limit = sigmaRej * sqrt(totalSquareDev / (double)numStamps); // Limit on maximum deviation537 float limit = sigmaRej * totalSquareDev; // Limit on maximum deviation 527 538 psTrace("psModules.imcombine", 1, "Deviation limit: %f\n", limit); 528 539
Note:
See TracChangeset
for help on using the changeset viewer.
