IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 18, 2011, 8:55:26 AM (15 years ago)
Author:
eugene
Message:

raise bit for PASS1 detections; set MODE_PSFMODEL in linear fit as well as nonlinear fit; move flags for fitting results into pmSourceFits not the calling function (more explicitly sets the bits in the right cases); adding test MaskedKron function

File:
1 edited

Legend:

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

    r31154 r31313  
    164164
    165165        // check the integral of the model : is it large enough?
     166        // apply mask?
    166167        float modelSum = 0.0;
    167168        for (int iy = 0; iy < source->modelFlux->numRows; iy++) {
     
    171172        }
    172173        if (modelSum < 0.5) continue; // skip sources with no model constraint (somewhat arbitrary limit)
    173         // if (modelSum < 0.01) continue; // skip sources with no model constraint (somewhat arbitrary limit)
    174174        if (modelSum < 0.8) {
    175175            fprintf (stderr, "low-sig model @ %f, %f (%f sum, %f peak)\n",
     
    177177        }
    178178
    179         pmModel *model = pmSourceGetModel (NULL, source);
     179        bool isPSF = false;
     180        pmModel *model = pmSourceGetModel (&isPSF, source);
    180181
    181182        psImageMaskPixels (source->maskObj, "AND", PS_NOT_IMAGE_MASK(markVal));
    182183        psImageKeepCircle (source->maskObj, source->peak->x, source->peak->y, model->fitRadius, "OR", markVal);
    183184
    184         source->mode |= PM_SOURCE_MODE_LINEAR_FIT;
     185        // we call this function multiple times. for the first time, we have only PSF models for all objects
     186        // the second time has extended sources.  If we ever fit the PSF model, we should raise this bit
     187        source->mode |= PM_SOURCE_MODE_LINEAR_FIT;
     188        if (isPSF) {
     189            source->mode |= PM_SOURCE_MODE_PSFMODEL;
     190        }           
     191       
    185192        psArrayAdd (fitSources, 100, source);
    186193    }
Note: See TracChangeset for help on using the changeset viewer.