Changeset 13900 for trunk/psphot/src/psphotMagnitudes.c
- Timestamp:
- Jun 19, 2007, 4:40:44 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotMagnitudes.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotMagnitudes.c
r12792 r13900 2 2 3 3 bool psphotMagnitudes(psArray *sources, 4 psMetadata *recipe, 5 pmPSF *psf, 6 pmReadout *background) 4 psMetadata *recipe, 5 pmPSF *psf, 6 pmReadout *background, 7 psMaskType maskVal, 8 psMaskType mark) 7 9 { 8 10 bool status = false; … … 13 15 pmSourceMagnitudesInit (recipe); 14 16 15 // XXX require that we have a background model, or 17 // XXX require that we have a background model, or 16 18 // allow it to be missing, setting local sky to 0.0? 17 19 PS_ASSERT (background, false); 18 20 19 // the binning details are saved on the analysis metadata 21 // the binning details are saved on the analysis metadata 20 22 psImageBinning *binning = psMetadataLookupPtr(&status, recipe, "PSPHOT.BACKGROUND.BINNING"); 21 23 PS_ASSERT (status, false); … … 29 31 30 32 for (int i = 0; i < sources->n; i++) { 31 pmSource *source = (pmSource *) sources->data[i];32 status = pmSourceMagnitudes (source, psf, photMode);33 if (status) Nap ++;33 pmSource *source = (pmSource *) sources->data[i]; 34 status = pmSourceMagnitudes (source, psf, photMode, maskVal, mark); 35 if (status) Nap ++; 34 36 35 source->sky = psImageUnbinPixel(source->peak->x, source->peak->y, background->image, binning);36 if (isnan(source->sky) && false) {37 psError(PSPHOT_ERR_SKY, false, "Setting pmSource.sky");38 psErrorStackPrint(NULL, " ");39 psErrorClear();40 }41 } 37 source->sky = psImageUnbinPixel(source->peak->x, source->peak->y, background->image, binning); 38 if (isnan(source->sky) && false) { 39 psError(PSPHOT_ERR_SKY, false, "Setting pmSource.sky"); 40 psErrorStackPrint(NULL, " "); 41 psErrorClear(); 42 } 43 } 42 44 43 45 psLogMsg ("psphot.magnitudes", PS_LOG_DETAIL, "measure magnitudes : %f sec for %ld objects (%d with apertures)\n", psTimerMark ("psphot"), sources->n, Nap);
Note:
See TracChangeset
for help on using the changeset viewer.
