IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17337


Ignore:
Timestamp:
Apr 6, 2008, 10:12:58 AM (18 years ago)
Author:
eugene
Message:

skip sources which have already been assigned (previous pass)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080324/psphot/src/psphotSourceStats.c

    r16820 r17337  
    3737    for (int i = 0; i < peaks->n; i++) {
    3838
     39        pmPeak *peak = peaks->data[i];
     40        if (peak->assigned) continue;
     41
    3942        // create a new source, add peak
    4043        pmSource *source = pmSourceAlloc();
    41         source->peak = (pmPeak *)psMemIncrRefCounter(peaks->data[i]);
     44        source->peak = psMemIncrRefCounter(peak);
    4245
    4346        // allocate image, weight, mask arrays for each peak (square of radius OUTER)
    4447        pmSourceDefinePixels (source, readout, source->peak->x, source->peak->y, OUTER);
    4548        if (!strcasecmp (breakPt, "PEAKS")) {
     49            peak->assigned = true;
    4650            psArrayAdd (sources, 100, source);
    4751            psFree (source);
     
    4953        }
    5054
    51         // skip faint sources
     55        // skip faint sources for moments measurement
    5256        if (source->peak->SN < MIN_SN) {
     57            peak->assigned = true;
    5358            psArrayAdd (sources, 100, source);
    5459            psFree (source);
     
    5762
    5863        // measure a local sky value
    59         // XXX EAM : this should use ROBUST not SAMPLE median, but it is broken
     64        // the local sky is now ignored; kept here for reference only
    6065        status = pmSourceLocalSky (source, PS_STAT_SAMPLE_MEDIAN, INNER, maskVal, mark);
    6166        if (!status) {
     
    8085        if (status) {
    8186            // add to the source array
     87            peak->assigned = true;
    8288            psArrayAdd (sources, 100, source);
    8389            psFree (source);
     
    9399        if (status) {
    94100            // add to the source array
     101            peak->assigned = true;
    95102            psArrayAdd (sources, 100, source);
    96103            psFree (source);
Note: See TracChangeset for help on using the changeset viewer.