IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 7, 2012, 10:06:48 AM (14 years ago)
Author:
eugene
Message:

when growing the CR mask, copy the values into the existing readout->mask array, otherwise we lose the association to source->maskView; mask a small region for sources that have already been detected (the exclusion radius is curretnly set to 4 pixels, and is not user-specified; deactivate some test code; saturate linear fit fluxes to min valid flux (probably superfluous); calls to psphotFitSourcesLinear in psphotReadout should skip negative fluxes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120905/psphot/src/psphotBlendFit.c

    r34409 r34415  
    9696    assert (status && isfinite(skySig) && skySig > 0);
    9797
    98 # if (1)
     98# if (0)
    9999    // **** test block : generate an ID image where pixels are set based the source models (flux > 0.1 peak && flux > 2.0 skySig)
    100100    psImage *IDimage = psImageAlloc (readout->image->numCols, readout->image->numRows, PS_TYPE_S32);
     
    258258
    259259        int TEST_ON = false;
    260 # if (1)
     260# if (0)
    261261# define TEST_X 653
    262262# define TEST_Y 466
    263263        if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {
    264264            fprintf (stderr, "test object\n");
    265             //  psTraceSetLevel("psLib.math.psMinimizeLMChi2", 5);
     265            psTraceSetLevel("psLib.math.psMinimizeLMChi2", 5);
    266266            TEST_ON = true;
    267267        }
     
    379379    if (!source) return false;
    380380    if (!source->peak) return false; // XXX how can we have a peak-less source?
     381
     382# if (0)
     383# define TEST_X 653
     384# define TEST_Y 466
     385        if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {
     386            fprintf (stderr, "test object\n");
     387        }
     388# undef TEST_X
     389# undef TEST_Y
     390# endif
     391
    381392    if (!source->moments) return false;
    382393    if (source->type == PM_SOURCE_TYPE_DEFECT) return false;
     
    473484
    474485    // what is the radius for a specific peak fraction?
    475     for (int i = 0; i < logFmodel->n; i++) {
     486    for (int i = 1; i < logFmodel->n; i++) {
    476487        float logF = logFmodel->data.F32[i];
     488        if (!isfinite(logF)) continue;
     489
    477490        float flux = pow(10.0, logF);
    478491        if (flux > threshold) continue;
    479         if (i == 0) continue;
    480492       
    481493        float logF0 = logFmodel->data.F32[i - 1];
     
    512524    int ID = source->id;
    513525
     526    fprintf (stderr, "Xo,Yo: %f,%f; radius: %f\n", Xo, Yo, radius);
     527
    514528    for (int iy = minY; iy < maxY; iy++) {
    515529        for (int ix = minX; ix < maxX; ix++) {
Note: See TracChangeset for help on using the changeset viewer.