Changeset 36269
- Timestamp:
- Nov 8, 2013, 10:40:05 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130904/psModules/src/objects/pmSourceIO_CMF.c.in
r36266 r36269 1064 1064 // EXT_MODEL_TYPE gives the model chosen by psphot as the best. 1065 1065 // Putting this into the XFIT table makes 3 copies of it (one for each model) 1066 // but since we have fewer XFIT rows than psf rows that is cheaper than putting it1066 // but since we have many fewer XFIT rows than psf rows that is cheaper than putting it 1067 1067 // in the psf table. 1068 1068 psS32 extModelType = psMetadataLookupS32(&status, row, "EXT_MODEL_TYPE"); 1069 if (!status) { 1070 // older cmfs don't have this column 1071 extModelType = -1; 1072 } 1069 1073 1070 1074 psEllipseAxes axes; … … 1095 1099 model->covar = covar; 1096 1100 1097 psArrayAdd(source->modelFits, 1, model);1098 psFree(model);1099 1100 1101 if (modelType == extModelType) { 1101 1102 // The software that created this source picked this model as the best of the fits. 1102 1103 // Set the extModel to point to it. 1104 // This is important for programs like psastro (skycal) so that its output cmfs 1105 // will have valid EXT_MODEL_TYPE 1103 1106 psFree(source->modelEXT); 1104 1107 source->modelEXT = psMemIncrRefCounter(model); 1108 source->type = PM_SOURCE_TYPE_EXTENDED; 1105 1109 if (0) { 1106 // since FLAGS were read we shouldn't need to do this. 1107 source->type = PM_SOURCE_TYPE_EXTENDED; 1110 // since FLAGS were read we don't need to do this 1108 1111 source->mode |= PM_SOURCE_MODE_EXTMODEL; 1109 source->mode |= PM_SOURCE_MODE_NONLINEAR_FIT; // XXX: Is this safe?1112 source->mode |= PM_SOURCE_MODE_NONLINEAR_FIT; 1110 1113 } 1111 1114 } 1112 1115 1116 psArrayAdd(source->modelFits, 1, model); 1117 psFree(model); 1113 1118 psFree(row); 1114 1119 }
Note:
See TracChangeset
for help on using the changeset viewer.
