- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/psModules
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/psModules merged eligible /branches/eam_branches/stackphot.20100406/psModules 27623-27653 /branches/pap_delete/psModules 27530-27595
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/simtest_nebulous_branches/psModules/src/objects/pmSourceFitModel.c
r23989 r27840 93 93 } 94 94 95 // skip nan values in image 96 if (!isfinite(source->variance->data.F32[i][j])) { 97 fprintf (stderr, "impossible! %x vs %x\n", source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA[i][j], maskVal); 98 continue; 99 } 100 95 101 psVector *coord = psVectorAlloc(2, PS_TYPE_F32); 96 102 97 103 // Convert i/j to image space: 98 coord->data.F32[0] = (psF32) (j + source->pixels->col0); 99 coord->data.F32[1] = (psF32) (i + source->pixels->row0); 104 // 0.5 PIX: the coordinate values must be in pixel coords, not index 105 coord->data.F32[0] = (psF32) (j + 0.5 + source->pixels->col0); 106 coord->data.F32[1] = (psF32) (i + 0.5 + source->pixels->row0); 100 107 x->data[nPix] = (psPtr *) coord; 101 108 y->data.F32[nPix] = source->pixels->data.F32[i][j]; … … 175 182 continue; 176 183 dparams->data.F32[i] = sqrt(covar->data.F32[i][i]); 177 if (psTraceGetLevel("psModules.objects") >= 4) { 178 fprintf (stderr, "%f +/- %f\n", params->data.F32[i], dparams->data.F32[i]); 179 } 184 psTrace ("psModules.objects", 4, "%f +/- %f", params->data.F32[i], dparams->data.F32[i]); 180 185 } 181 186 psTrace ("psModules.objects", 4, "niter: %d, chisq: %f", myMin->iter, myMin->value); … … 186 191 model->nPix = y->n; 187 192 model->nDOF = y->n - nParams; 193 model->chisqNorm = model->chisq / model->nDOF; 188 194 model->flags |= PM_MODEL_STATUS_FITTED; 189 195 if (!fitStatus) model->flags |= PM_MODEL_STATUS_NONCONVERGE;
Note:
See TracChangeset
for help on using the changeset viewer.
