IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 17, 2014, 5:58:38 AM (12 years ago)
Author:
eugene
Message:

merge in changes from trunk (up through pv3 tag)

Location:
branches/eam_branches/ipp-20140610
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140610

  • branches/eam_branches/ipp-20140610/psphot/src/psphotChoosePSF.c

    r36623 r36884  
    448448
    449449            // get the model full-width at half-max
    450             float FWHM_MAJOR = 2*modelPSF->modelRadius (modelPSF->params, 0.5);
     450            float FWHM_MAJOR = 2*modelPSF->class->modelRadius (modelPSF->params, 0.5);
    451451
    452452            // XXX make sure this is consistent with the re-definition of PM_PAR_SXX
  • branches/eam_branches/ipp-20140610/psphot/src/psphotEfficiency.c

    r34353 r36884  
    7171                continue;
    7272            }
    73             float flux = normModel->modelFlux(normModel->params); // Total flux for peak of 1.0
     73            float flux = normModel->class->modelFlux(normModel->params); // Total flux for peak of 1.0
    7474            psFree(normModel);
    7575            if (!isfinite(flux)) {
     
    424424                    continue;
    425425                }
    426                 float sourceRadius = PS_MAX(radius, model->modelRadius(model->params, minFlux)); // Radius for source
     426                float sourceRadius = PS_MAX(radius, model->class->modelRadius(model->params, minFlux)); // Radius for source
    427427                psFree(model);
    428428                if (!isfinite(sourceRadius)) {
  • branches/eam_branches/ipp-20140610/psphot/src/psphotEvalFLT.c

    r17396 r36884  
    5353    }
    5454
    55     keep = model->modelFitStatus(model);
     55    keep = model->class->modelFitStatus(model);
    5656    if (keep) return true;
    5757
  • branches/eam_branches/ipp-20140610/psphot/src/psphotFullForceSummaryReadout.c

    r36759 r36884  
    425425                // copy the best fit params to the model
    426426                // fractional radii with the lowest chisq
    427                 psEllipseAxes axes = pmPSF_ModelToAxes(model->params->data.F32, model->type);
     427                psEllipseAxes axes = pmPSF_ModelToAxes(model->params->data.F32, model->class->useReff);
    428428
    429429                // examine the params for the trial with minimum chisq.
     
    637637                // now save the model parameters in the model structure
    638638
    639                 pmPSF_AxesToModel (model->params->data.F32, axes, modelType);
     639                pmPSF_AxesToModel (model->params->data.F32, axes, model->class->useReff);
    640640
    641641                model->mag = -2.5 * log10(flux0);
  • branches/eam_branches/ipp-20140610/psphot/src/psphotGalaxyShape.c

    r36757 r36884  
    283283
    284284        // I have some source guess (e0, e1, e2)
    285         psEllipseAxes guessAxes = pmPSF_ModelToAxes (PAR, modelType);
     285        psEllipseAxes guessAxes = pmPSF_ModelToAxes (PAR, model->class->useReff);
    286286
    287287        float fRmajorBest = NAN;
     
    295295                testAxes.minor = guessAxes.minor * fRminor;
    296296               
    297                 pmPSF_AxesToModel (PAR, testAxes, modelType);
     297                pmPSF_AxesToModel (PAR, testAxes, model->class->useReff);
    298298               
    299299                psphotGalaxyShapeSource (pcm, source, galaxyFits, maskVal, psfSize, true);
     
    324324#endif
    325325           
    326             pmPSF_AxesToModel (PAR, testAxes, modelType);
     326            pmPSF_AxesToModel (PAR, testAxes, model->class->useReff);
    327327               
    328328            psphotGalaxyShapeSource (pcm, source, galaxyFits, maskVal, psfSize, false);
     
    400400
    401401    pcm->modelConv->params->data.F32[PM_PAR_I0] = Io;
    402     float flux = pcm->modelConv->modelFlux (pcm->modelConv->params);
     402    float flux = pcm->modelConv->class->modelFlux (pcm->modelConv->params);
    403403    float dflux = flux * (dIo / Io);
    404404
  • branches/eam_branches/ipp-20140610/psphot/src/psphotLensing.c

    r36662 r36884  
    1212    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE);
    1313    psAssert (recipe, "missing recipe?");
     14
     15    // perform full extended source non-linear fits?
     16    if (!psMetadataLookupBool (&status, recipe, "LENSING_PARAMETERS")) {
     17        psLogMsg ("psphot", PS_LOG_INFO, "skipping extended source fits\n");
     18        return true;
     19    }
    1420
    1521    int num = psphotFileruleCount(config, filerule);
     
    8793    }
    8894
     95    psMetadataAddBool(readout->analysis, PS_LIST_TAIL, "LENS_OBJ", PS_META_REPLACE, "per-object lensing stats measured", true);
    8996    psLogMsg ("psphot.lensing", PS_LOG_DETAIL, "calculate lensing parameters for %d objects\n", (int) sources->n);
    9097
     
    317324    psFree (stats);
    318325
     326    psMetadataAddBool(readout->analysis, PS_LIST_TAIL, "LENS_PSF", PS_META_REPLACE, "psf-trend lensing stats measured", true);
    319327    psLogMsg ("psphot.lensing", PS_LOG_DETAIL, "calculate lensing parameters for %d objects: %f sec\n", (int) sources->n, psTimerMark ("psphot.lensing"));
    320328
  • branches/eam_branches/ipp-20140610/psphot/src/psphotLoadSRCTEXT.c

    r32348 r36884  
    7373            dPAR[PM_PAR_I0]   = 0.0;
    7474
    75             pmPSF_AxesToModel (PAR, axes, modelType);
     75            pmPSF_AxesToModel (PAR, axes, model->class->useReff);
    7676
    7777            float peakFlux    = 1.0;
  • branches/eam_branches/ipp-20140610/psphot/src/psphotMakeFluxScale.c

    r30624 r36884  
    3838            } else {
    3939                // measure the fitMag for this model
    40                 fitSum = model->modelFlux (model->params);
     40                fitSum = model->class->modelFlux (model->params);
    4141            }
    4242            if (fitSum < 1.e-6) continue;
  • branches/eam_branches/ipp-20140610/psphot/src/psphotRadiusChecks.c

    r36086 r36884  
    6060    if (radiusFit <= 0) {               // use fixed radius
    6161        if (moments == NULL) {
    62             radiusFit = model->modelRadius(model->params, PSF_FIT_NSIGMA*moments->dSky);
     62            radiusFit = model->class->modelRadius(model->params, PSF_FIT_NSIGMA*moments->dSky);
    6363        } else {
    64             radiusFit = model->modelRadius(model->params, 1.0);
     64            radiusFit = model->class->modelRadius(model->params, 1.0);
    6565        }
    6666        model->fitRadius = (RADIUS_TYPE)(radiusFit + PSF_FIT_PADDING);
     
    9595    if (radiusFit <= 0) {               // use fixed radius
    9696        if (moments == NULL) {
    97             radiusFit = model->modelRadius(model->params, PSF_FIT_NSIGMA*moments->dSky);
     97            radiusFit = model->class->modelRadius(model->params, PSF_FIT_NSIGMA*moments->dSky);
    9898        } else {
    99             radiusFit = model->modelRadius(model->params, 1.0);
     99            radiusFit = model->class->modelRadius(model->params, 1.0);
    100100        }
    101101        model->fitRadius = (RADIUS_TYPE)(radiusFit + PSF_FIT_PADDING);
     
    294294    float flux = deep ? EXT_FIT_NSIGMA*EXT_FIT_SKY_SIG : 0.1 * model->params->data.F32[PM_PAR_I0];
    295295
    296     float rawRadius = model->modelRadius (model->params, flux);
     296    float rawRadius = model->class->modelRadius (model->params, flux);
    297297    if (isnan(rawRadius)) return false;
    298298
  • branches/eam_branches/ipp-20140610/psphot/src/psphotSersicModelClass.c

    r33410 r36884  
    586586            coord->data.F32[1] = (psF32) (i + source->pixels->row0);
    587587
    588             pcm->modelConvFlux->data.F32[i][j] = pcm->modelConv->modelFunc (NULL, params, coord);
     588            pcm->modelConvFlux->data.F32[i][j] = pcm->modelConv->class->modelFunc (NULL, params, coord);
    589589        }
    590590    }
  • branches/eam_branches/ipp-20140610/psphot/src/psphotSourceFits.c

    r36375 r36884  
    700700        model->params->data.F32[PM_PAR_7] = 0.5/indexGuess[i];
    701701
    702         if (!model->modelGuess(model, source, maskVal, markVal)) {
     702        if (!model->class->modelGuess(model, source, maskVal, markVal)) {
    703703            model->flags |= PM_MODEL_STATUS_BADARGS;
    704704            return false;
     
    723723    model->flags = PM_MODEL_STATUS_NONE; // do not attempt to handle failures here, let the next iteration deal with it
    724724    model->params->data.F32[PM_PAR_7] = 0.5/indexGuess[iMin];
    725     model->modelGuess(model, source, maskVal, markVal);
     725    model->class->modelGuess(model, source, maskVal, markVal);
    726726
    727727    return true;
     
    752752        model->params->data.F32[PM_PAR_7] = indexGuess[i];
    753753       
    754         if (!model->modelGuess(model, source, maskVal, markVal)) {
     754        if (!model->class->modelGuess(model, source, maskVal, markVal)) {
    755755            model->flags |= PM_MODEL_STATUS_BADARGS;
    756756            return false;
  • branches/eam_branches/ipp-20140610/psphot/src/psphotVisual.c

    r35769 r36884  
    14441444            coord->data.F32[1] = r;
    14451445            coord->data.F32[0] = 0.0;
    1446             fmaj->data.F32[i] = log10(source->modelPSF->modelFunc (NULL, params, coord));
     1446            fmaj->data.F32[i] = log10(source->modelPSF->class->modelFunc (NULL, params, coord));
    14471447
    14481448            coord->data.F32[0] = r;
    14491449            coord->data.F32[1] = 0.0;
    1450             fmin->data.F32[i] = log10(source->modelPSF->modelFunc (NULL, params, coord));
     1450            fmin->data.F32[i] = log10(source->modelPSF->class->modelFunc (NULL, params, coord));
    14511451        }
    14521452        psFree (coord);
    14531453        psFree (params);
    14541454
    1455         float FWHM_MAJOR = 2.0*source->modelPSF->modelRadius (source->modelPSF->params, 0.5*source->modelPSF->params->data.F32[PM_PAR_I0]);
     1455        float FWHM_MAJOR = 2.0*source->modelPSF->class->modelRadius (source->modelPSF->params, 0.5*source->modelPSF->params->data.F32[PM_PAR_I0]);
    14561456        float FWHM_MINOR = FWHM_MAJOR * (axes.minor / axes.major);
    14571457        if (FWHM_MAJOR < FWHM_MINOR) PS_SWAP (FWHM_MAJOR, FWHM_MINOR);
Note: See TracChangeset for help on using the changeset viewer.