IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 22, 2011, 12:54:41 AM (15 years ago)
Author:
eugene
Message:

various fixes from eam branch

Location:
trunk/psphot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot

  • trunk/psphot/src/psphotExtendedSourceFits.c

    r31452 r31673  
    268268    float radius;
    269269    psScalar *scalar = NULL;
     270    pmMoments psfMoments;
    270271
    271272    // arguments: readout, sources, models, region, psfSize, maskVal, markVal
     
    333334        // this uses the footprint to judge both radius and aperture?
    334335        // XXX save the psf-based moments for output
     336        psfMoments = *source->moments;
    335337        if (!pmSourceMoments (source, radius, 0.0, 0.0, 0.0, maskVal)) {
     338            // subtract the best fit from the object, leave local sky
    336339            fprintf (stderr, "skipping (2) %f, %f\n", source->peak->xf, source->peak->yf);
    337             // subtract the best fit from the object, leave local sky
     340            *source->moments = psfMoments;
    338341            pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
    339342            // XXX raise an error flag of some kind
     
    348351            if (!modelFluxStart) {
    349352                fprintf (stderr, "skipping (3) %f, %f\n", source->peak->xf, source->peak->yf);
     353                *source->moments = psfMoments;
    350354                pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
    351355                // XXX raise an error of some kind?
     
    467471          source->modelFlux = modelFluxStart;
    468472
     473          *source->moments = psfMoments;
    469474          pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
    470475
     
    492497        source->modelFlux = psMemIncrRefCounter (modelFluxes->data[minModel]);
    493498
     499        // replace the original moments
     500        *source->moments = psfMoments;
     501
    494502        // subtract the best fit from the object, leave local sky
    495503        pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
Note: See TracChangeset for help on using the changeset viewer.