- Timestamp:
- Jan 2, 2010, 6:13:37 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/psModules/src/imcombine/pmSubtractionStamps.c
r26471 r26502 81 81 82 82 // Search a region for a suitable stamp 83 bool stampSearch( int *xStamp, int *yStamp, // Coordinates of stamp, to return83 bool stampSearch(float *xStamp, float *yStamp, // Coordinates of stamp, to return 84 84 float *fluxStamp, // Flux of stamp, to return 85 85 const psImage *image1, const psImage *image2, // Images to search … … 116 116 ((image1) ? image1->data.F32[y][x] : image2->data.F32[y][x]); // Flux at pixel 117 117 if (flux > *fluxStamp) { 118 *xStamp = x ;119 *yStamp = y ;118 *xStamp = x + 0.5; 119 *yStamp = y + 0.5; 120 120 *fluxStamp = flux; 121 121 found = true; … … 405 405 numSearch++; 406 406 407 int xStamp = 0, yStamp =0; // Coordinates of stamp407 float xStamp = 0.0, yStamp = 0.0; // Coordinates of stamp 408 408 float fluxStamp = -INFINITY; // Flux of stamp 409 409 bool goodStamp = false; // Found a good stamp? … … 437 437 goodStamp = stampSearch(&xStamp, &yStamp, &fluxStamp, image1, image2, thresh1, thresh2, 438 438 subMask, xMin, xMax, yMin, yMax, numCols, numRows, border); 439 440 // XXX reset for a test: 441 xStamp = xList->data.F32[j]; 442 yStamp = yList->data.F32[j]; 443 fprintf (stderr, "find: %d %d ==> %5.1f %5.1f\n", xCentre, yCentre, xStamp, yStamp); 439 444 } 440 445 } else { … … 543 548 } 544 549 550 fprintf (stderr, "stamp: %5.1f %5.1f == %d %d\n", xStamp, yStamp, xPix, yPix); 551 545 552 bool found = false; 546 553 for (int j = 0; j < numStamps && !found; j++) { … … 735 742 return false; 736 743 } 744 fprintf (stderr, "stamp: %5.1f %5.1f == %d %d\n", stamp->x, stamp->y, x, y); 737 745 738 746 // Catch memory leaks --- these should have been freed and NULLed before … … 811 819 y->data.F32[numOut] = source->peak->yf; 812 820 } 821 fprintf (stderr, "stamp: %5.1f %5.1f\n", x->data.F32[numOut], y->data.F32[numOut]); 813 822 numOut++; 814 823 }
Note:
See TracChangeset
for help on using the changeset viewer.
