- Timestamp:
- Dec 17, 2010, 9:57:34 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/psphot/src/psphotExtendedSourceFits.c
r29936 r30101 18 18 int num = psphotFileruleCount(config, filerule); 19 19 20 // skip the chisq image (optionally?) 21 int chisqNum = psMetadataLookupS32 (&status, config->arguments, "PSPHOT.CHISQ.NUM"); 22 if (!status) chisqNum = -1; 23 20 24 // loop over the available readouts 21 25 for (int i = 0; i < num; i++) { 26 if (i == chisqNum) continue; // skip chisq image 22 27 if (!psphotExtendedSourceFitsReadout (config, view, filerule, i, recipe)) { 23 28 psError (PSPHOT_ERR_CONFIG, false, "failed on to fit extended sources for %s entry %d", filerule, i); … … 37 42 int Nplain = 0; 38 43 int NplainPass = 0; 44 int Nfaint = 0; 39 45 40 46 psTimerStart ("psphot.extended"); … … 46 52 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 47 53 psAssert (readout, "missing readout?"); 54 55 psLogMsg("psphot", PS_LOG_INFO, "extended source fits for image %d", index); 56 psphotVisualShowImage(readout); 48 57 49 58 pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS"); … … 167 176 PS_ARRAY_ADD_SCALAR(job->args, 0, PS_TYPE_S32); // this is used as a return value for Nplain 168 177 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 169 179 170 180 if (false && !psThreadJobAddPending(job)) { … … 189 199 scalar = job->args->data[11]; 190 200 NplainPass += scalar->data.S32; 201 scalar = job->args->data[12]; 202 Nfaint += scalar->data.S32; 191 203 psFree(job); 192 204 } … … 217 229 scalar = job->args->data[11]; 218 230 NplainPass += scalar->data.S32; 231 scalar = job->args->data[12]; 232 Nfaint += scalar->data.S32; 219 233 } 220 234 psFree(job); … … 227 241 psLogMsg ("psphot", PS_LOG_INFO, " %d convolved models (%d passed)\n", Nconvolve, NconvolvePass); 228 242 psLogMsg ("psphot", PS_LOG_INFO, " %d plain models (%d passed)\n", Nplain, NplainPass); 243 psLogMsg ("psphot", PS_LOG_INFO, " %d too faint to fit\n", Nfaint); 229 244 return true; 230 245 } … … 238 253 int NconvolvePass = 0; 239 254 int Nplain = 0; 255 int Nfaint = 0; 240 256 int NplainPass = 0; 241 257 bool savePics = false; … … 350 366 // limit selection to some SN limit 351 367 assert (source->peak); // how can a source not have a peak? 352 if (source->peak->SN < SNlim) continue; 368 if (source->peak->SN < SNlim) { 369 Nfaint ++; 370 continue; 371 } 353 372 354 373 // check on the model type … … 497 516 scalar->data.S32 = NplainPass; 498 517 518 scalar = job->args->data[12]; 519 scalar->data.S32 = Nfaint; 520 499 521 return true; 500 522 }
Note:
See TracChangeset
for help on using the changeset viewer.
