IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 17, 2005, 10:26:59 AM (21 years ago)
Author:
eugene
Message:

clean up of small accounting bugs, adding the post-subtraction ApResid

File:
1 edited

Legend:

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

    r5617 r5802  
    55    bool     status  = false;
    66    psArray *sources = NULL;
     7    float BIG_RADIUS;
    78
    89    psTimerStart ("psphot");
     
    3536
    3637        // measure basic source moments
    37         // XXX EAM : choose between these two versions
    3838        status = pmSourceMoments (source, RADIUS);
    39         if (!status) {
    40           psFree (source);
    41           continue;
     39        if (status) {
     40            // add to the source array
     41            psArrayAdd (sources, 100, source);
     42            psFree (source);
     43            continue;
    4244        }
    43        
    44         // add to the source array
    45         psArrayAdd (sources, 100, source);
     45
     46        // if no valid pixels, or massive swing, likely saturated source,
     47        // try a much larger box
     48        BIG_RADIUS = PS_MIN (INNER, 3*RADIUS);
     49        psTrace ("psphot", 4, "retrying moments for %d, %d\n", source->peak->x, source->peak->y);
     50        status = pmSourceMoments (source, BIG_RADIUS);
     51        if (status) {
     52            // add to the source array
     53            psArrayAdd (sources, 100, source);
     54            psFree (source);
     55            continue;
     56        }
     57
    4658        psFree (source);
     59        continue;
    4760    }
    4861     
Note: See TracChangeset for help on using the changeset viewer.