- Timestamp:
- Feb 29, 2008, 2:16:50 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080229/psphot/src/psphotSourceSize.c
r15802 r16760 6 6 // compares the observed flux to the model. 7 7 8 bool psphotSourceSize (pmReadout *readout, psArray *sources, psMetadata *recipe) { 8 bool psphotSourceSize (pmReadout *readout, psArray *sources, psMetadata *recipe, long first) { 9 10 psTimerStart ("psphot"); 9 11 10 12 // loop over all source 11 for (int i = 0; i < sources->n; i++) {13 for (int i = first; i < sources->n; i++) { 12 14 pmSource *source = sources->data[i]; 13 15 16 // skip source if it was already measured 17 if (isfinite(source->crNsigma)) continue; 18 19 source->crNsigma = -1.0; 20 source->extNsigma = -1.0; 21 14 22 // source must have been subtracted 23 source->crNsigma = -3.0; 15 24 if (!(source->mode & PM_SOURCE_MODE_SUBTRACTED)) continue; 16 25 … … 23 32 24 33 // skip sources which are too close to a boundary 34 source->crNsigma = -4.0; 25 35 if (xPeak < 1) continue; 26 36 if (xPeak > source->pixels->numCols - 2) continue; … … 29 39 30 40 // XXX for now, just skip any sources with masked pixels 41 source->crNsigma = -5.0; 31 42 bool keep = true; 32 43 for (int iy = -1; (iy <= +1) && keep; iy++) { … … 97 108 source->extNsigma = (nEXT > 0) ? fabs(fEXT) / nEXT : 0.0; 98 109 // NOTE: abs needed to make the Nsigma value positive 110 111 if (!isfinite(source->crNsigma)) { 112 fprintf (stderr, "."); 113 source->crNsigma = -6.0; 114 } 115 99 116 } 117 118 psLogMsg ("psphot.size", PS_LOG_INFO, "measure source sizes for %ld sources: %f sec\n", sources->n - first, psTimerMark ("psphot")); 119 100 120 return true; 101 121 }
Note:
See TracChangeset
for help on using the changeset viewer.
