Changeset 28405 for trunk/psphot/src/psphotSourceStats.c
- Timestamp:
- Jun 18, 2010, 2:25:38 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotSourceStats.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotSourceStats.c
r28013 r28405 3 3 // convert detections to sources and measure their basic properties (moments, local sky, sky 4 4 // variance) Note: this function only generates sources for the new peaks (peak->assigned). 5 // The new sources are added to any existing sources on detections->newSources. The sources 5 // The new sources are added to any existing sources on detections->newSources. The sources 6 6 // on detections->allSources are ignored. 7 7 bool psphotSourceStats (pmConfig *config, const pmFPAview *view, const char *filerule, bool setWindow) … … 22 22 // loop over the available readouts 23 23 for (int i = 0; i < num; i++) { 24 // if (i == chisqNum) continue; // skip chisq image24 // if (i == chisqNum) continue; // skip chisq image 25 25 if (!psphotSourceStatsReadout (config, view, filerule, i, recipe, setWindow)) { 26 26 psError (PSPHOT_ERR_CONFIG, false, "failed to find initial detections for %s entry %d", filerule, i); … … 91 91 // generate the array of sources, define the associated pixel 92 92 if (!detections->newSources) { 93 detections->newSources = psArrayAllocEmpty (peaks->n);93 detections->newSources = psArrayAllocEmpty (peaks->n); 94 94 } 95 95 sources = detections->newSources; … … 107 107 // create a new source 108 108 pmSource *source = pmSourceAlloc(); 109 source->imageID = index;109 source->imageID = index; 110 110 111 111 // add the peak … … 184 184 if (!psThreadJobAddPending(job)) { 185 185 psError(PS_ERR_UNKNOWN, false, "Unable to launch thread job PSPHOT_SOURCE_STATS"); 186 psFree (job);187 186 psFree(detections->newSources); 188 187 return false; 189 188 } 190 psFree(job);191 189 } 192 190 … … 194 192 if (!psThreadPoolWait (false)) { 195 193 psError(PS_ERR_UNKNOWN, false, "Failure in thread job PSPHOT_SOURCE_STATS"); 196 psFree(detections->newSources);194 psFree(detections->newSources); 197 195 return false; 198 196 } … … 315 313 if (!psThreadJobAddPending(job)) { 316 314 psError(PS_ERR_UNKNOWN, false, "Unable to launch thread job PSPHOT_SOURCE_STATS"); 317 psFree (job);318 315 return NULL; 319 316 } 320 psFree(job);321 317 } 322 318 … … 380 376 pmSource *source = sources->data[i]; 381 377 382 if (source->tmpFlags & PM_SOURCE_TMPF_MOMENTS_MEASURED) continue;383 source->tmpFlags |= PM_SOURCE_TMPF_MOMENTS_MEASURED;378 if (source->tmpFlags & PM_SOURCE_TMPF_MOMENTS_MEASURED) continue; 379 source->tmpFlags |= PM_SOURCE_TMPF_MOMENTS_MEASURED; 384 380 385 381 // skip faint sources for moments measurement
Note:
See TracChangeset
for help on using the changeset viewer.
