- Timestamp:
- Aug 26, 2010, 9:18:39 AM (16 years ago)
- Location:
- branches/sc_branches/trunkTest
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sc_branches/trunkTest
- Property svn:mergeinfo changed
-
branches/sc_branches/trunkTest/psphot
- Property svn:mergeinfo deleted
-
branches/sc_branches/trunkTest/psphot/src/psphotMagnitudes.c
r28405 r29060 124 124 return false; 125 125 } 126 127 # if (0)128 int nap = 0;129 if (!psphotMagnitudes_Unthreaded (&nap, cells->data[j], psf, binning, backModel, backStdev, photMode, maskVal)) {130 psError(PS_ERR_UNKNOWN, false, "Unable to guess model.");131 return false;132 }133 Nap += nap;134 # endif135 126 } 136 127 … … 186 177 psImageKeepCircle (source->maskObj, source->peak->x, source->peak->y, source->apRadius, "OR", markVal); 187 178 188 status = pmSourceMagnitudes (source, psf, photMode, maskVal ); // maskVal includes markVal179 status = pmSourceMagnitudes (source, psf, photMode, maskVal, markVal); 189 180 if (status && isfinite(source->apMag)) Nap ++; 190 181 … … 268 259 psArrayAdd(job->args, 1, cells->data[j]); // sources 269 260 PS_ARRAY_ADD_SCALAR(job->args, maskVal, PS_TYPE_IMAGE_MASK); 261 PS_ARRAY_ADD_SCALAR(job->args, markVal, PS_TYPE_IMAGE_MASK); 270 262 271 263 if (!psThreadJobAddPending(job)) { … … 304 296 psArray *sources = job->args->data[0]; 305 297 psImageMaskType maskVal = PS_SCALAR_VALUE(job->args->data[1],PS_TYPE_IMAGE_MASK_DATA); 298 psImageMaskType markVal = PS_SCALAR_VALUE(job->args->data[2],PS_TYPE_IMAGE_MASK_DATA); 306 299 307 300 for (int i = 0; i < sources->n; i++) { … … 312 305 if (model == NULL) { 313 306 psTrace ("psphot", 3, "fail mag : no valid model"); 314 source->pixWeight = NAN; 307 source->pixWeightNotBad = NAN; 308 source->pixWeightNotPoor = NAN; 315 309 continue; 316 310 } 317 311 318 status = pmSourcePixelWeight (&source->pixWeight , model, source->maskObj, maskVal);312 status = pmSourcePixelWeight (&source->pixWeightNotBad, &source->pixWeightNotPoor, model, source->maskObj, maskVal, markVal); 319 313 if (!status) { 320 314 psTrace ("psphot", 3, "fail to measure pixel weight"); 321 source->pixWeight = NAN; 315 source->pixWeightNotBad = NAN; 316 source->pixWeightNotPoor = NAN; 322 317 continue; 323 318 }
Note:
See TracChangeset
for help on using the changeset viewer.
