Changeset 5802 for trunk/psphot/src/psphotEnsemblePSF.c
- Timestamp:
- Dec 17, 2005, 10:26:59 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotEnsemblePSF.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotEnsemblePSF.c
r5772 r5802 6 6 float x; 7 7 float y; 8 float Sky;9 8 10 9 psTimerStart ("psphot"); … … 14 13 15 14 float OUTER_RADIUS = psMetadataLookupF32 (&status, config, "SKY_OUTER_RADIUS"); 15 float INNER_RADIUS = psMetadataLookupF32 (&status, config, "SKY_INNER_RADIUS"); 16 16 float PSF_FIT_NSIGMA = psMetadataLookupF32 (&status, config, "PSF_FIT_NSIGMA"); 17 17 float PSF_FIT_PADDING = psMetadataLookupF32 (&status, config, "PSF_FIT_PADDING"); … … 38 38 pmSource *otSource = pmSourceAlloc (); 39 39 40 // really saturated stars should be re-measured for a better centroid 41 // XXX EAM : move this to a 'clear satstar function' 42 // XXX EAM : extend size of fit box around SATSTAR 43 if (inSource->mode & PM_SOURCE_SATSTAR) { 44 status = pmSourceMoments (inSource, INNER_RADIUS); 45 } 46 40 47 // XXX EAM : add option to use FLT or PSF form 41 48 // use the source moments, etc to guess basic model parameters 42 49 pmModel *modelFLT = pmSourceModelGuess (inSource, psf->type); 50 if (inSource->mode & PM_SOURCE_SATSTAR) { 51 modelFLT->params->data.F32[2] = inSource->moments->x; 52 modelFLT->params->data.F32[3] = inSource->moments->y; 53 } 54 // XXX EAM : add option to peak-up on peak (for non-sat objects) 43 55 44 56 // set PSF parameters for this model … … 69 81 psImage *flux = otSource->pixels; 70 82 psImage *mask = otSource->mask; 71 72 // XXX EAM : use these lines to fit to the peak73 // model->params->data.F32[2] = inSource->peak->x;74 // model->params->data.F32[3] = inSource->peak->y;75 // XXX EAM : better option: improve the peak with 2D poly fit 3x376 83 77 84 // set model to unit peak, zero sky (we assume sky is constant) … … 136 143 137 144 Fi->modelPSF = Mi->modelPSF; 145 146 // assign linearly-fitted normalization 138 147 Fi->modelPSF->params->data.F32[1] = norm->data.F32[i]; 139 148 140 149 // subtract object 141 150 pmSourceSubModel (Fi->pixels, Fi->mask, Fi->modelPSF, false, false); 142 143 Fi->modelPSF->params->data.F32[0] = Sky;144 // need to set this!145 151 } 146 152
Note:
See TracChangeset
for help on using the changeset viewer.
