- Timestamp:
- Mar 18, 2011, 2:10:35 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/psphot/src/psphotMergeSources.c
r30883 r30975 111 111 112 112 // the supplied peak flux needs to be re-normalized 113 source->peak->flux = 1.0; 114 source->peak->value = 1.0; 113 source->peak->rawFlux = 1.0; 114 source->peak->smoothFlux = 1.0; 115 source->peak->detValue = 1.0; 115 116 116 117 // drop the loaded source modelPSF … … 282 283 for (int i = 0; i < sources->n; i++) { 283 284 pmSource *source = sources->data[i]; 284 source->peak->flux = source->moments->Peak; 285 source->peak->rawFlux = source->moments->Peak; 286 source->peak->smoothFlux = source->moments->Peak; 285 287 } 286 288 … … 332 334 float ypos = model->params->data.F32[PM_PAR_YPOS]; 333 335 334 pmPeak *peak = pmPeakAlloc(xpos, ypos, 1.0, PM_PEAK_LONE);336 pmPeak *peak = pmPeakAlloc(xpos, ypos, flux, PM_PEAK_LONE); 335 337 peak->xf = xpos; 336 338 peak->yf = ypos; 337 peak->flux = flux; // this are being set wrong, but does it matter? 338 339 if (isfinite (source->errMag) && (source->errMag > 0.0)) { 340 peak->SN = 1.0 / source->errMag; 341 } else { 342 peak->SN = 0.0; 343 } 339 peak->rawFlux = flux; // this are being set wrong, but does it matter? 340 peak->smoothFlux = flux; // this are being set wrong, but does it matter? 344 341 345 342 psArrayAdd (detections->peaks, 100, peak); … … 383 380 float ypos = model->params->data.F32[PM_PAR_YPOS]; 384 381 385 pmPeak *peak = pmPeakAlloc(xpos, ypos, 1.0, PM_PEAK_LONE);382 pmPeak *peak = pmPeakAlloc(xpos, ypos, flux, PM_PEAK_LONE); 386 383 peak->xf = xpos; 387 384 peak->yf = ypos; 388 peak->flux = flux; // this are being set wrong, but does it matter? 389 390 if (isfinite (source->errMag) && (source->errMag > 0.0)) { 391 peak->SN = 1.0 / source->errMag; 392 } else { 393 peak->SN = 0.0; 394 } 385 peak->rawFlux = flux; // this are being set wrong, but does it matter? 386 peak->smoothFlux = flux; // this are being set wrong, but does it matter? 395 387 396 388 source->peak = peak; … … 686 678 objectsOut->data[k] = objectOut; 687 679 688 objectOut-> SN = objectSrc->SN;689 objectOut->x = objectSrc->x;690 objectOut->y = objectSrc->y;680 objectOut->flux = objectSrc->flux; 681 objectOut->x = objectSrc->x; 682 objectOut->y = objectSrc->y; 691 683 692 684 objectOut->sources = psArrayAlloc(objectSrc->sources->n);
Note:
See TracChangeset
for help on using the changeset viewer.
