Changeset 23445
- Timestamp:
- Mar 19, 2009, 4:06:05 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotFitSourcesLinear.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotFitSourcesLinear.c
r21519 r23445 63 63 pmSource *source = sources->data[i]; 64 64 65 // turn this bit off and turn it on again if we pass this test66 source->mode &= ~PM_SOURCE_MODE_LINEAR_FIT;65 // turn this bit off and turn it on again if we pass this test 66 source->mode &= ~PM_SOURCE_MODE_LINEAR_FIT; 67 67 68 68 // skip non-astronomical objects (very likely defects) … … 70 70 if (source->type == PM_SOURCE_TYPE_SATURATED) continue; 71 71 72 // do not include CRs in the full ensemble fit72 // do not include CRs in the full ensemble fit 73 73 if (source->mode & PM_SOURCE_MODE_CR_LIMIT) continue; 74 74 … … 94 94 if (y > AnalysisRegion.y1) continue; 95 95 96 source->mode |= PM_SOURCE_MODE_LINEAR_FIT;96 source->mode |= PM_SOURCE_MODE_LINEAR_FIT; 97 97 psArrayAdd (fitSources, 100, source); 98 98 } 99 99 psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "built fitSources: %f sec (%ld objects)\n", psTimerMark ("psphot.linear"), sources->n); 100 101 if (fitSources->n == 0) { 102 return true; 103 } 100 104 101 105 // vectors to store stats for each object … … 189 193 psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "solve matrix: %f sec (%d elements)\n", psTimerMark ("psphot.linear"), sparse->Nelem); 190 194 191 // XXXX **** philosophical question: 195 // XXXX **** philosophical question: 192 196 // we measure bright objects in three passes: 1) linear fit; 2) non-linear fit; 3) linear fit: 193 // should retain the chisq and errors from the intermediate non-linear fit? 194 // the non-linear fit provides better values for the position errors, and for 197 // should retain the chisq and errors from the intermediate non-linear fit? 198 // the non-linear fit provides better values for the position errors, and for 195 199 // extended sources, the shape errors 196 200 … … 218 222 for (int i = 0; final && (i < fitSources->n); i++) { 219 223 pmSource *source = fitSources->data[i]; 220 if (source->mode & PM_SOURCE_MODE_NONLINEAR_FIT) continue;224 if (source->mode & PM_SOURCE_MODE_NONLINEAR_FIT) continue; 221 225 pmModel *model = pmSourceGetModel (NULL, source); 222 226 pmSourceChisq (model, source->pixels, source->maskObj, source->variance, maskVal);
Note:
See TracChangeset
for help on using the changeset viewer.
