Changeset 30040 for trunk/ppSub/src/ppSubLoop.c
- Timestamp:
- Dec 14, 2010, 8:20:14 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ppSub/src/ppSubLoop.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSub/src/ppSubLoop.c
r29937 r30040 70 70 } 71 71 if (data->forcedPhot2) { 72 // Change the recipe to use a higher nsigma limit and quit after pass1 73 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSPHOT_RECIPE); 74 75 psF32 nsigma_peak_save = psMetadataLookupF32 (NULL, recipe, "PEAKS_NSIGMA_LIMIT"); 76 char *breakPt_save = psMetadataLookupStr (NULL, recipe, "BREAK_POINT"); 77 78 bool mdok; 79 psF32 pos2_nsigma_peak = psMetadataLookupF32 (&mdok, recipe, "PEAKS_POS2_NSIGMA_LIMIT"); 80 if (!mdok) { 81 psWarning("PEAKS_POS2_NSIGMA_LIMIT not found in recipe. Will use 25.\n"); 82 pos2_nsigma_peak = 25.; 83 } 84 psMetadataAddF32(recipe, PS_LIST_TAIL, "PEAKS_NSIGMA_LIMIT", PS_META_REPLACE, "", pos2_nsigma_peak); 85 psMetadataAddStr(recipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_REPLACE, "", "PASS1"); 86 72 87 bool foundDetections = false; 73 88 if (!ppSubInputDetections(&foundDetections, "PPSUB.POS2.SOURCES", "PPSUB.REF", data)) { 74 89 psError(psErrorCodeLast(), false, "Unable to measure positive detections (2)"); 75 return false; 76 } 90 psMetadataAddF32(recipe, PS_LIST_TAIL, "PEAKS_NSIGMA_LIMIT", PS_META_REPLACE, "", nsigma_peak_save); 91 psMetadataAddStr(recipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_REPLACE, "", breakPt_save); 92 return false; 93 } 94 psMetadataAddF32(recipe, PS_LIST_TAIL, "PEAKS_NSIGMA_LIMIT", PS_META_REPLACE, "", nsigma_peak_save); 95 psMetadataAddStr(recipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_REPLACE, "", breakPt_save); 77 96 // if nothing was found, don't bother doing the forced photometry below 78 97 if (!foundDetections) { 79 psWarning ("no sources found in positive image 1, skipping forced photometry");80 data->forcedPhot 1= false;98 psWarning ("no sources found in positive image 2, skipping forced photometry"); 99 data->forcedPhot2 = false; 81 100 } 82 101 }
Note:
See TracChangeset
for help on using the changeset viewer.
