IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25958


Ignore:
Timestamp:
Oct 27, 2009, 3:49:50 PM (17 years ago)
Author:
eugene
Message:

allow sigma_window to go to 18pix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotSourceStats.c

    r25852 r25958  
    242242
    243243// this function attempts to iteratively determine the best value for sigma of the moments weighting Gaussian
     244// this function modifies the recipe values MOMENTS_SX_MAX, MOMENTS_SY_MAX, and PSF_CLUMP_GRID_SCALE, used by pmSourcePSFClump
    244245bool psphotSetMomentsWindow (psMetadata *recipe, psMetadata *analysis, psArray *sources) {
    245246
     
    250251
    251252    // XXX move this to a config file?
    252     float sigma[4] = {1.0, 2.0, 3.0, 4.5};
    253     float Sout[4];
     253    # define NSIGMA 8
     254    float sigma[NSIGMA] = {1.0, 2.0, 3.0, 4.5, 6.0, 9.0, 12.0, 18.0};
     255    float Sout[NSIGMA];
    254256
    255257    // this sorts by peak->SN
     
    257259
    258260    // loop over radii:
    259     for (int i = 0; i < 4; i++) {
     261    for (int i = 0; i < NSIGMA; i++) {
    260262
    261263        // XXX move max source number to config
     
    302304
    303305    // we are looking for sigma for which Sout = 0.65 (or some other value)
    304 
    305306    float Sigma = NAN;
    306307    float minS = Sout[0];
    307308    float maxS = Sout[0];
    308     for (int i = 0; i < 4; i++) {
     309    for (int i = 0; i < NSIGMA; i++) {
    309310        minS = PS_MIN(Sout[i], minS);
    310311        maxS = PS_MAX(Sout[i], maxS);
     
    313314    if (maxS < 0.65) Sigma = sigma[0];
    314315
    315     for (int i = 0; i < 3; i++) {
     316    for (int i = 0; i < NSIGMA - 1; i++) {
    316317        if ((Sout[i] > 0.65) && (Sout[i+1] > 0.65)) continue;
    317318        if ((Sout[i] < 0.65) && (Sout[i+1] < 0.65)) continue;
Note: See TracChangeset for help on using the changeset viewer.