Changeset 30334 for branches/eam_branches/ipp-20101205/psModules
- Timestamp:
- Jan 21, 2011, 11:32:03 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20101205/psModules/src/imcombine
- Files:
-
- 2 edited
-
pmSubtractionMatch.c (modified) (1 diff)
-
pmSubtractionStamps.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/psModules/src/imcombine/pmSubtractionMatch.c
r30332 r30334 690 690 } 691 691 692 // check on the kernel scaling -- if the kron-based radial moments are very different, adjust to match them 693 { 694 float fwhm1; 695 float fwhm2; 696 pmSubtractionGetFWHMs(&fwhm1, &fwhm2); 697 psAssert(isfinite(fwhm1), "fwhm 1 not set"); 698 psAssert(isfinite(fwhm2), "fwhm 2 not set"); 699 700 // XXX this is BAD: depends on the relationship below: 701 // stamps->normWindow1 = 2.75*R1; 702 // stamps->normWindow2 = 2.75*R2; 703 float radMoment1 = stamps->normWindow1 / 2.75; 704 float radMoment2 = stamps->normWindow2 / 2.75; 705 706 float maxFWHM = PS_MAX(fwhm1, fwhm2); 707 float maxRadial = PS_MAX(radMoment1, radMoment2); 708 709 if (fabs(2.0*(maxFWHM - maxRadial)/(maxFWHM + maxRadial)) > 0.25) { 710 711 float scale = maxRadial / maxFWHM; 712 psLogMsg ("psModules.imcombine", PS_LOG_INFO, "Kron and FWHM scales are quite different, re-scale by %f to use Kron", scale); 713 714 for (int i = 0; i < isisWidths->n; i++) { 715 isisWidths->data.F32[i] *= scale; 716 } 717 } 718 } 719 692 720 // Define kernel basis functions 693 721 if (optimum && (type == PM_SUBTRACTION_KERNEL_ISIS || type == PM_SUBTRACTION_KERNEL_GUNK)) { -
branches/eam_branches/ipp-20101205/psModules/src/imcombine/pmSubtractionStamps.c
r30322 r30334 893 893 float R2 = Sr2 / Sf2; 894 894 895 // Compare the Kron Radii (R1 & R2) to above to the FWHMs : if they are too discrepant, we will need to rescale 896 psLogMsg ("psModules.imcombine", PS_LOG_DETAIL, "Kron Radii vs FWHMs 1: fwhm: %f, kron %f\n", fwhm1, R1); 897 psLogMsg ("psModules.imcombine", PS_LOG_DETAIL, "Kron Radii vs FWHMs 2: fwhm: %f, kron %f\n", fwhm2, R2); 898 899 // XXX CAREFUL : in pmSubtractionMatch.c:703, we rely on this factor of 2.75.. 895 900 stamps->normWindow1 = 2.75*R1; 896 901 stamps->normWindow2 = 2.75*R2; 897 psLogMsg ("psModules.imcombine", PS_LOG_DETAIL, " Kron Radii: %f for 1, %f for 2\n", stamps->normWindow1, stamps->normWindow2);902 psLogMsg ("psModules.imcombine", PS_LOG_DETAIL, "Windows from Kron Radii: %f for 1, %f for 2\n", stamps->normWindow1, stamps->normWindow2); 898 903 899 904 // if the calculated normWindows are too large, we will fall off the stamps. In this case, we need to try again.
Note:
See TracChangeset
for help on using the changeset viewer.
