IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2011, 11:58:40 AM (14 years ago)
Author:
eugene
Message:

set ON_GHOST, ON_GLINT, ON_SPIKE for the image processed with these masks bits raised (eg, ppSub output)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSourcePhotometry.c

    r32347 r32842  
    5656static psImageMaskType maskBurntool = 0;
    5757static psImageMaskType maskConvPoor = 0;
     58static psImageMaskType maskGhost    = 0;
     59static psImageMaskType maskGlint    = 0;
    5860
    5961bool pmSourceMagnitudesInit (pmConfig *config, psMetadata *recipe)
     
    6870        maskBurntool = pmConfigMaskGet("BURNTOOL", config);
    6971        maskConvPoor = pmConfigMaskGet("CONV.POOR", config);
     72        maskGhost    = pmConfigMaskGet("GHOST", config);
     73        maskGlint    = pmConfigMaskGet("GHOST", config);
    7074        maskSuspect  = maskSpike | maskStarCore | maskBurntool | maskConvPoor;
    7175    }
     
    533537    }
    534538
     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
    535567    return (true);
    536568}
Note: See TracChangeset for help on using the changeset viewer.