Changeset 32842 for trunk/psModules/src/objects/pmSourcePhotometry.c
- Timestamp:
- Nov 30, 2011, 11:58:40 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSourcePhotometry.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourcePhotometry.c
r32347 r32842 56 56 static psImageMaskType maskBurntool = 0; 57 57 static psImageMaskType maskConvPoor = 0; 58 static psImageMaskType maskGhost = 0; 59 static psImageMaskType maskGlint = 0; 58 60 59 61 bool pmSourceMagnitudesInit (pmConfig *config, psMetadata *recipe) … … 68 70 maskBurntool = pmConfigMaskGet("BURNTOOL", config); 69 71 maskConvPoor = pmConfigMaskGet("CONV.POOR", config); 72 maskGhost = pmConfigMaskGet("GHOST", config); 73 maskGlint = pmConfigMaskGet("GHOST", config); 70 74 maskSuspect = maskSpike | maskStarCore | maskBurntool | maskConvPoor; 71 75 } … … 533 537 } 534 538 539 // Check that if the peak is on/off a ghost, glint, or diffraction spike. In regular IPP 540 // processing, these values are only set in the image mask after the 'camera' stage 541 542 int xChip = source->peak->x; 543 int yChip = source->peak->y; 544 545 bool onChip = true; 546 onChip &= (xChip >= 0); 547 onChip &= (xChip < mask->numCols); 548 onChip &= (yChip >= 0); 549 onChip &= (yChip < mask->numRows); 550 if (!onChip) { 551 // if the source is off the edge of the chip, raise a different bit? 552 source->mode |= PM_SOURCE_MODE_OFF_CHIP; 553 } else { 554 psImageMaskType maskValue = mask->data.PS_TYPE_IMAGE_MASK_DATA[yChip][xChip]; 555 if (maskValue & maskGhost) { 556 source->mode |= PM_SOURCE_MODE_ON_GHOST; 557 } 558 pmSourceMode PM_SOURCE_MODE_ON_GLINT = PM_SOURCE_MODE_ON_GHOST; 559 if (maskValue & maskGlint) { 560 source->mode |= PM_SOURCE_MODE_ON_GLINT; 561 } 562 if (maskValue & maskSpike) { 563 source->mode |= PM_SOURCE_MODE_ON_SPIKE; 564 } 565 } 566 535 567 return (true); 536 568 }
Note:
See TracChangeset
for help on using the changeset viewer.
