- Timestamp:
- Apr 6, 2016, 3:05:19 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/src/loadgalphot_readstars.c
r39330 r39515 61 61 // in xfit, we have strings. these are listed with their numerical 62 62 // match in the PHU. I need to read the list of names and set up a string hash 63 64 int ModelTypeDev = -1; 65 int ModelTypeExp = -1; 63 66 64 67 int ModelTypeN; … … 98 101 if (!gfits_scan (&header_xfit, name, "%d", 1, &tmpnumber)) { myAbort ("fail"); } 99 102 ModelTypeNum[i] = tmpnumber; 103 if (!strcasecmp (ModelTypeName[i], "PS_MODEL_EXP")) { 104 ModelTypeExp = ModelTypeNum[i]; 105 } 106 if (!strcasecmp (ModelTypeName[i], "PS_MODEL_DEV")) { 107 ModelTypeDev = ModelTypeNum[i]; 108 } 100 109 } 101 110 … … 117 126 GET_COLUMN (xfit, INDEX, "EXT_PAR_07", float); 118 127 int Nfit = Nrow; 128 129 float DEV_INDEX_VALUE = 0.5 / 4.0; 130 float EXP_INDEX_VALUE = 0.5 / 1.0; 131 132 // note that INDEX here is defined as 1.0 / (2 \nu), where \nu is the traditional sersic 133 // expression. 119 134 120 135 myAssert (NcharModel < 256, "max model type name is very long: %d", NcharModel); … … 247 262 stars[i].galphot.theta = EXT_THETA[ifit]; 248 263 stars[i].galphot.thetaErr = EXT_THETA_ERR[ifit]; 249 stars[i].galphot.index = INDEX[ifit];250 264 stars[i].galphot.Npix = NPIX[i]; 251 265 stars[i].galphot.modelType = MODEL_TYPE_gal[i]; 266 if (INDEX) { 267 stars[i].galphot.index = INDEX[ifit]; 268 } else { 269 if (MODEL_TYPE_gal[i] == ModelTypeDev) { stars[i].galphot.index = DEV_INDEX_VALUE; } 270 if (MODEL_TYPE_gal[i] == ModelTypeExp) { stars[i].galphot.index = EXP_INDEX_VALUE; } 271 } 252 272 stars[i].galphot.detID = ID_gal[i]; 253 273 stars[i].galphot.photcode = options->photcode;
Note:
See TracChangeset
for help on using the changeset viewer.
