IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38513


Ignore:
Timestamp:
Jun 22, 2015, 3:19:31 PM (11 years ago)
Author:
bills
Message:

Change cuts for "good models" to include in the fit to handle pcm extended modles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotFitSourcesLinear.c

    r38039 r38513  
    269269            continue;
    270270        }
    271         if (modelSum < 0.5) continue; // skip sources with no model constraint (somewhat arbitrary limit)
    272         if (modelSum < 0.8) {
    273             psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "low-sig model @ %f, %f (%f masked sum, %f sum, %f peak)\n",
    274                      source->peak->xf, source->peak->yf, maskedSum, modelSum, source->peak->rawFlux);
    275         }
    276         if (maskedSum < 0.5) {
    277             psLogMsg ("psphot.ensemble",  PS_LOG_MINUTIA, "worrying model @ %f, %f (%f masked sum, %f sum, %f peak)\n",
    278                      source->peak->xf, source->peak->yf, maskedSum, modelSum, source->peak->rawFlux);
    279         }
    280 
    281271        bool isPSF = false;
    282272        pmModel *model = pmSourceGetModel (&isPSF, source);
     273
     274        if (1 || model->isPCM) {
     275            float Io = model->params->data.F32[PM_PAR_I0];
     276            model->params->data.F32[PM_PAR_I0] = 1.0;
     277            float normFlux = model->class->modelFlux(model->params);
     278            model->params->data.F32[PM_PAR_I0] = Io;
     279
     280            // printf("%5d %4.3f %4.3f %4.3f\n", source->seq, normFlux, modelSum, maskedSum);
     281            float cut = .85;
     282            if (modelSum  < cut * normFlux) continue;
     283            if (maskedSum < cut * normFlux) continue;
     284        } else {
     285            if (modelSum < 0.5) continue; // skip sources with no model constraint (somewhat arbitrary limit)
     286            if (modelSum < 0.8) {
     287                psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "low-sig model @ %f, %f (%f masked sum, %f sum, %f peak)\n",
     288                         source->peak->xf, source->peak->yf, maskedSum, modelSum, source->peak->rawFlux);
     289            }
     290            if (maskedSum < 0.5) {
     291                psLogMsg ("psphot.ensemble",  PS_LOG_MINUTIA, "worrying model @ %f, %f (%f masked sum, %f sum, %f peak)\n",
     292                         source->peak->xf, source->peak->yf, maskedSum, modelSum, source->peak->rawFlux);
     293            }
     294        }
    283295
    284296        // clear the 'mark' pixels and remask on the fit aperture
Note: See TracChangeset for help on using the changeset viewer.