Changeset 30170
- Timestamp:
- Dec 24, 2010, 3:24:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/psphot/src/psphotFitSourcesLinear.c
r30140 r30170 46 46 return false; 47 47 } 48 49 psphotVisualShowResidualImage (readout, (num > 0)); 50 psphotVisualShowPeaks (detections); 51 psphotVisualShowObjectRegions (readout, recipe, sources); 48 52 } 49 53 return true; … … 151 155 if (x > AnalysisRegion.x1) continue; 152 156 if (y > AnalysisRegion.y1) continue; 157 158 // check the integral of the model : is it large enough? 159 float modelSum = 0.0; 160 for (int iy = 0; iy < source->modelFlux->numRows; iy++) { 161 for (int ix = 0; ix < source->modelFlux->numCols; ix++) { 162 modelSum += source->modelFlux->data.F32[iy][ix]; 163 } 164 } 165 if (modelSum < 0.01) continue; // skip sources with no model constraint (somewhat arbitrary limit) 166 167 pmModel *model = pmSourceGetModel (NULL, source); 168 169 psImageMaskPixels (source->maskObj, "AND", PS_NOT_IMAGE_MASK(markVal)); 170 psImageKeepCircle (source->maskObj, source->peak->x, source->peak->y, model->fitRadius, "OR", markVal); 153 171 154 172 source->mode |= PM_SOURCE_MODE_LINEAR_FIT; … … 270 288 model->params->data.F32[PM_PAR_I0] = norm->data.F32[i]; 271 289 model->dparams->data.F32[PM_PAR_I0] = errors->data.F32[i]; 272 // XXX is the value of 'errors' modified by the sky fit?273 290 274 291 // subtract object … … 297 314 psLogMsg ("psphot.ensemble", PS_LOG_INFO, "measure ensemble of PSFs: %f sec\n", psTimerMark ("psphot.linear")); 298 315 299 psphotVisualShowImage (readout);300 psphotVisualShowResidualImage (readout);301 316 psphotVisualPlotChisq (sources); 302 317 // psphotVisualShowFlags (sources);
Note:
See TracChangeset
for help on using the changeset viewer.
