- Timestamp:
- Apr 9, 2010, 4:41:16 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/stackphot.20100406/psphot/src/psphotStackReadout.c
r27625 r27649 59 59 60 60 // find the detections (by peak and/or footprint) in the image. 61 // This finds the detections on Chisq image as well as the individuals 61 62 if (!psphotFindDetections (config, view, true)) { // pass 1 62 63 // this only happens if we had an error in psphotFindDetections … … 66 67 67 68 // construct sources and measure basic stats (saved on detections->newSources) 69 // only run this on detections from the input images, not chisq image 68 70 if (!psphotSourceStats (config, view, true)) { // pass 1 69 71 psError(PSPHOT_ERR_UNKNOWN, false, "failure to generate sources"); 70 72 return psphotReadoutCleanup (config, view); 71 73 } 72 if (!strcasecmp (breakPt, "PEAKS")) { 73 return psphotReadoutCleanup(config, view); 74 75 // *** generate the objects (which unify the sources from the different images) 76 psArray *objects = psphotMatchSources (config, view); 77 78 // construct sources for the newly-generated sources (from other images) 79 if (!psphotSourceStats (config, view, false)) { // pass 1 80 psError(PSPHOT_ERR_UNKNOWN, false, "failure to generate sources"); 81 return psphotReadoutCleanup (config, view); 74 82 } 75 83 76 84 // find blended neighbors of very saturated stars (detections->newSources) 77 if (!psphotDeblendSatstars (config, view)) {78 psError (PSPHOT_ERR_UNKNOWN, false, "failed on satstar deblend analysis");79 return psphotReadoutCleanup (config, view);80 }85 // if (!psphotDeblendSatstars (config, view)) { 86 // psError (PSPHOT_ERR_UNKNOWN, false, "failed on satstar deblend analysis"); 87 // return psphotReadoutCleanup (config, view); 88 // } 81 89 82 90 // mark blended peaks PS_SOURCE_BLEND (detections->newSources) 83 if (!psphotBasicDeblend (config, view)) {84 psError (PSPHOT_ERR_UNKNOWN, false, "failed on deblend analysis");85 return psphotReadoutCleanup (config, view);86 }91 // if (!psphotBasicDeblend (config, view)) { 92 // psError (PSPHOT_ERR_UNKNOWN, false, "failed on deblend analysis"); 93 // return psphotReadoutCleanup (config, view); 94 // } 87 95 88 96 // classify sources based on moments, brightness 97 // only run this on detections from the input images, not chisq image 89 98 if (!psphotRoughClass (config, view)) { 90 99 psError (PSPHOT_ERR_UNKNOWN, false, "failed to determine rough classifications"); … … 92 101 } 93 102 // if we were not supplied a PSF model, determine the IQ stats here (detections->newSources) 103 // only run this on detections from the input images, not chisq image 94 104 if (!psphotImageQuality (config, view)) { // pass 1 95 105 psError (PSPHOT_ERR_UNKNOWN, false, "failed to measure image quality"); … … 121 131 psphotMergeSources (config, view); 122 132 123 // *** generate the objects (which unify the sources from the different images)124 // pmArray *objects = psphotMatchSources (config, view);125 126 133 // linear PSF fit to source peaks, subtract the models from the image (in PSF mask) 127 // psphotFitSourcesLinearStack (config, objects, FALSE); 134 psphotFitSourcesLinearStack (config, objects, FALSE); 135 psFree (objects); 128 136 129 137 // identify CRs and extended sources … … 153 161 psphotSourceFreePixels (config, view); 154 162 163 // remove chisq image from config->file:PSPHOT.INPUT (why?) 164 psphotStackRemoveChisqFromInputs(config); 165 155 166 // create the exported-metadata and free local data 156 167 return psphotReadoutCleanup (config, view);
Note:
See TracChangeset
for help on using the changeset viewer.
