Changeset 31154 for trunk/psphot/src/psphotGuessModels.c
- Timestamp:
- Apr 4, 2011, 1:12:39 PM (15 years ago)
- Location:
- trunk/psphot
- Files:
-
- 2 edited
-
. (modified) (2 props)
-
src/psphotGuessModels.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot
- Property svn:ignore
-
old new 19 19 psphot-config 20 20 Doxyfile 21 a.out.dSYM
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
trunk/psphot/src/psphotGuessModels.c
r30038 r31154 160 160 pmSource *source = sources->data[i]; 161 161 162 if (source->mode & PM_SOURCE_MODE_MOMENTS_FAILURE) { 163 fprintf (stderr, "moment failure\n"); 164 } 165 162 166 // this is used to mark sources for which the model is measured. We check later that 163 167 // all are used. … … 172 176 173 177 // the guess central intensity comes from the peak: 174 float Io = source->peak->flux; 178 float Io = source->peak->rawFlux; 179 if (!isfinite(Io) && source->moments) { 180 Io = source->moments->Peak; 181 } 175 182 176 183 // We have two options to get a guess for the object position: the position from the … … 178 185 // moments 179 186 180 # if (1) 181 bool useMoments = true; 182 # else 183 bool useMoments = false; 184 useMoments = (source->mode & PM_SOURCE_MODE_SATSTAR); // we only want to try if SATSTAR is set, but.. 185 # endif 186 187 useMoments = (useMoments && source->moments); // can't if there are no moments 188 useMoments = (useMoments && source->moments->nPixels); // can't if the moments were not measured 189 useMoments = (useMoments && !(source->mode && PM_SOURCE_MODE_MOMENTS_FAILURE)); // can't if the moments failed... 187 bool useMoments = pmSourcePositionUseMoments(source); 190 188 191 189 float Xo, Yo; … … 198 196 } 199 197 198 if (source->mode & PM_SOURCE_MODE_SATSTAR) { 199 fprintf (stderr, "satstar: %f,%f vs %f,%f : %c\n", 200 source->moments->Mx, source->moments->My, 201 source->peak->xf, source->peak->yf, 202 (useMoments ? 'T' : 'F')); 203 } 204 200 205 // set PSF parameters for this model (apply 2D shape model to coordinates Xo, Yo) 201 206 pmModel *modelPSF = pmModelFromPSFforXY(psf, Xo, Yo, Io);
Note:
See TracChangeset
for help on using the changeset viewer.
