Changeset 36759 for trunk/psphot/src/psphotFullForceSummaryReadout.c
- Timestamp:
- May 21, 2014, 2:10:14 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotFullForceSummaryReadout.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotFullForceSummaryReadout.c
r36747 r36759 188 188 int ID = source0->seq; 189 189 190 // Find the parameters from the cff tables 190 // Find the parameters from the cff tables. nModels is the number of extended model types that 191 // this source has an entry for 191 192 int nModels = 0; 192 193 // skip table 0 which is modelType -1 not extended … … 227 228 } 228 229 } 229 if (nModels && !outSrc->modelFits && source->modelFits && source->modelFits->n == nModels) { 230 outSrc->modelFits = psMemIncrRefCounter(source->modelFits); 230 if (nModels && source->modelFits && source->modelFits->n) { 231 if (!outSrc->modelFits) { 232 outSrc->modelFits = psArrayAllocEmpty(nModels); 233 } 234 for (int iModel = 0; iModel < source->modelFits->n; iModel++) { 235 pmModel *newModel = source->modelFits->data[iModel]; 236 pmModel *outModel = NULL; 237 for (int jModel = 0; jModel < outSrc->modelFits->n; jModel++) { 238 outModel = outSrc->modelFits->data[jModel]; 239 if (newModel->type == outModel->type) { 240 // already have an entry for this type 241 break; 242 } 243 outModel = NULL; 244 } 245 if (!outModel) { 246 // no model of this type in output source yet. Add this one. 247 // Note: the parameters that we need (position, angle, index, if applicable) 248 // are the same for all sources so copying any of them is fine 249 psArrayAdd(outSrc->modelFits, 1, newModel); 250 } 251 } 231 252 } 232 253 }
Note:
See TracChangeset
for help on using the changeset viewer.
