Changeset 30741
- Timestamp:
- Feb 22, 2011, 2:31:46 PM (15 years ago)
- Location:
- tags/ipp-20110218/psModules
- Files:
-
- 5 edited
-
. (modified) (1 prop)
-
src/imcombine/pmSubtraction.c (modified) (1 diff)
-
src/imcombine/pmSubtractionMatch.c (modified) (3 diffs)
-
src/imcombine/pmSubtractionStamps.c (modified) (1 diff)
-
src/imcombine/pmSubtractionVisual.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20110218/psModules
- Property svn:mergeinfo set to
-
tags/ipp-20110218/psModules/src/imcombine/pmSubtraction.c
r30622 r30741 939 939 // which are significantly deviant from that distribution. 940 940 941 // if we only have 3 or fewer stars, we have to accept them all 942 if (match->nGood < 3) { 943 kernels->mean = NAN; 944 kernels->rms = NAN; 945 kernels->numStamps = match->nGood; 946 947 psLogMsg("psModules.imcombine", PS_LOG_INFO, "only %d stars, keeping them all (good luck!)", kernels->numStamps); 948 return 0; 949 } 950 941 951 kernels->mean = NAN; 942 952 kernels->rms = NAN; -
tags/ipp-20110218/psModules/src/imcombine/pmSubtractionMatch.c
r30622 r30741 667 667 } 668 668 669 int nTries = 0; 669 670 bool tryAgain = true; 670 671 while (tryAgain) { … … 677 678 678 679 // generate the window function from the set of stamps 680 // we attempt to set the window based on the measured kron radius, but the 681 // initial guess may be too small. allow the window to grow if the kron radius 682 // implies the need for a larger windon. But only allow 2 additional tries 679 683 if (!pmSubtractionStampsGetWindow(&tryAgain, stamps, size)) { 680 684 // if we failed, it might be due to the desired normWindow being larger than the current footprint. 681 685 // in this case, just adjust the footprint and try again. 686 if (tryAgain && (nTries >= 2)) { 687 // unrecoverable error 688 psError(PM_ERR_STAMPS, true, "Unable to get stamp window (failure to converge)."); 689 goto MATCH_ERROR; 690 } 682 691 if (tryAgain) { 683 692 // keep the border constant … … 688 697 // we need to reconstruct everything, so just free the stamps here and retry 689 698 psFree(stamps); 699 nTries ++; 690 700 } else { 691 // unrecoverable error 701 // unrecoverable error generated in pmSubtractionStampsGetWindow 692 702 psError(psErrorCodeLast(), false, "Unable to get stamp window."); 693 703 goto MATCH_ERROR; -
tags/ipp-20110218/psModules/src/imcombine/pmSubtractionStamps.c
r30622 r30741 913 913 psFree (norm2); 914 914 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; 915 925 } 916 926 -
tags/ipp-20110218/psModules/src/imcombine/pmSubtractionVisual.c
r30622 r30741 292 292 type = im->type.type; 293 293 } 294 if (imageMax == -1) return false; 294 if (imageMax == -1) { 295 psFree (matrixNorm); 296 return false; 297 } 295 298 296 299 int border = 15; … … 350 353 psFree(canvas); 351 354 psFree(canvas32); 355 psFree (matrixNorm); 352 356 return true; 353 357 } … … 503 507 psFitsClose(fits); 504 508 } 509 psFree (output); 505 510 } 506 511 … … 710 715 pmSubtractionVisualShowFitAddStamp (image2, image1, residual, background, norm, i); 711 716 } 717 psFree(polyValues); 712 718 } 713 719 pmSubtractionVisualShowFitImage(norm); 714 720 721 psFree (residual); 715 722 return true; 716 723 } … … 1029 1036 KapaPlotVector (kapa3, lflx->n, lMxx->data.F32, "y"); 1030 1037 1038 psFree (lflx); 1039 psFree (lchi); 1040 psFree (lMxx); 1041 1031 1042 pmVisualAskUser(NULL); 1032 1043 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
