- Timestamp:
- Mar 5, 2012, 5:19:48 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
psphot (modified) (1 prop)
-
psphot/src (modified) (2 props)
-
psphot/src/psphotSourceStats.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/psphot
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/psphot/src
- Property svn:ignore
-
old new 22 22 psphotMakePSF 23 23 psphotStack 24 psphotModelTest
-
- Property svn:mergeinfo set to
- Property svn:ignore
-
branches/meh_branches/ppstack_test/psphot/src/psphotSourceStats.c
r31673 r33415 10 10 bool status = true; 11 11 12 fprintf (stdout, "\n"); 13 psLogMsg ("psphot", PS_LOG_INFO, "--- psphot Source Stats ---"); 14 12 15 // select the appropriate recipe information 13 16 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); … … 98 101 99 102 // generate the array of sources, define the associated pixel 100 bool firstPass = false; 101 if (!detections->newSources) { 102 detections->newSources = psArrayAllocEmpty (peaks->n); 103 firstPass = true; 104 } 105 sources = detections->newSources; 103 psAssert (!detections->newSources, "programming error"); 104 sources = detections->newSources = psArrayAllocEmpty (peaks->n); 105 106 bool firstPass = (detections->allSources == NULL); 106 107 107 108 // if there are no peaks, we save the empty source array and return … … 121 122 // add the peak 122 123 source->peak = psMemIncrRefCounter(peak); 124 125 // psAssert (source->peak->footprint, "peak without footprint??"); 123 126 124 127 // allocate space for moments … … 213 216 214 217 // wait for the threads to finish and manage results 215 if (!psThreadPoolWait (false )) {218 if (!psThreadPoolWait (false, true)) { 216 219 psError(PS_ERR_UNKNOWN, false, "Failure in thread job PSPHOT_SOURCE_STATS"); 217 220 psFree(detections->newSources); … … 239 242 psFree (cellGroups); 240 243 241 psLogMsg ("psphot", PS_LOG_ INFO, "%ld sources, %d moments, %d faint, %d failed: %f sec\n", sources->n, Nmoments, Nfaint, Nfail, psTimerMark ("psphot.stats"));244 psLogMsg ("psphot", PS_LOG_WARN, "%ld sources, %d moments, %d faint, %d failed: %f sec\n", sources->n, Nmoments, Nfaint, Nfail, psTimerMark ("psphot.stats")); 242 245 243 246 psphotVisualShowMoments (sources); … … 344 347 345 348 // wait for the threads to finish and manage results 346 if (!psThreadPoolWait (false )) {349 if (!psThreadPoolWait (false, true)) { 347 350 psError(PS_ERR_UNKNOWN, false, "Failure in thread job PSPHOT_SOURCE_STATS"); 348 351 return NULL; … … 554 557 // determine the PSF parameters from the source moment values 555 558 pmPSFClump psfClump = pmSourcePSFClump (NULL, NULL, sources, PSF_SN_LIM, PSF_CLUMP_GRID_SCALE, MOMENTS_SX_MAX, MOMENTS_SY_MAX, MOMENTS_SX_MIN, MOMENTS_SY_MIN, MOMENTS_AR_MAX); 556 psLogMsg ("psphot", 3, " radius%.1f, nStars: %d of %d in clump, nSigma: %5.2f, X, Y: %f, %f (%f, %f)\n", sigma[i], psfClump.nStars, psfClump.nTotal, psfClump.nSigma, psfClump.X, psfClump.Y, sqrt(psfClump.X) / sigma[i], sqrt(psfClump.Y) / sigma[i]);559 psLogMsg ("psphot", 3, "sigma guess (pix) %.1f, nStars: %d of %d in clump, nSigma: %5.2f, X, Y: %f, %f (%f, %f)\n", sigma[i], psfClump.nStars, psfClump.nTotal, psfClump.nSigma, psfClump.X, psfClump.Y, sqrt(psfClump.X) / sigma[i], sqrt(psfClump.Y) / sigma[i]); 557 560 558 561 Rmin[i] = pmSourceMinKronRadius(sources, PSF_SN_LIM);
Note:
See TracChangeset
for help on using the changeset viewer.
