Changeset 11170
- Timestamp:
- Jan 18, 2007, 6:52:40 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotGuessModels.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotGuessModels.c
r10803 r11170 16 16 if (source->type == PM_SOURCE_TYPE_SATURATED) continue; 17 17 18 // XXX if a source is faint, it will not have moments measured. 19 // it must be modelled as a PSF. In this case, we need to use 20 // the peak centroid to get the coordinates and get the peak flux 21 // from the image? 22 18 23 // use the source moments, etc to guess basic model parameters 19 24 pmModel *modelEXT = pmSourceModelGuess (source, psf->type); 20 if (source->mode & PM_SOURCE_MODE_SATSTAR) { 21 modelEXT->params->data.F32[PM_PAR_XPOS] = source->moments->x; 22 modelEXT->params->data.F32[PM_PAR_YPOS] = source->moments->y; 25 26 // XXX put this in a function of its own.. 27 if (modelEXT == NULL) { 28 modelEXT = pmModelAlloc(psf->type); 29 psF32 *PAR = modelEXT->params->data.F32; 30 PAR[PM_PAR_SKY] = 0; 31 // XXX get this from the image pixels 32 PAR[PM_PAR_I0] = source->peak->flux; 33 PAR[PM_PAR_XPOS] = source->peak->xf; 34 PAR[PM_PAR_YPOS] = source->peak->yf; 23 35 } else { 24 modelEXT->params->data.F32[PM_PAR_XPOS] = source->peak->xf; 25 modelEXT->params->data.F32[PM_PAR_YPOS] = source->peak->yf; 36 // these valuse are set in pmSourceModelGuess, should this rule be in there as well? 37 if (source->mode & PM_SOURCE_MODE_SATSTAR) { 38 modelEXT->params->data.F32[PM_PAR_XPOS] = source->moments->x; 39 modelEXT->params->data.F32[PM_PAR_YPOS] = source->moments->y; 40 } else { 41 modelEXT->params->data.F32[PM_PAR_XPOS] = source->peak->xf; 42 modelEXT->params->data.F32[PM_PAR_YPOS] = source->peak->yf; 43 } 26 44 } 27 45
Note:
See TracChangeset
for help on using the changeset viewer.
