- Timestamp:
- Dec 26, 2013, 1:34:58 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bills_branches/bills_201312/psModules/src/objects/pmSourceIO_CFF.c
r36389 r36412 65 65 int modelType = pmModelClassGetType ("PS_MODEL_GAUSS"); 66 66 67 // Read lookup table for model classes (if defined) 68 pmModelClassReadHeader(header); 69 67 70 char *PSF_NAME = psMetadataLookupStr (&status, header, "PSFMODEL"); 68 71 if (PSF_NAME != NULL) { … … 111 114 float theta = psMetadataLookupF32 (&status, row, "THETA"); 112 115 113 // XXX: we need to put a lookup table in the cff header to define the correspondence of the114 // model type values in the cff with our models. (We want to use an interger for efficiency115 // but the value for each model type is set on the organization of the the array in pmModelClass.c116 // For now use the input values verbatim and trust the user that this is valid value117 116 int galaxyModelType = psMetadataLookupS32(&status, row, "MODEL_TYPE"); 117 if (status) { 118 galaxyModelType = pmModelClassGetLocalType(galaxyModelType); 119 } else { 120 galaxyModelType = -1; 121 } 118 122 float Sindex = psMetadataLookupF32 (&status, row, "INDEX"); // Should this be PAR_07 not sersic index 119 123 … … 181 185 } 182 186 183 // XXX: should use < 0 as invalid galaxyModelType 184 185 if (fitGalaxy && galaxyModelType > 0) { 187 if (fitGalaxy && galaxyModelType >= 0) { 186 188 source->modelFits = psArrayAllocEmpty (1); 187 189 pmModel *model = pmModelAlloc(galaxyModelType); … … 235 237 psF32 exptime = psMetadataLookupF32(&mdok, readout->parent->concepts, "CELL.EXPOSURE"); 236 238 PS_ASSERT(mdok, false); 239 240 // write the definition of the model class type values to the header 241 pmModelClassWriteHeader(header); 237 242 238 243 psArray *table = psArrayAllocEmpty(sources->n);
Note:
See TracChangeset
for help on using the changeset viewer.
