Changeset 17811 for trunk/psModules/src/imcombine/pmSubtraction.c
- Timestamp:
- May 24, 2008, 1:24:15 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmSubtraction.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtraction.c
r17783 r17811 4 4 * @author GLG, MHPCC 5 5 * 6 * @version $Revision: 1.9 1$ $Name: not supported by cvs2svn $7 * @date $Date: 2008-05-24 00:40:16$6 * @version $Revision: 1.92 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2008-05-24 23:24:15 $ 8 8 * 9 9 * Copyright 2004-2007 Institute for Astronomy, University of Hawaii … … 493 493 494 494 495 int pmSubtractionRejectStamps(float *rms , int *num, pmSubtractionStampList *stamps,495 int pmSubtractionRejectStamps(float *rmsPtr, int *numPtr, pmSubtractionStampList *stamps, 496 496 const psVector *deviations, psImage *subMask, float sigmaRej, 497 497 int footprint) … … 514 514 } 515 515 516 totalSquareDev= sqrt(totalSquareDev / (double)numStamps); // Convert to RMS517 518 if (rms ) {519 *rms = totalSquareDev;520 } 521 if (num ) {522 *num = numStamps;516 float rms = sqrt(totalSquareDev / (double)numStamps); // Convert to RMS 517 518 if (rmsPtr) { 519 *rmsPtr = rms; 520 } 521 if (numPtr) { 522 *numPtr = numStamps; 523 523 } 524 524 … … 531 531 // User just wanted to calculate and record the RMS for posterity 532 532 psLogMsg("psModules.imcombine", PS_LOG_INFO, "RMS deviation from %d stamps: %lf", 533 numStamps, totalSquareDev);533 numStamps, rms); 534 534 return 0; 535 535 } 536 536 537 float limit = sigmaRej * totalSquareDev; // Limit on maximum deviation537 float limit = sigmaRej * rms; // Limit on maximum deviation 538 538 psTrace("psModules.imcombine", 1, "Deviation limit: %f\n", limit); 539 539 … … 586 586 psLogMsg("psModules.imcombine", PS_LOG_INFO, 587 587 "%d good stamps; %d rejected.\nRMS deviation: %f --> %f\n", 588 numGood, numRejected, sqrt(totalSquareDev / numStamps),588 numGood, numRejected, rms, 589 589 sqrt(newSquareDev / (double)numGood)); 590 590 } else { 591 591 psLogMsg("psModules.imcombine", PS_LOG_INFO, 592 592 "%d good stamps; 0 rejected.\nRMS deviation: %f\n", 593 numGood, sqrt(totalSquareDev / numStamps));593 numGood, rms); 594 594 } 595 595
Note:
See TracChangeset
for help on using the changeset viewer.
