Changeset 16820 for trunk/psphot/src/psphotSourceSize.c
- Timestamp:
- Mar 4, 2008, 3:10:25 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotSourceSize.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotSourceSize.c
r15802 r16820 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 bool status; 11 12 psTimerStart ("psphot"); 13 14 float CR_NSIGMA_LIMIT = psMetadataLookupF32 (&status, recipe, "PSPHOT.CRNSIGMA.LIMIT"); 15 assert (status); 9 16 10 17 // loop over all source 11 for (int i = 0; i < sources->n; i++) {18 for (int i = first; i < sources->n; i++) { 12 19 pmSource *source = sources->data[i]; 13 20 21 // skip source if it was already measured 22 if (isfinite(source->crNsigma)) continue; 23 24 source->crNsigma = -1.0; 25 source->extNsigma = -1.0; 26 14 27 // source must have been subtracted 28 source->crNsigma = -3.0; 15 29 if (!(source->mode & PM_SOURCE_MODE_SUBTRACTED)) continue; 16 30 … … 23 37 24 38 // skip sources which are too close to a boundary 39 source->crNsigma = -4.0; 25 40 if (xPeak < 1) continue; 26 41 if (xPeak > source->pixels->numCols - 2) continue; … … 29 44 30 45 // XXX for now, just skip any sources with masked pixels 46 source->crNsigma = -5.0; 31 47 bool keep = true; 32 48 for (int iy = -1; (iy <= +1) && keep; iy++) { … … 97 113 source->extNsigma = (nEXT > 0) ? fabs(fEXT) / nEXT : 0.0; 98 114 // NOTE: abs needed to make the Nsigma value positive 115 116 if (!isfinite(source->crNsigma)) { 117 fprintf (stderr, "."); 118 source->crNsigma = -6.0; 119 } 120 121 if (source->crNsigma > CR_NSIGMA_LIMIT) { 122 source->mode |= PM_SOURCE_MODE_CRLIMIT; 123 } 99 124 } 125 126 psLogMsg ("psphot.size", PS_LOG_INFO, "measure source sizes for %ld sources: %f sec\n", sources->n - first, psTimerMark ("psphot")); 127 100 128 return true; 101 129 }
Note:
See TracChangeset
for help on using the changeset viewer.
