Changeset 21252
- Timestamp:
- Feb 1, 2009, 11:49:46 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotMagnitudes.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotMagnitudes.c
r21183 r21252 19 19 // nThreads = 0; // XXX until testing is complete, do not thread this function 20 20 21 // if backModel or backStdev are missing, the values of sky and/or skyErr will be set to NAN 21 22 pmReadout *backModel = psphotSelectBackground (config, view); 22 23 pmReadout *backStdev = psphotSelectBackgroundStdev (config, view); 23 24 // XXX require that we have a background model, or25 // allow it to be missing, setting local sky to 0.0?26 PS_ASSERT (backModel, false);27 PS_ASSERT (backStdev, false);28 24 29 25 // bit-masks to test for good/bad pixels … … 42 38 // the binning details are saved on the analysis metadata 43 39 psImageBinning *binning = psMetadataLookupPtr(&status, recipe, "PSPHOT.BACKGROUND.BINNING"); 44 PS_ASSERT (status, false);45 40 46 41 bool IGNORE_GROWTH = psMetadataLookupBool (&status, recipe, "IGNORE_GROWTH"); … … 128 123 if (status && isfinite(source->apMag)) Nap ++; 129 124 130 source->sky = psImageUnbinPixel(source->peak->x, source->peak->y, backModel->image, binning); 131 if (isnan(source->sky) && false) { 132 psLogMsg ("psphot.magnitudes", PS_LOG_DETAIL, "error setting pmSource.sky"); 133 } 125 if (backModel) { 126 psAssert (binning, "if backModel is defined, so should binning be"); 127 source->sky = psImageUnbinPixel(source->peak->x, source->peak->y, backModel->image, binning); 128 if (isnan(source->sky) && false) { 129 psLogMsg ("psphot.magnitudes", PS_LOG_DETAIL, "error setting pmSource.sky"); 130 } 131 } else { 132 source->sky = NAN; 133 } 134 134 135 source->skyErr = psImageUnbinPixel(source->peak->x, source->peak->y, backStdev->image, binning); 136 if (isnan(source->skyErr) && false) { 137 psLogMsg ("psphot.magnitudes", PS_LOG_DETAIL, "error setting pmSource.skyErr"); 138 } 135 if (backStdev) { 136 psAssert (binning, "if backStdev is defined, so should binning be"); 137 source->skyErr = psImageUnbinPixel(source->peak->x, source->peak->y, backStdev->image, binning); 138 if (isnan(source->skyErr) && false) { 139 psLogMsg ("psphot.magnitudes", PS_LOG_DETAIL, "error setting pmSource.skyErr"); 140 } 141 } else { 142 source->skyErr = NAN; 143 } 139 144 } 140 145
Note:
See TracChangeset
for help on using the changeset viewer.
