- Timestamp:
- Mar 1, 2011, 6:21:28 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/psphot/src/psphotExtendedSourceFits.c
r30764 r30772 43 43 int NplainPass = 0; 44 44 int Nfaint = 0; 45 int Nfail = 0; 45 46 46 47 psTimerStart ("psphot.extended"); … … 176 177 PS_ARRAY_ADD_SCALAR(job->args, 0, PS_TYPE_S32); // this is used as a return value for Nplain 177 178 PS_ARRAY_ADD_SCALAR(job->args, 0, PS_TYPE_S32); // this is used as a return value for NplainPass 178 PS_ARRAY_ADD_SCALAR(job->args, 0, PS_TYPE_S32); // this is used as a return value for Nfain 179 PS_ARRAY_ADD_SCALAR(job->args, 0, PS_TYPE_S32); // this is used as a return value for Nfaint 180 PS_ARRAY_ADD_SCALAR(job->args, 0, PS_TYPE_S32); // this is used as a return value for Nfail 179 181 180 182 // set this to 0 to run without threading … … 204 206 scalar = job->args->data[12]; 205 207 Nfaint += scalar->data.S32; 208 scalar = job->args->data[13]; 209 Nfail += scalar->data.S32; 206 210 psFree(job); 207 211 # endif … … 234 238 scalar = job->args->data[12]; 235 239 Nfaint += scalar->data.S32; 240 scalar = job->args->data[13]; 241 Nfail += scalar->data.S32; 236 242 } 237 243 psFree(job); … … 244 250 psLogMsg ("psphot", PS_LOG_INFO, " %d convolved models (%d passed)\n", Nconvolve, NconvolvePass); 245 251 psLogMsg ("psphot", PS_LOG_INFO, " %d plain models (%d passed)\n", Nplain, NplainPass); 246 psLogMsg ("psphot", PS_LOG_INFO, " %d too faint to fit \n", Nfaint);252 psLogMsg ("psphot", PS_LOG_INFO, " %d too faint to fit, %d failed\n", Nfaint, Nfail); 247 253 return true; 248 254 } … … 253 259 bool status; 254 260 int Next = 0; 261 int Nfaint = 0; 262 int Nfail = 0; 255 263 int Nconvolve = 0; 256 264 int NconvolvePass = 0; 257 265 int Nplain = 0; 258 int Nfaint = 0;259 266 int NplainPass = 0; 260 267 bool savePics = false; … … 271 278 psImageMaskType markVal = PS_SCALAR_VALUE(job->args->data[6],PS_TYPE_IMAGE_MASK_DATA); 272 279 273 pthread_t tid = pthread_self(); // Thread identifier280 // pthread_t tid = pthread_self(); // Thread identifier 274 281 275 282 // Define source fitting parameters for extended source fits … … 305 312 // if (source->modelEXT == NULL) continue; 306 313 307 fprintf (stderr, "fit %d,%d in thread %d\n", source->peak->x, source->peak->y, (int) tid);314 // fprintf (stderr, "fit %d,%d in thread %d\n", source->peak->x, source->peak->y, (int) tid); 308 315 309 316 // replace object in image … … 398 405 if (!modelFit) { 399 406 psTrace ("psphot", 5, "failed to fit psf-conv model for object at %f, %f", source->moments->Mx, source->moments->My); 407 Nfail ++; 400 408 continue; 401 409 } … … 412 420 if (!modelFit) { 413 421 psTrace ("psphot", 5, "failed to fit plain model for object at %f, %f", source->moments->Mx, source->moments->My); 422 Nfail ++; 414 423 continue; 415 424 } … … 529 538 scalar->data.S32 = Nfaint; 530 539 540 scalar = job->args->data[13]; 541 scalar->data.S32 = Nfail; 542 531 543 return true; 532 544 }
Note:
See TracChangeset
for help on using the changeset viewer.
