- Timestamp:
- Mar 5, 2012, 5:19:48 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
psModules (modified) (1 prop)
-
psModules/src/objects (modified) (1 prop)
-
psModules/src/objects/pmSourcePhotometry.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/psModules
- Property svn:mergeinfo set to
-
branches/meh_branches/ppstack_test/psModules/src/objects
- Property svn:ignore
-
old new 5 5 *.la 6 6 *.lo 7 pmSourceIO_CMF_PS1_V1.c 8 pmSourceIO_CMF_PS1_V2.c 9 pmSourceIO_CMF_PS1_V3.c 10 pmSourceIO_CMF_PS1_V4.c 11 pmSourceIO_CMF_PS1_V3.v1.c 12 pmSourceIO_CMF_PS1_V1.v1.c 13 pmSourceIO_CMF_PS1_V2.v1.c 14
-
- Property svn:ignore
-
branches/meh_branches/ppstack_test/psModules/src/objects/pmSourcePhotometry.c
r31670 r33415 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 } … … 94 98 { 95 99 PS_ASSERT_PTR_NON_NULL(source, false); 96 PS_ASSERT_PTR_NON_NULL(psf, false);100 // PS_ASSERT_PTR_NON_NULL(psf, false); 97 101 98 102 int status = false; … … 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 // 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 548 bool onChip = true; 549 onChip &= (xChip >= 0); 550 onChip &= (xChip < chipImage->numCols); 551 onChip &= (yChip >= 0); 552 onChip &= (yChip < chipImage->numRows); 553 if (!onChip) { 554 // if the source is off the edge of the chip, raise a different bit? 555 source->mode |= PM_SOURCE_MODE_OFF_CHIP; 556 } else { 557 int xMask = xChip - mask->col0; 558 int yMask = yChip - mask->row0; 559 psImageMaskType maskValue = mask->data.PS_TYPE_IMAGE_MASK_DATA[yMask][xMask]; 560 if (maskValue & maskGhost) { 561 source->mode |= PM_SOURCE_MODE_ON_GHOST; 562 } 563 pmSourceMode PM_SOURCE_MODE_ON_GLINT = PM_SOURCE_MODE_ON_GHOST; 564 if (maskValue & maskGlint) { 565 source->mode |= PM_SOURCE_MODE_ON_GLINT; 566 } 567 if (maskValue & maskSpike) { 568 source->mode |= PM_SOURCE_MODE_ON_SPIKE; 569 } 570 } 535 571 return (true); 536 572 }
Note:
See TracChangeset
for help on using the changeset viewer.
