IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26878


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

updates from trunk

Location:
branches/eam_branches/20091201/psphot/src
Files:
3 edited

Legend:

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

    r26788 r26878  
    128128    psFree(rng);
    129129
     130    bool oldThreads = pmReadoutFakeThreads(true); // Old threading status
     131
    130132    pmReadout *fakeRO = pmReadoutAlloc(NULL); // Fake readout
    131133    if (!pmReadoutFakeFromVectors(fakeRO, numCols, numRows, xAll, yAll, magAll,
     
    141143    psFree(xAll);
    142144    psFree(yAll);
     145
     146    pmReadoutFakeThreads(oldThreads);
    143147
    144148    psBinaryOp(ro->image, ro->image, "+", fakeRO->image);
  • 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
  • branches/eam_branches/20091201/psphot/src/psphotSourceSize.c

    r26788 r26878  
    194194    options->ApResid = stats->robustMedian;
    195195    options->ApSysErr = psVectorSystematicError(dAp, ApErr, 0.05);
     196    // XXX this is quite arbitrary...
     197    if (!isfinite(options->ApSysErr)) options->ApSysErr = 0.01;
    196198    psLogMsg ("psphot", PS_LOG_DETAIL, "psf - Sum: %f +/- %f\n", options->ApResid, options->ApSysErr);
    197199
Note: See TracChangeset for help on using the changeset viewer.