IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 10, 2010, 4:20:05 PM (16 years ago)
Author:
eugene
Message:

updates from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/psphot/src/psphotModelBackground.c

    r26808 r26878  
    152152    // XXXX we can thread this here by running blocks in parallel
    153153
     154    int nFailures = 0;
     155    psImageBackgroundInit();
     156
    154157    // measure clipped median for subimages
    155158    psRegion ruffRegion = {0,0,0,0};
     
    218221                stats->options = PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV;
    219222                if (!psImageBackground(stats, &sample, subset, submask, maskVal, rng)) {
    220                     // psLogMsg ("psphot", PS_LOG_WARN, "Failed to estimate background using ROBUST_MEDIAN for "
    221                     //            "(%dx%d, (row0,col0) = (%d,%d)",
    222                     //            subset->numRows, subset->numCols, subset->row0, subset->col0);
     223                    if ((nFailures < 3) || (nFailures % 100 == 0)) {
     224                        psLogMsg ("psphot", PS_LOG_WARN, "Failed to estimate background using ROBUST_MEDIAN for "
     225                                  "(%dx%d, (row0,col0) = (%d,%d)",
     226                                  subset->numRows, subset->numCols, subset->row0, subset->col0);
     227                    }
     228                    nFailures ++;
    223229                    modelData[iy][ix] = modelStdevData[iy][ix] = NAN;
    224230                } else {
     
    239245            psFree (submask);
    240246        }
     247    }
     248
     249    if (nFailures) {
     250        psLogMsg ("psphot", PS_LOG_WARN, "Failed to estimate background for %d of %d subimages", nFailures, (model->numRows*model->numCols));
    241251    }
    242252
Note: See TracChangeset for help on using the changeset viewer.