Changeset 36586
- Timestamp:
- Mar 14, 2014, 1:57:09 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20140114/psModules/src/objects/pmSourceIO_CFF.c
r36441 r36586 246 246 pmModelType sersicModelType = pmModelClassGetType("PS_MODEL_SERSIC"); 247 247 248 psString modelToChoose = psMetadataLookupStr(&mdok, recipe, "EXT_MODEL_TYPE_FOR_CFF"); 249 pmModelType selectedModelType = -1; 250 if (mdok && modelToChoose != NULL) { 251 if (strcmp(modelToChoose, "BEST")) { 252 selectedModelType = pmModelClassGetType(modelToChoose); 253 } 254 } 255 248 256 for (int i = 0; i < sources->n; i++) { 249 257 pmSource *thisSource = sources->data[i]; … … 272 280 theta = 0; 273 281 } else { 274 // Choose the extended model to use for this source. 275 // For now we use the one set as the modelEXT for this source which had the best fit. 276 // XXX: make this controllable by recipe 277 // use best (as implemented here) 278 // choose specific type 282 // Find the model with the selected type. If selected type is -1 choose the one selected ad 283 // modelEXT which was the best 279 284 int iModel = -1; 280 285 if (source->modelEXT) { 281 pmModelType ext_model_type = source->modelEXT->type;286 pmModelType ext_model_type = selectedModelType != -1 ? selectedModelType : source->modelEXT->type; 282 287 for (int j=0; j<source->modelFits->n; j++) { 283 288 pmModel *aModel = source->modelFits->data[j];
Note:
See TracChangeset
for help on using the changeset viewer.
