Changeset 27492
- Timestamp:
- Mar 28, 2010, 11:01:11 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20100225/psphot/src/psphotKernelFromPSF.c
r17396 r27492 4 4 5 5 assert (source); 6 assert (source->psf Flux); // XXX build if needed?6 assert (source->psfImage); // XXX build if needed? 7 7 8 int x0 = source->peak->xf - source->psf Flux->col0;9 int y0 = source->peak->yf - source->psf Flux->row0;8 int x0 = source->peak->xf - source->psfImage->col0; 9 int y0 = source->peak->yf - source->psfImage->row0; 10 10 11 11 // need to decide on the size: dynamically? statically? … … 17 17 // if the realized PSF for this object does not cover the full kernel, give up for now 18 18 if (x0 + psf->xMin < 0) goto escape; 19 if (x0 + psf->xMax >= source->psf Flux->numCols) goto escape;19 if (x0 + psf->xMax >= source->psfImage->numCols) goto escape; 20 20 if (y0 + psf->yMin < 0) goto escape; 21 if (y0 + psf->yMax >= source->psf Flux->numRows) goto escape;21 if (y0 + psf->yMax >= source->psfImage->numRows) goto escape; 22 22 23 23 double sum = 0.0; 24 24 for (int j = psf->yMin; j <= psf->yMax; j++) { 25 25 for (int i = psf->xMin; i <= psf->xMax; i++) { 26 double value = source->psf Flux->data.F32[y0 + j][x0 + i];26 double value = source->psfImage->data.F32[y0 + j][x0 + i]; 27 27 psf->kernel[j][i] = value; 28 28 sum += value;
Note:
See TracChangeset
for help on using the changeset viewer.
