Changeset 18555 for trunk/psphot/src/psphotChoosePSF.c
- Timestamp:
- Jul 15, 2008, 10:25:50 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotChoosePSF.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotChoosePSF.c
r18323 r18555 8 8 psTimerStart ("psphot"); 9 9 10 // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)11 psMaskType maskVal = psMetadataLookupU8(&status, recipe, "MASK.PSPHOT"); // Mask value for bad pixels10 // bit-masks to test for good/bad pixels 11 psMaskType maskVal = psMetadataLookupU8(&status, recipe, "MASK.PSPHOT"); 12 12 assert (maskVal); 13 13 14 // user-defined masks to test for good/bad pixels (build from recipe list if not yet set) 15 psMaskType mark = psMetadataLookupU8(&status, recipe, "MASK.MARK"); // Mask value for bad pixels 16 assert (mark); 14 // bit-mask to mark pixels not used in analysis 15 psMaskType markVal = psMetadataLookupU8(&status, recipe, "MARK.PSPHOT"); 16 assert (markVal); 17 18 // maskVal is used to test for rejected pixels, and must include markVal 19 maskVal |= markVal; 17 20 18 21 // examine PSF sources in S/N order (brightest first) … … 147 150 for (int i = 0; i < modelNames->n; i++) { 148 151 char *modelName = modelNames->data[i]; 149 pmPSFtry *try = pmPSFtryModel (stars, modelName, options, maskVal, mark ); // Attempt at fit152 pmPSFtry *try = pmPSFtryModel (stars, modelName, options, maskVal, markVal); // Attempt at fit 150 153 if (!try) { 151 154 // No big deal --- we'll try another model … … 321 324 // use pmModelSub because modelFlux has not been generated 322 325 assert (source->maskObj); 323 psImageKeepCircle (source->maskObj, x, y, options->radius, "OR", PM_MASK_MARK);326 psImageKeepCircle (source->maskObj, x, y, options->radius, "OR", markVal); 324 327 pmModelSub (source->pixels, source->maskObj, source->modelPSF, PM_MODEL_OP_FULL, maskVal); 325 psImageKeepCircle (source->maskObj, x, y, options->radius, "AND", PS_NOT_U8( PM_MASK_MARK));328 psImageKeepCircle (source->maskObj, x, y, options->radius, "AND", PS_NOT_U8(markVal)); 326 329 } 327 330
Note:
See TracChangeset
for help on using the changeset viewer.
