Changeset 30289 for branches/eam_branches/ipp-20101205/psModules/src/imcombine/pmSubtractionStamps.c
- Timestamp:
- Jan 17, 2011, 5:18:09 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/psModules/src/imcombine/pmSubtractionStamps.c
r30266 r30289 122 122 if ((image1 && image1->data.F32[y][x] < thresh1) || 123 123 (image2 && image2->data.F32[y][x] < thresh2)) { 124 // fprintf (stderr, "%f,%f : thresh\n", xRaw, yRaw); 124 125 continue; 125 126 } … … 429 430 stamps = pmSubtractionStampListAlloc(numCols, numRows, region, footprint, spacing, 430 431 normFrac, sysErr, skyErr); 432 } 433 434 // XXX TEST : dump all stars in the stamps here 435 if (0) { 436 FILE *f = fopen ("stamp.dat", "w"); 437 for (int i = 0; i < stamps->num; i++) { 438 psVector *xList = stamps->x->data[i]; 439 psVector *yList = stamps->y->data[i]; // Coordinate lists 440 psVector *fluxList = stamps->flux->data[i]; // List of stamp fluxes 441 442 for (int j = 0; j < xList->n; j++) { 443 fprintf (f, "%d %d %f %f %f\n", i, j, xList->data.F32[j], yList->data.F32[j], fluxList->data.F32[j]); 444 } 445 } 446 fclose (f); 431 447 } 432 448 … … 636 652 } 637 653 654 int nTotal = 0; 655 638 656 // Sort the list by flux, with the brightest last 639 657 for (int i = 0; i < numStamps; i++) { … … 662 680 stamps->y->data[i] = ySorted; 663 681 stamps->flux->data[i] = fluxSorted; 664 } 665 682 nTotal += num; 683 } 684 // fprintf (stderr, "nTotal %d\n", nTotal); 685 666 686 return stamps; 667 687 } … … 809 829 float R2 = Sr2 / Sf2; 810 830 811 stamps->normWindow1 = 2. 0*R1;812 stamps->normWindow2 = 2. 0*R2;831 stamps->normWindow1 = 2.75*R1; 832 stamps->normWindow2 = 2.75*R2; 813 833 psLogMsg ("psModules.imcombine", PS_LOG_DETAIL, "Kron Radii: %f for 1, %f for 2\n", stamps->normWindow1, stamps->normWindow2); 814 834 815 835 // Generate a weighting window based on the kron radii 816 836 { 817 float radius = 1.5* PS_MAX(R1, R2);837 float radius = 2.0 * PS_MAX(R1, R2); 818 838 819 839 psImageInit(stamps->window->image, 0.0); … … 826 846 } 827 847 } 848 849 // complain if normWindow1 or normWindow2 are larger than size 850 psAssert(stamps->normWindow1 < size, "norm Window 1 too large"); 851 psAssert(stamps->normWindow2 < size, "norm Window 2 too large"); 828 852 829 853 # else … … 1142 1166 continue; 1143 1167 } 1168 1169 // XXX TEST 1170 if (source->errMag > 0.1) continue; 1171 1144 1172 if (source->modelPSF) { 1145 1173 x->data.F32[numOut] = source->modelPSF->params->data.F32[PM_PAR_XPOS];
Note:
See TracChangeset
for help on using the changeset viewer.
