Changeset 31154 for trunk/psphot/src/psphotFitSourcesLinear.c
- Timestamp:
- Apr 4, 2011, 1:12:39 PM (15 years ago)
- Location:
- trunk/psphot
- Files:
-
- 2 edited
-
. (modified) (2 props)
-
src/psphotFitSourcesLinear.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot
- Property svn:ignore
-
old new 19 19 psphot-config 20 20 Doxyfile 21 a.out.dSYM
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
trunk/psphot/src/psphotFitSourcesLinear.c
r30624 r31154 121 121 // covarFactor = 1.0; 122 122 123 int Nsat = 0; 124 123 125 // select the sources which will be used for the fitting analysis 124 126 for (int i = 0; i < sources->n; i++) { … … 134 136 // do not include CRs in the full ensemble fit 135 137 if (source->mode & PM_SOURCE_MODE_CR_LIMIT) continue; 138 139 // XXX count saturated stars 140 if (source->mode & PM_SOURCE_MODE_SATSTAR) { 141 Nsat ++; 142 } 136 143 137 144 if (final) { … … 167 174 if (modelSum < 0.8) { 168 175 fprintf (stderr, "low-sig model @ %f, %f (%f sum, %f peak)\n", 169 source->peak->xf, source->peak->yf, modelSum, source->peak-> flux);176 source->peak->xf, source->peak->yf, modelSum, source->peak->rawFlux); 170 177 } 171 178 … … 179 186 } 180 187 psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "built fitSources: %f sec (%ld objects)\n", psTimerMark ("psphot.linear"), sources->n); 188 189 // fprintf (stderr, "****** Nsat : %d ********\n", Nsat); 181 190 182 191 if (fitSources->n == 0) { … … 303 312 for (int i = 0; i < fitSources->n; i++) { 304 313 pmSource *source = fitSources->data[i]; 305 if (source->mode & PM_SOURCE_MODE_NONLINEAR_FIT) continue;306 314 pmModel *model = pmSourceGetModel (NULL, source); 307 pmSourceChisq (model, source->pixels, source->maskObj, source->variance, maskVal, covarFactor); 315 if (!(source->mode & PM_SOURCE_MODE_NONLINEAR_FIT)) { 316 model->nPar = 1; // LINEAR-only sources have 1 parameter; NONLINEAR sources have their original value 317 } 318 pmSourceChisq (model, source->pixels, source->maskObj, source->variance, maskVal); 308 319 } 309 320 psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "get chisqs: %f sec (%d elements)\n", psTimerMark ("psphot.linear"), sparse->Nelem); … … 324 335 // We have to place this visualization here because the models are not realized until 325 336 // psphotGuessModels or fitted until psphotFitSourcesLinear. 326 psphotVisualShowPSFStars (recipe, psf, sources);337 // psphotVisualShowPSFStars (recipe, psf, sources); 327 338 328 339 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
