- Timestamp:
- Dec 11, 2011, 1:40:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/psModules/src/objects/pmSourcePhotometry.c
r32853 r32923 543 543 int yChip = source->peak->y; 544 544 545 // need to access the parent if we are looking at a subimage (likely) 546 psImage *chipImage = (source->pixels == NULL) ? source->pixels : (psImage *) source->pixels->parent; 547 545 548 bool onChip = true; 546 549 onChip &= (xChip >= 0); 547 onChip &= (xChip < mask->numCols);550 onChip &= (xChip < chipImage->numCols); 548 551 onChip &= (yChip >= 0); 549 onChip &= (yChip < mask->numRows);552 onChip &= (yChip < chipImage->numRows); 550 553 if (!onChip) { 551 554 // if the source is off the edge of the chip, raise a different bit? 552 555 source->mode |= PM_SOURCE_MODE_OFF_CHIP; 553 556 } else { 554 psImageMaskType maskValue = mask->data.PS_TYPE_IMAGE_MASK_DATA[yChip][xChip]; 557 int xMask = xChip - mask->col0; 558 int yMask = yChip - mask->row0; 559 psImageMaskType maskValue = mask->data.PS_TYPE_IMAGE_MASK_DATA[yMask][xMask]; 555 560 if (maskValue & maskGhost) { 556 561 source->mode |= PM_SOURCE_MODE_ON_GHOST;
Note:
See TracChangeset
for help on using the changeset viewer.
