- Timestamp:
- Apr 18, 2011, 8:55:26 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110404/psphot/src/psphotFitSourcesLinear.c
r31154 r31313 164 164 165 165 // check the integral of the model : is it large enough? 166 // apply mask? 166 167 float modelSum = 0.0; 167 168 for (int iy = 0; iy < source->modelFlux->numRows; iy++) { … … 171 172 } 172 173 if (modelSum < 0.5) continue; // skip sources with no model constraint (somewhat arbitrary limit) 173 // if (modelSum < 0.01) continue; // skip sources with no model constraint (somewhat arbitrary limit)174 174 if (modelSum < 0.8) { 175 175 fprintf (stderr, "low-sig model @ %f, %f (%f sum, %f peak)\n", … … 177 177 } 178 178 179 pmModel *model = pmSourceGetModel (NULL, source); 179 bool isPSF = false; 180 pmModel *model = pmSourceGetModel (&isPSF, source); 180 181 181 182 psImageMaskPixels (source->maskObj, "AND", PS_NOT_IMAGE_MASK(markVal)); 182 183 psImageKeepCircle (source->maskObj, source->peak->x, source->peak->y, model->fitRadius, "OR", markVal); 183 184 184 source->mode |= PM_SOURCE_MODE_LINEAR_FIT; 185 // we call this function multiple times. for the first time, we have only PSF models for all objects 186 // the second time has extended sources. If we ever fit the PSF model, we should raise this bit 187 source->mode |= PM_SOURCE_MODE_LINEAR_FIT; 188 if (isPSF) { 189 source->mode |= PM_SOURCE_MODE_PSFMODEL; 190 } 191 185 192 psArrayAdd (fitSources, 100, source); 186 193 }
Note:
See TracChangeset
for help on using the changeset viewer.
