- 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/psphotFitSourcesLinear.c (modified) (8 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/psphotFitSourcesLinear.c
r31452 r33415 17 17 bool status = true; 18 18 19 fprintf (stdout, "\n"); 20 psLogMsg ("psphot", PS_LOG_INFO, "--- psphot Fit Source (Linear) ---"); 21 19 22 // select the appropriate recipe information 20 23 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); … … 23 26 int num = psphotFileruleCount(config, filerule); 24 27 28 // skip the chisq image (optionally?) 29 int chisqNum = psMetadataLookupS32 (&status, config->arguments, "PSPHOT.CHISQ.NUM"); 30 if (!status) chisqNum = -1; 31 25 32 // loop over the available readouts 26 33 for (int i = 0; i < num; i++) { 34 if (i == chisqNum) continue; // skip chisq image 27 35 28 36 // find the currently selected readout … … 126 134 for (int i = 0; i < sources->n; i++) { 127 135 pmSource *source = sources->data[i]; 136 137 // psAssert (source->peak, "source without peak??"); 138 // psAssert (source->peak->footprint, "peak without footprint??"); 128 139 129 140 // turn this bit off and turn it on again if we pass this test … … 190 201 pmModel *model = pmSourceGetModel (&isPSF, source); 191 202 203 // clear the 'mark' pixels and remask on the fit aperture 192 204 psImageMaskPixels (source->maskObj, "AND", PS_NOT_IMAGE_MASK(markVal)); 193 205 psImageKeepCircle (source->maskObj, source->peak->x, source->peak->y, model->fitRadius, "OR", markVal); … … 203 215 } 204 216 psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "built fitSources: %f sec (%ld objects)\n", psTimerMark ("psphot.linear"), sources->n); 205 206 // fprintf (stderr, "****** Nsat : %d ********\n", Nsat);207 217 208 218 if (fitSources->n == 0) { … … 330 340 psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "solve matrix: %f sec (%d elements)\n", psTimerMark ("psphot.linear"), sparse->Nelem); 331 341 332 // XXXX **** philosophical question: 333 // we measure bright objects in three passes: 1) linear fit; 2) non-linear fit; 3) linear fit: 334 // should retain the chisq and errors from the intermediate non-linear fit? 335 // the non-linear fit provides better values for the position errors, and for 336 // extended sources, the shape errors 342 // Philosophical question: we measure bright objects in three passes: 1) linear fit; 2) 343 // non-linear fit; 3) linear fit: should we retain the chisq and errors from the 344 // intermediate non-linear fit? the non-linear fit provides better values for the position 345 // errors, and for extended sources, the shape errors 337 346 338 347 // adjust I0 for fitSources and subtract … … 349 358 model->dparams->data.F32[PM_PAR_I0] = errors->data.F32[i]; 350 359 351 // subtract object 360 // clear the 'mark' pixels so the subtraction covers the full window 361 psImageMaskPixels (source->maskObj, "AND", PS_NOT_IMAGE_MASK(markVal)); 362 363 // subtract object & add noise 352 364 pmSourceSub (source, PM_MODEL_OP_FULL, maskVal); 353 365 } … … 374 386 psFree (border); 375 387 376 psLogMsg ("psphot.ensemble", PS_LOG_ INFO, "measure ensemble of PSFs: %f sec\n", psTimerMark ("psphot.linear"));388 psLogMsg ("psphot.ensemble", PS_LOG_WARN, "measure ensemble of PSFs: %f sec\n", psTimerMark ("psphot.linear")); 377 389 378 390 psphotVisualPlotChisq (sources);
Note:
See TracChangeset
for help on using the changeset viewer.
