IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 17, 2008, 2:48:24 PM (18 years ago)
Author:
eugene
Message:

take Sx,Sy grid scale from recipe

File:
1 edited

Legend:

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

    r20010 r20249  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.62 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2008-10-09 00:58:39 $
     8 *  @version $Revision: 1.63 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2008-10-18 00:48:24 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    279279    psTrace("psModules.objects", 5, "---- begin ----\n");
    280280
    281 // XXX This should be in the recipe
    282 #define SCALE 0.1                       // Scale of splane
    283 
    284281    psArray *peaks  = NULL;
    285282    pmPSFClump errorClump = {-1.0, -1.0, 0.0, 0.0};
     
    294291    if (!status) {
    295292        PSF_CLUMP_SN_LIM = 0;
     293    }
     294    float PSF_CLUMP_GRID_SCALE = psMetadataLookupF32(&status, recipe, "PSF_CLUMP_GRID_SCALE");
     295    if (!status) {
     296        PSF_CLUMP_GRID_SCALE = 0.1;
    296297    }
    297298
     
    316317
    317318        // construct a sigma-plane image
    318         int numCols = SX_MAX / SCALE, numRows = SY_MAX / SCALE; // Size of sigma-plane image
     319        int numCols = SX_MAX / PSF_CLUMP_GRID_SCALE, numRows = SY_MAX / PSF_CLUMP_GRID_SCALE; // Size of sigma-plane image
    319320        psTrace("psModules.objects", 10, "sigma-plane dimensions: %dx%d\n", numCols, numRows);
    320321        psImage *splane = psImageAlloc(numCols, numRows, PS_TYPE_F32); // sigma-plane image
     
    373374
    374375            // for the moment, force splane dimensions to be 10x10 image pix
    375             int binX = Mxx / SCALE, binY = Myy /  SCALE; // Position on splane
     376            int binX = Mxx / PSF_CLUMP_GRID_SCALE, binY = Myy /  PSF_CLUMP_GRID_SCALE; // Position on splane
    376377            psAssert(binX >= 0 && binX < numCols && binY >= 0 && binY < numRows, "We checked it already");
    377378
     
    428429
    429430        // define section window for clump
    430         minSx = clump->x * SCALE - 0.2;
    431         maxSx = clump->x * SCALE + 0.2;
    432         minSy = clump->y * SCALE - 0.2;
    433         maxSy = clump->y * SCALE + 0.2;
     431        minSx = clump->x * PSF_CLUMP_GRID_SCALE - 2.0*PSF_CLUMP_GRID_SCALE;
     432        maxSx = clump->x * PSF_CLUMP_GRID_SCALE + 2.0*PSF_CLUMP_GRID_SCALE;
     433        minSy = clump->y * PSF_CLUMP_GRID_SCALE - 2.0*PSF_CLUMP_GRID_SCALE;
     434        maxSy = clump->y * PSF_CLUMP_GRID_SCALE + 2.0*PSF_CLUMP_GRID_SCALE;
    434435
    435436        tmpSx = psVectorAllocEmpty (sources->n, PS_TYPE_F32);
Note: See TracChangeset for help on using the changeset viewer.