Changeset 31587 for branches/eam_branches/ipp-20110505/psModules
- Timestamp:
- May 29, 2011, 11:26:31 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110505/psModules/src
- Files:
-
- 2 edited
-
imcombine/pmSubtractionStamps.c (modified) (4 diffs)
-
objects/models (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110505/psModules/src/imcombine/pmSubtractionStamps.c
r31451 r31587 834 834 } 835 835 836 psStatsInit (stats); 837 if (!psVectorStats (stats, flux1, NULL, NULL, 0)) { 838 psAbort ("failed to generate stats"); 839 } 840 float f1 = stats->sampleMedian; 841 842 psStatsInit (stats); 843 if (!psVectorStats (stats, flux2, NULL, NULL, 0)) { 844 psAbort ("failed to generate stats"); 845 } 846 float f2 = stats->sampleMedian; 836 float f1 = NAN; 837 if (flux1->n > 0) { 838 psStatsInit (stats); 839 if (!psVectorStats (stats, flux1, NULL, NULL, 0)) { 840 psAbort ("failed to generate stats"); 841 } 842 f1 = stats->sampleMedian; 843 } 844 845 float f2 = NAN; 846 if (flux2->n > 0) { 847 psStatsInit (stats); 848 if (!psVectorStats (stats, flux2, NULL, NULL, 0)) { 849 psAbort ("failed to generate stats"); 850 } 851 f2 = stats->sampleMedian; 852 } 847 853 848 854 stamps->window1->kernel[y][x] = f1; … … 893 899 float R2 = Sr2 / Sf2; 894 900 901 if (!isfinite(R1) || !isfinite(R2)) { 902 psError(PM_ERR_STAMPS, true, "Kron Radii are not finite (failure to converge)."); 903 psFree (stats); 904 psFree (flux1); 905 psFree (flux2); 906 psFree (norm1); 907 psFree (norm2); 908 return false; 909 } 910 895 911 // Compare the Kron Radii (R1 & R2) to above to the FWHMs : if they are too discrepant, we will need to rescale 896 912 psLogMsg ("psModules.imcombine", PS_LOG_DETAIL, "Kron Radii vs FWHMs 1: fwhm: %f, kron %f\n", fwhm1, R1); … … 901 917 stamps->normWindow2 = 2.75*R2; 902 918 psLogMsg ("psModules.imcombine", PS_LOG_DETAIL, "Windows from Kron Radii: %f for 1, %f for 2\n", stamps->normWindow1, stamps->normWindow2); 919 903 920 904 921 // if the calculated normWindows are too large, we will fall off the stamps. In this case, we need to try again. … … 913 930 psFree (norm2); 914 931 return false; 915 }916 917 if (!isfinite(R1) || !isfinite(R2)) {918 psError(PM_ERR_STAMPS, true, "Kron Radii are not finite (failure to converge).");919 psFree (stats);920 psFree (flux1);921 psFree (flux2);922 psFree (norm1);923 psFree (norm2);924 return false;925 932 } 926 933 -
branches/eam_branches/ipp-20110505/psModules/src/objects/models
- Property svn:mergeinfo deleted
Note:
See TracChangeset
for help on using the changeset viewer.
