- Timestamp:
- Apr 26, 2011, 5:54:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110404/psphot/src/psphotFitSourcesLinear.c
r31381 r31384 137 137 if (source->mode & PM_SOURCE_MODE_CR_LIMIT) continue; 138 138 139 // do not include MOMENTS_FAILURES in the fit 140 if (source->mode & PM_SOURCE_MODE_MOMENTS_FAILURE) continue; 141 139 142 // XXX count saturated stars 140 143 if (source->mode & PM_SOURCE_MODE_SATSTAR) { … … 166 169 // apply mask? 167 170 float modelSum = 0.0; 171 float maskedSum = 0.0; 168 172 for (int iy = 0; iy < source->modelFlux->numRows; iy++) { 169 173 for (int ix = 0; ix < source->modelFlux->numCols; ix++) { 170 174 modelSum += source->modelFlux->data.F32[iy][ix]; 175 if (source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix] & maskVal) continue; 176 maskedSum += source->modelFlux->data.F32[iy][ix]; 171 177 } 172 178 } 173 179 if (modelSum < 0.5) continue; // skip sources with no model constraint (somewhat arbitrary limit) 174 180 if (modelSum < 0.8) { 175 fprintf (stderr, "low-sig model @ %f, %f (%f sum, %f peak)\n", 176 source->peak->xf, source->peak->yf, modelSum, source->peak->rawFlux); 181 fprintf (stderr, "low-sig model @ %f, %f (%f masked sum, %f sum, %f peak)\n", 182 source->peak->xf, source->peak->yf, maskedSum, modelSum, source->peak->rawFlux); 183 } 184 if (maskedSum < 0.5) { 185 fprintf (stderr, "worrying model @ %f, %f (%f masked sum, %f sum, %f peak)\n", 186 source->peak->xf, source->peak->yf, maskedSum, modelSum, source->peak->rawFlux); 177 187 } 178 188
Note:
See TracChangeset
for help on using the changeset viewer.
