Changeset 26643
- Timestamp:
- Jan 20, 2010, 12:59:49 PM (16 years ago)
- Location:
- branches/eam_branches/psphot.stack.20100120
- Files:
-
- 10 edited
-
doc/stack.txt (modified) (1 diff)
-
src/psphotBasicDeblend.c (modified) (3 diffs)
-
src/psphotChoosePSF.c (modified) (3 diffs)
-
src/psphotDeblendSatstars.c (modified) (3 diffs)
-
src/psphotFindDetections.c (modified) (6 diffs)
-
src/psphotReadout.c (modified) (11 diffs)
-
src/psphotReadoutCleanup.c (modified) (1 diff)
-
src/psphotRoughClass.c (modified) (2 diffs)
-
src/psphotSourceSize.c (modified) (2 diffs)
-
src/psphotSourceStats.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/psphot.stack.20100120/doc/stack.txt
r26542 r26643 1 2 20100120 : more stack processing mods: 3 4 there are a number of data collections generated during psphotReadout: 5 6 * detections (currently a structure containing multiple arrays) 7 * sources (a psArray) 8 * psf (the psf model structure) 9 10 * new sources vs old sources: 11 there is a sequence on the second pass in which we need to distinguish the sources 12 from the first pass from those on the second pass: 13 14 - add noise (old sources only) 15 - find detections 16 - subtract noise (old sources only) 17 - generate sources (new detections only) 18 - source classifications (new sources only) 19 - guess models (new sources only) 20 - replace sources (old sources only) 21 - merge sources (new + old -> sources) 22 23 currently we are distiguishing the old vs new based on different arrays. 24 can we use the processing flags to distinguish the these cases and carry around 25 only a single source list? 1 26 2 27 20100107 : updates for stack processing -
branches/eam_branches/psphot.stack.20100120/src/psphotBasicDeblend.c
r20453 r26643 1 1 # include "psphotInternal.h" 2 2 3 bool psphotBasicDeblend (p sArray *sources, psMetadata *recipe) {3 bool psphotBasicDeblend (pmConfig *config, const pmFPAview *view, const char *filename, int index) { 4 4 5 5 int N; … … 8 8 pmSource *source, *testSource; 9 9 10 psTimerStart ("psphot.deblend.basic"); 11 10 12 int Nblend = 0; 11 13 12 psTimerStart ("psphot.deblend.basic"); 14 // find the currently selected readout 15 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest 16 psAssert (readout, "missing file?"); 17 18 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 19 psAssert (readout, "missing readout?"); 20 21 psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES"); 22 psAssert (sources, "missing sources?"); 23 24 // select the appropriate recipe information 25 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 26 psAssert (recipe, "missing recipe?"); 13 27 14 28 float FRACTION = psMetadataLookupF32 (&status, recipe, "DEBLEND_PEAK_FRACTION"); … … 128 142 return true; 129 143 } 144 145 // for now, let's store the detections on the readout->analysis for each readout 146 bool psphotBasicDeblend (pmConfig *config, const pmFPAview *view) 147 { 148 bool status = true; 149 150 int num = psMetadataAddS32 (&status, config->arguments, "PSPHOT.INPUT.NUM"); 151 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 152 153 // loop over the available readouts 154 for (int i = 0; i < num; i++) { 155 if (!psphotBasicDeblendReadout (config, view, "PSPHOT.INPUT", i)) { 156 psError (PSPHOT_ERR_CONFIG, false, "failed on saturated star deblend analysis for PSPHOT.INPUT entry %d", i); 157 return false; 158 } 159 } 160 return true; 161 } -
branches/eam_branches/psphot.stack.20100120/src/psphotChoosePSF.c
r26262 r26643 2 2 3 3 // try PSF models and select best option 4 pmPSF *psphotChoosePSF (pmReadout *readout, psArray *sources, psMetadata *recipe) {4 bool psphotChoosePSFReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index) { 5 5 6 6 bool status; 7 7 8 8 psTimerStart ("psphot.choose.psf"); 9 10 // find the currently selected readout 11 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest 12 psAssert (readout, "missing file?"); 13 14 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 15 psAssert (readout, "missing readout?"); 16 17 psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES"); 18 psAssert (sources, "missing sources?"); 19 20 // select the appropriate recipe information 21 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 22 psAssert (recipe, "missing recipe?"); 9 23 10 24 // bit-masks to test for good/bad pixels 11 25 psImageMaskType maskVal = psMetadataLookupImageMask(&status, recipe, "MASK.PSPHOT"); 12 assert (maskVal);26 psAssert (maskVal, "missing mask value?"); 13 27 14 28 // bit-mask to mark pixels not used in analysis 15 29 psImageMaskType markVal = psMetadataLookupImageMask(&status, recipe, "MARK.PSPHOT"); 16 assert (markVal);30 psAssert (markVal, "missing mark value?"); 17 31 18 32 // maskVal is used to test for rejected pixels, and must include markVal … … 302 316 303 317 psFree (options); 304 return (psf); 318 319 // save PSF on readout->analysis 320 if (!psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.PSF", PS_DATA_PTR, "psphot psf model", psf)) { 321 psError (PSPHOT_ERR_UNKNOWN, false, "problem saving sources on readout"); 322 return false; 323 } 324 325 return true; 305 326 } 306 327 … … 445 466 return true; 446 467 } 468 469 // for now, let's store the detections on the readout->analysis for each readout 470 bool psphotChoosePSF (pmConfig *config, const pmFPAview *view) 471 { 472 bool status = true; 473 474 int num = psMetadataAddS32 (&status, config->arguments, "PSPHOT.INPUT.NUM"); 475 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 476 477 // loop over the available readouts 478 for (int i = 0; i < num; i++) { 479 if (!psphotChoosePSFReadout (config, view, "PSPHOT.INPUT", i, havePSF)) { 480 psError (PSPHOT_ERR_CONFIG, false, "failed on saturated star deblend analysis for PSPHOT.INPUT entry %d", i); 481 return false; 482 } 483 } 484 return true; 485 } -
branches/eam_branches/psphot.stack.20100120/src/psphotDeblendSatstars.c
r25885 r26643 1 1 # include "psphotInternal.h" 2 2 3 bool psphotDeblendSatstars (pmReadout *readout, psArray *sources, psMetadata *recipe) {3 bool psphotDeblendSatstarsReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index) { 4 4 5 5 int N; … … 10 10 int Nblend = 0; 11 11 float SAT_MIN_RADIUS = 5.0; 12 13 // find the currently selected readout 14 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest 15 psAssert (readout, "missing file?"); 16 17 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 18 psAssert (readout, "missing readout?"); 19 20 psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES"); 21 psAssert (sources, "missing sources?"); 22 23 // select the appropriate recipe information 24 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 25 psAssert (recipe, "missing recipe?"); 12 26 13 27 bool status; … … 169 183 return true; 170 184 } 185 186 // for now, let's store the detections on the readout->analysis for each readout 187 bool psphotDeblendSatstars (pmConfig *config, const pmFPAview *view) 188 { 189 bool status = true; 190 191 int num = psMetadataAddS32 (&status, config->arguments, "PSPHOT.INPUT.NUM"); 192 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 193 194 // loop over the available readouts 195 for (int i = 0; i < num; i++) { 196 if (!psphotDeblendSatstarsReadout (config, view, "PSPHOT.INPUT", i)) { 197 psError (PSPHOT_ERR_CONFIG, false, "failed on saturated star deblend analysis for PSPHOT.INPUT entry %d", i); 198 return false; 199 } 200 } 201 return true; 202 } -
branches/eam_branches/psphot.stack.20100120/src/psphotFindDetections.c
r26634 r26643 2 2 3 3 // smooth the image, search for peaks, optionally define footprints based on the peaks 4 pmDetections *psphotFindDetections (pmDetections *detections, pmReadout *readout, psMetadata *recipe) {4 bool psphotFindDetections (pmConfig *config, const pmFPAview *view, const char *filename, int index) { 5 5 6 6 bool status; … … 9 9 int NMAX = 0; 10 10 11 // find the currently selected readout 12 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest 13 psAssert (readout, "missing file?"); 14 15 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 16 psAssert (readout, "missing readout?"); 17 18 // select the appropriate recipe information 19 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 20 psAssert (recipe, "missing recipe?"); 21 11 22 // user-defined masks to test for good/bad pixels (build from recipe list if not yet set) 12 23 psImageMaskType maskVal = psMetadataLookupImageMask(&status, recipe, "MASK.PSPHOT"); // Mask value for bad pixels 13 assert (maskVal);24 psAssert (maskVal, "missing mask value?"); 14 25 15 26 // Use the new pmFootprints approach? … … 71 82 psphotVisualShowFootprints (detections); 72 83 73 return detections; 84 // save detections on the readout->analysis 85 if (!psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.DETECTIONS", PS_DATA_PTR, "psphot detectinos", detections)) { 86 psError (PSPHOT_ERR_CONFIG, false, "problem saving detections on readout"); 87 return NULL; 88 } 89 90 return true; 74 91 } 75 92 … … 77 94 // otherwise it only contains the new peaks. 78 95 79 # if 0 80 // XXX where do we place the N sets of detections? 96 // for now, let's store the detections on the readout->analysis for each readout 81 97 bool psphotFindDetections (pmConfig *config, const pmFPAview *view) 82 98 { … … 84 100 85 101 int num = psMetadataAddS32 (&status, config->arguments, "PSPHOT.INPUT.NUM"); 86 psA bort (!status, "programming error: must define PSPHOT.INPUT.NUM");102 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 87 103 88 104 // loop over the available readouts 89 105 for (int i = 0; i < num; i++) { 90 106 if (!psphotFindDetectionsReadout (config, view, "PSPHOT.INPUT", i)) { 91 psError (PSPHOT_ERR_CONFIG, false, "failed to subtract backgroundfor PSPHOT.INPUT entry %d", i);107 psError (PSPHOT_ERR_CONFIG, false, "failed to find initial detections for PSPHOT.INPUT entry %d", i); 92 108 return false; 93 109 } … … 95 111 return true; 96 112 } 97 # endif -
branches/eam_branches/psphot.stack.20100120/src/psphotReadout.c
r26596 r26643 48 48 49 49 // display the image, weight, mask (ch 1,2,3) 50 // XXX move this into the loop above 50 51 psphotVisualShowImage (readout); 51 52 … … 62 63 63 64 // display the backsub and backgnd images 65 // move this inthe the subtract background loop 64 66 psphotVisualShowBackground (config, view, readout); 65 67 … … 74 76 75 77 // find the detections (by peak and/or footprint) in the image. 76 pmDetections *detections = psphotFindDetections (NULL, readout, recipe); 77 if (!detections) { 78 if (!psphotFindDetections (config, view)) { 78 79 // this only happens if we had an error in psphotFindDetections 79 80 psError (PSPHOT_ERR_UNKNOWN, false, "failure in peak analysis"); … … 86 87 87 88 // construct sources and measure basic stats 88 psArray *sources = psphotSourceStats (config, readout, detections, true); 89 if (!sources) return false; 89 if (!psphotSourceStats (config, view, true)) { 90 // XXX do I need to raise an error here? 91 return false; 92 } 90 93 if (!strcasecmp (breakPt, "PEAKS")) { 91 94 return psphotReadoutCleanup(config, readout, recipe, detections, psf, sources); … … 94 97 // find blended neighbors of very saturated stars 95 98 // XXX merge this with Basic Deblend? 96 psphotDeblendSatstars (readout, sources, recipe); 99 if (!psphotDeblendSatstars (config, view)) { 100 psLogMsg ("psphot", 3, "failed on satstar deblend analysis"); 101 return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources); 102 } 97 103 98 104 // mark blended peaks PS_SOURCE_BLEND 99 if (!psphotBasicDeblend ( sources, recipe)) {105 if (!psphotBasicDeblend (config, view)) { 100 106 psLogMsg ("psphot", 3, "failed on deblend analysis"); 101 107 return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources); … … 103 109 104 110 // classify sources based on moments, brightness 105 if (!psphotRoughClass ( readout, sources, recipe, havePSF)) {111 if (!psphotRoughClass (config, view, havePSF)) { 106 112 psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image"); 107 113 return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources); … … 121 127 // XXX if we do not have enough stars to generate the PSF, build one 122 128 // from the SEEING guess and model class 123 psf = psphotChoosePSF (readout, sources, recipe); 124 if (psf == NULL) { 129 if (!psphotChoosePSF (config, view)) { 125 130 psLogMsg ("psphot", 3, "failure to construct a psf model"); 126 131 return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources); … … 131 136 return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources); 132 137 } 138 // move into psphotChoosePSF 133 139 psphotVisualShowPSFModel (readout, psf); 134 140 … … 147 153 148 154 // identify CRs and extended sources 149 psphotSourceSize (config, readout, sources, recipe, psf, 0);155 psphotSourceSize (config, view); 150 156 if (!strcasecmp (breakPt, "ENSEMBLE")) { 151 157 goto finish; … … 182 188 183 189 // set source type 184 if (!psphotRoughClass ( readout, newSources, recipe, havePSF)) {190 if (!psphotRoughClass (config, view, havePSF)) { 185 191 psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image"); 186 192 return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources); … … 203 209 204 210 // measure source size for the remaining sources 205 psphotSourceSize (config, readout, sources, recipe, psf, 0);211 psphotSourceSize (config, view); 206 212 207 213 psphotExtendedSourceAnalysis (readout, sources, recipe); -
branches/eam_branches/psphot.stack.20100120/src/psphotReadoutCleanup.c
r24203 r26643 61 61 // save the results of the analysis 62 62 psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.HEADER", PS_DATA_METADATA, "header stats", header); 63 if (sources) { 64 psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY, "psphot sources", sources); 65 } 63 66 64 if (psf) { 67 65 // save the psf for possible output. if there was already an entry, it was loaded from external sources -
branches/eam_branches/psphot.stack.20100120/src/psphotRoughClass.c
r25989 r26643 10 10 11 11 // 2006.02.02 : no leaks 12 bool psphotRoughClass (pmReadout *readout, psArray *sources, psMetadata *recipe, const bool havePSF) {12 bool psphotRoughClassReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index, const bool havePSF) { 13 13 14 14 bool status; 15 15 16 16 psTimerStart ("psphot.rough"); 17 18 // find the currently selected readout 19 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest 20 psAssert (readout, "missing file?"); 21 22 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 23 psAssert (readout, "missing readout?"); 24 25 psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES"); 26 psAssert (sources, "missing sources?"); 27 28 // select the appropriate recipe information 29 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 30 psAssert (recipe, "missing recipe?"); 17 31 18 32 // we make this measurement on a NxM grid of regions across the readout … … 111 125 return true; 112 126 } 127 128 // for now, let's store the detections on the readout->analysis for each readout 129 bool psphotRoughClass (pmConfig *config, const pmFPAview *view, const bool havePSF) 130 { 131 bool status = true; 132 133 int num = psMetadataAddS32 (&status, config->arguments, "PSPHOT.INPUT.NUM"); 134 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 135 136 // loop over the available readouts 137 for (int i = 0; i < num; i++) { 138 if (!psphotRoughClassReadout (config, view, "PSPHOT.INPUT", i, havePSF)) { 139 psError (PSPHOT_ERR_CONFIG, false, "failed on saturated star deblend analysis for PSPHOT.INPUT entry %d", i); 140 return false; 141 } 142 } 143 return true; 144 } -
branches/eam_branches/psphot.stack.20100120/src/psphotSourceSize.c
r26508 r26643 28 28 // deviation from the psf model at the r = FWHM/2 position 29 29 30 // for now, let's store the detections on the readout->analysis for each readout 31 bool psphotSourceSize (pmConfig *config, const pmFPAview *view) 32 { 33 bool status = true; 34 35 int num = psMetadataAddS32 (&status, config->arguments, "PSPHOT.INPUT.NUM"); 36 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 37 38 // loop over the available readouts 39 for (int i = 0; i < num; i++) { 40 if (!psphotSourceSizeReadout (config, view, "PSPHOT.INPUT", i)) { 41 psError (PSPHOT_ERR_CONFIG, false, "failed on saturated star deblend analysis for PSPHOT.INPUT entry %d", i); 42 return false; 43 } 44 } 45 return true; 46 } 47 30 48 // XXX use an internal flag to mark sources which have already been measured 31 bool psphotSourceSize(pmConfig *config, pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf, long first) 49 // how to track the sources already measured? 50 bool psphotSourceSize(pmConfig *config, const pmFPAview *view, const char *filename, int index) 32 51 { 33 52 bool status; … … 35 54 36 55 psTimerStart ("psphot.size"); 56 57 // find the currently selected readout 58 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest 59 psAssert (readout, "missing file?"); 60 61 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 62 psAssert (readout, "missing readout?"); 63 64 psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES"); 65 psAssert (sources, "missing sources?"); 66 67 pmPSF *psf = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.PSF"); 68 psAssert (psf, "missing psf?"); 69 70 // select the appropriate recipe information 71 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 72 psAssert (recipe, "missing recipe?"); 37 73 38 74 // user-defined masks to test for good/bad pixels (build from recipe list if not yet set) -
branches/eam_branches/psphot.stack.20100120/src/psphotSourceStats.c
r26596 r26643 3 3 bool psphotSetMomentsWindow (psMetadata *recipe, psMetadata *analysis, psArray *sources); 4 4 5 psArray *psphotSourceStats (pmConfig *config, pmReadout *readout, pmDetections *detections, bool setWindow) {5 bool psphotSourceStatsReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index, bool setWindow) { 6 6 7 7 bool status = false; … … 10 10 psTimerStart ("psphot.stats"); 11 11 12 // find the currently selected readout 13 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest 14 psAssert (readout, "missing file?"); 15 16 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 17 psAssert (readout, "missing readout?"); 18 19 pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS"); 20 psAssert (detections, "missing detections?"); 21 12 22 // select the appropriate recipe information 13 23 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 14 assert (recipe);24 psAssert (recipe, "missing recipe?"); 15 25 16 26 // determine the number of allowed threads … … 21 31 22 32 // determine properties (sky, moments) of initial sources 23 float OUTER = psMetadataLookupF32 (&status, recipe, "SKY_OUTER_RADIUS"); 24 if (!status) return NULL; 25 33 float OUTER = psMetadataLookupF32 (&status, recipe, "SKY_OUTER_RADIUS"); 34 psAssert (status, "missing SKY_OUTER_RADIUS in recipe?"); 35 36 // XXX this seems like an arbitrary number... 26 37 OUTER = PS_MAX(OUTER, 20.0); // XXX Guarantee that we can encompass the max moments radius 27 38 28 39 char *breakPt = psMetadataLookupStr (&status, recipe, "BREAK_POINT"); 29 if (!status) return NULL;40 if (!status) return false; 30 41 31 42 psArray *peaks = detections->peaks; 32 43 if (!peaks) { 33 44 psError(PS_ERR_UNEXPECTED_NULL, false, "No peaks found!"); 34 return NULL;45 return false; 35 46 } 36 47 … … 64 75 psLogMsg ("psphot", PS_LOG_INFO, "break point PEAKS, skipping MOMENTS\n"); 65 76 psphotVisualShowMoments (sources); 66 return sources; 77 // save sources on the readout->analysis 78 if (!psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY, "psphot sources", sources)) { 79 psError (PSPHOT_ERR_UNKNOWN, false, "problem saving sources on readout"); 80 psFree(sources); 81 return false; 82 } 83 psFree(sources); 84 return true; 67 85 } 68 86 … … 70 88 if (!psphotSetMomentsWindow(recipe, readout->analysis, sources)) { 71 89 psError(PS_ERR_UNEXPECTED_NULL, false, "Failed to determine Moments Window!"); 72 return NULL; 90 psFree(sources); 91 return false; 73 92 } 74 93 } … … 103 122 psError(PS_ERR_UNKNOWN, false, "Unable to launch thread job PSPHOT_SOURCE_STATS"); 104 123 psFree (job); 105 return NULL; 124 psFree(sources); 125 return false; 106 126 } 107 127 psFree(job); … … 111 131 if (!psThreadPoolWait (false)) { 112 132 psError(PS_ERR_UNKNOWN, false, "Failure in thread job PSPHOT_SOURCE_STATS"); 113 return NULL; 133 psFree(sources); 134 return false; 114 135 } 115 136 … … 138 159 psphotVisualShowMoments (sources); 139 160 140 return (sources); 161 // save sources on the readout->analysis 162 if (!psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY, "psphot sources", sources)) { 163 psError (PSPHOT_ERR_UNKNOWN, false, "problem saving sources on readout"); 164 psFree(sources); 165 return false; 166 } 167 psFree(sources); 168 return true; 141 169 } 142 170 171 // XXX fix the return status of this function... 143 172 bool psphotSourceStatsUpdate (psArray *sources, pmConfig *config, pmReadout *readout) { 144 173 … … 451 480 return true; 452 481 } 482 483 484 // if we use the footprints, the output peaks list contains both old and new peaks, 485 // otherwise it only contains the new peaks. 486 487 // for now, let's store the detections on the readout->analysis for each readout 488 bool psphotSourceStats (pmConfig *config, const pmFPAview *view, bool setWindow) 489 { 490 bool status = true; 491 492 int num = psMetadataAddS32 (&status, config->arguments, "PSPHOT.INPUT.NUM"); 493 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 494 495 // loop over the available readouts 496 for (int i = 0; i < num; i++) { 497 if (!psphotFindDetectionsReadout (config, view, "PSPHOT.INPUT", i, setWindow)) { 498 psError (PSPHOT_ERR_CONFIG, false, "failed to find initial detections for PSPHOT.INPUT entry %d", i); 499 return false; 500 } 501 } 502 return true; 503 }
Note:
See TracChangeset
for help on using the changeset viewer.
