IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30170


Ignore:
Timestamp:
Dec 24, 2010, 3:24:39 PM (15 years ago)
Author:
eugene
Message:

add visualization of object regions; ensure objects have region selected for fitRadius

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/psphot/src/psphotFitSourcesLinear.c

    r30140 r30170  
    4646            return false;
    4747        }
     48
     49        psphotVisualShowResidualImage (readout, (num > 0));
     50        psphotVisualShowPeaks (detections);
     51        psphotVisualShowObjectRegions (readout, recipe, sources);
    4852    }
    4953    return true;
     
    151155        if (x > AnalysisRegion.x1) continue;
    152156        if (y > AnalysisRegion.y1) continue;
     157
     158        // check the integral of the model : is it large enough?
     159        float modelSum = 0.0;
     160        for (int iy = 0; iy < source->modelFlux->numRows; iy++) {
     161            for (int ix = 0; ix < source->modelFlux->numCols; ix++) {
     162                modelSum += source->modelFlux->data.F32[iy][ix];
     163            }
     164        }
     165        if (modelSum < 0.01) continue; // skip sources with no model constraint (somewhat arbitrary limit)
     166
     167        pmModel *model = pmSourceGetModel (NULL, source);
     168
     169        psImageMaskPixels (source->maskObj, "AND", PS_NOT_IMAGE_MASK(markVal));
     170        psImageKeepCircle (source->maskObj, source->peak->x, source->peak->y, model->fitRadius, "OR", markVal);
    153171
    154172        source->mode |= PM_SOURCE_MODE_LINEAR_FIT;
     
    270288        model->params->data.F32[PM_PAR_I0] = norm->data.F32[i];
    271289        model->dparams->data.F32[PM_PAR_I0] = errors->data.F32[i];
    272         // XXX is the value of 'errors' modified by the sky fit?
    273290
    274291        // subtract object
     
    297314    psLogMsg ("psphot.ensemble", PS_LOG_INFO, "measure ensemble of PSFs: %f sec\n", psTimerMark ("psphot.linear"));
    298315
    299     psphotVisualShowImage (readout);
    300     psphotVisualShowResidualImage (readout);
    301316    psphotVisualPlotChisq (sources);
    302317    // psphotVisualShowFlags (sources);
Note: See TracChangeset for help on using the changeset viewer.