- Timestamp:
- Sep 7, 2012, 10:06:48 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120905/psphot/src/psphotBlendFit.c
r34409 r34415 96 96 assert (status && isfinite(skySig) && skySig > 0); 97 97 98 # if ( 1)98 # if (0) 99 99 // **** test block : generate an ID image where pixels are set based the source models (flux > 0.1 peak && flux > 2.0 skySig) 100 100 psImage *IDimage = psImageAlloc (readout->image->numCols, readout->image->numRows, PS_TYPE_S32); … … 258 258 259 259 int TEST_ON = false; 260 # if ( 1)260 # if (0) 261 261 # define TEST_X 653 262 262 # define TEST_Y 466 263 263 if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) { 264 264 fprintf (stderr, "test object\n"); 265 //psTraceSetLevel("psLib.math.psMinimizeLMChi2", 5);265 psTraceSetLevel("psLib.math.psMinimizeLMChi2", 5); 266 266 TEST_ON = true; 267 267 } … … 379 379 if (!source) return false; 380 380 if (!source->peak) return false; // XXX how can we have a peak-less source? 381 382 # if (0) 383 # define TEST_X 653 384 # define TEST_Y 466 385 if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) { 386 fprintf (stderr, "test object\n"); 387 } 388 # undef TEST_X 389 # undef TEST_Y 390 # endif 391 381 392 if (!source->moments) return false; 382 393 if (source->type == PM_SOURCE_TYPE_DEFECT) return false; … … 473 484 474 485 // what is the radius for a specific peak fraction? 475 for (int i = 0; i < logFmodel->n; i++) {486 for (int i = 1; i < logFmodel->n; i++) { 476 487 float logF = logFmodel->data.F32[i]; 488 if (!isfinite(logF)) continue; 489 477 490 float flux = pow(10.0, logF); 478 491 if (flux > threshold) continue; 479 if (i == 0) continue;480 492 481 493 float logF0 = logFmodel->data.F32[i - 1]; … … 512 524 int ID = source->id; 513 525 526 fprintf (stderr, "Xo,Yo: %f,%f; radius: %f\n", Xo, Yo, radius); 527 514 528 for (int iy = minY; iy < maxY; iy++) { 515 529 for (int ix = minX; ix < maxX; ix++) {
Note:
See TracChangeset
for help on using the changeset viewer.
