Changeset 21366 for trunk/psphot/src/psphotFitSourcesLinear.c
- Timestamp:
- Feb 5, 2009, 5:03:33 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotFitSourcesLinear.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotFitSourcesLinear.c
r21183 r21366 68 68 69 69 // if (source->type == PM_SOURCE_TYPE_STAR && 70 if (source->mode & PM_SOURCE_MODE_CR_LIMIT) continue;70 if (source->mode & PM_SOURCE_MODE_CR_LIMIT) continue; 71 71 72 72 if (final) { … … 76 76 } 77 77 78 // generate model for sources without, or skip if we can't79 if (!source->modelFlux) {80 if (!pmSourceCacheModel (source, maskVal)) continue;81 }78 // generate model for sources without, or skip if we can't 79 if (!source->modelFlux) { 80 if (!pmSourceCacheModel (source, maskVal)) continue; 81 } 82 82 83 83 // save the original coords … … 96 96 97 97 // vectors to store stats for each object 98 // psVector * weight= psVectorAlloc (fitSources->n, PS_TYPE_F32);98 // psVector *variance = psVectorAlloc (fitSources->n, PS_TYPE_F32); 99 99 psVector *errors = psVectorAlloc (fitSources->n, PS_TYPE_F32); 100 100 … … 128 128 psSparseVectorElement (sparse, i, f); 129 129 130 // add the per-source weights (border region)130 // add the per-source variances (border region) 131 131 switch (SKY_FIT_ORDER) { 132 132 case 1: … … 208 208 pmSource *source = fitSources->data[i]; 209 209 pmModel *model = pmSourceGetModel (NULL, source); 210 pmSourceChisq (model, source->pixels, source->maskObj, source-> weight, maskVal);210 pmSourceChisq (model, source->pixels, source->maskObj, source->variance, maskVal); 211 211 } 212 212 psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "get chisqs: %f sec (%d elements)\n", psTimerMark ("psphot.linear"), sparse->Nelem); … … 253 253 // accumulate the image statistics from the masked regions 254 254 psF32 **image = readout->image->data.F32; 255 psF32 ** weight = readout->weight->data.F32;255 psF32 **variance = readout->variance->data.F32; 256 256 psImageMaskType **mask = readout->mask->data.PS_TYPE_IMAGE_MASK_DATA; 257 257 … … 268 268 wt = 1.0; 269 269 } else { 270 wt = weight[j][i];270 wt = variance[j][i]; 271 271 } 272 272 f = image[j][i];
Note:
See TracChangeset
for help on using the changeset viewer.
