IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 6, 2008, 3:05:13 AM (18 years ago)
Author:
eugene
Message:

upgrades to calculate the PSF clump for subregions on an image; the PSF I/O file now writes the region-based psf clump data, but will read the old format as well

File:
1 edited

Legend:

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

    r19879 r19906  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2008-10-03 20:59:16 $
     8 *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2008-10-06 13:05:13 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    274274// XXX this function should probably accept the values, not a recipe. wrap with a
    275275// psphot-specific function which applies the recipe values
    276 pmPSFClump pmSourcePSFClump(psArray *sources, psMetadata *recipe)
     276// only apply selection to sources within specified region
     277pmPSFClump pmSourcePSFClump(psRegion *region, psArray *sources, psMetadata *recipe)
    277278{
    278279    psTrace("psModules.objects", 5, "---- begin ----\n");
     
    329330                continue;
    330331
     332            if (tmpSrc->peak->x < region->x0) continue;
     333            if (tmpSrc->peak->x > region->x1) continue;
     334            if (tmpSrc->peak->y < region->y0) continue;
     335            if (tmpSrc->peak->y > region->y1) continue;
     336
    331337            // Sx,Sy are limited at 0.  a peak at 0,0 is artificial
    332338            if (fabs(tmpSrc->moments->Mxx) < 0.05)
     
    427433                continue;
    428434
     435            if (tmpSrc->peak->x < region->x0) continue;
     436            if (tmpSrc->peak->x > region->x1) continue;
     437            if (tmpSrc->peak->y < region->y0) continue;
     438            if (tmpSrc->peak->y > region->y1) continue;
     439
    429440            if (tmpSrc->moments->Mxx < minSx)
    430441                continue;
     
    475486*****************************************************************************/
    476487
    477 bool pmSourceRoughClass(psArray *sources, psMetadata *recipe, pmPSFClump clump, psMaskType maskSat)
     488bool pmSourceRoughClass(psRegion *region, psArray *sources, psMetadata *recipe, pmPSFClump clump, psMaskType maskSat)
    478489{
    479490    psTrace("psModules.objects", 5, "---- begin ----");
     
    509520
    510521        pmSource *source = (pmSource *) sources->data[i];
     522
     523        if (source->peak->x < region->x0) continue;
     524        if (source->peak->x > region->x1) continue;
     525        if (source->peak->y < region->y0) continue;
     526        if (source->peak->y > region->y1) continue;
    511527
    512528        source->peak->type = 0;
Note: See TracChangeset for help on using the changeset viewer.