Changeset 11159
- Timestamp:
- Jan 18, 2007, 6:36:55 PM (19 years ago)
- Location:
- trunk/psModules/src/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmPeaks.c
r10048 r11159 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $9 * @date $Date: 200 6-11-17 23:00:31$8 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-01-19 04:36:55 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 122 122 pmPeak *pmPeakAlloc(psS32 x, 123 123 psS32 y, 124 psF32 counts,124 psF32 value, 125 125 pmPeakType type) 126 126 { … … 131 131 tmp->x = x; 132 132 tmp->y = y; 133 tmp->counts = counts; 133 tmp->value = value; 134 tmp->flux = 0; 135 tmp->SN = 0; 136 134 137 tmp->type = type; 135 138 … … 154 157 psF32 diff; 155 158 156 diff = A-> counts - B->counts;159 diff = A->value - B->value; 157 160 if (diff < FLT_EPSILON) { 158 161 psTrace("psModules.objects", 3, "---- %s(-1) end ----\n", __func__); … … 175 178 psF32 diff; 176 179 177 diff = A-> counts - B->counts;180 diff = A->value - B->value; 178 181 if (diff < FLT_EPSILON) { 179 182 psTrace("psModules.objects", 3, "---- %s(+1) end ----\n", __func__); … … 301 304 XXX: This does not work if image has either a single row, or a single column. 302 305 303 XXX: In the output psArray elements, should we use the image row/column offsets? 304 Currently, we do not. 305 XXX EAM : this function needs to return peaks in *parent* coords 306 307 XXX: Merge with CVS 1.20. This had the proper code for images with a single 308 row or column. 309 310 XXX this does not use the weight or mask information 311 312 *****************************************************************************/ 313 psArray *pmFindImagePeaks(const psImage *image, 314 psF32 threshold) 306 *****************************************************************************/ 307 psArray *pmFindImagePeaks(const psImage *image, psF32 threshold) 315 308 { 316 309 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); … … 532 525 while (tmpListElem != NULL) { 533 526 pmPeak *tmpPeak = (pmPeak *) tmpListElem->data; 534 if ((tmpPeak-> counts> maxValue) ||527 if ((tmpPeak->value > maxValue) || 535 528 (true == isItInThisRegion(valid, tmpPeak->x, tmpPeak->y))) { 536 529 psListRemoveData(peaks, (psPtr) tmpPeak); … … 562 555 for (int i = 0; i < peaks->n; i++) { 563 556 pmPeak *tmpPeak = (pmPeak *) peaks->data[i]; 564 if (tmpPeak-> counts> maxValue)557 if (tmpPeak->value > maxValue) 565 558 continue; 566 559 if (isItInThisRegion(valid, tmpPeak->x, tmpPeak->y)) -
trunk/psModules/src/objects/pmPeaks.h
r9881 r11159 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $13 * @date $Date: 200 6-11-07 09:07:42$12 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2007-01-19 04:36:53 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 52 52 float xf; ///< bicube fit to peak coord (x) 53 53 float yf; ///< bicube fit to peak coord (y) 54 float counts; ///< Value of peak pixel (above sky?). 55 pmPeakType type; ///< Description of peak. 54 float value; ///< level in detection image 55 float flux; ///< level in unsmoothed sci image 56 float SN; ///< S/N implied by detection level 57 pmPeakType type; ///< Description of peak. 56 58 } 57 59 pmPeak;
Note:
See TracChangeset
for help on using the changeset viewer.
