IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31546


Ignore:
Timestamp:
May 12, 2011, 4:49:59 PM (15 years ago)
Author:
eugene
Message:

more description of psf solution; save psf moments before fitting extended source models (and restore after)

Location:
branches/eam_branches/ipp-20110505/psphot/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110505/psphot/src/psphotChoosePSF.c

    r31452 r31546  
    373373    }
    374374
     375
     376
    375377    char *modelName = pmModelClassGetName (psf->type);
    376378    psLogMsg ("psphot.pspsf", PS_LOG_INFO, "select psf model: %f sec\n", psTimerMark ("psphot.choose.psf"));
     
    503505      }
    504506      psMetadataAddF32 (readout->analysis, PS_LIST_TAIL, "PSF_EXT1", PS_META_REPLACE, "PSF extra param 1", stats->sampleMean);
     507      psLogMsg ("psphot", PS_LOG_DETAIL, "PSF extra parameter 1: %f +/- %f", stats->sampleMean, stats->sampleStdev);
    505508    }
    506509
     
    511514      }
    512515      psMetadataAddF32 (readout->analysis, PS_LIST_TAIL, "PSF_EXT2", PS_META_REPLACE, "PSF extra param 2", stats->sampleMean);
    513     }
    514 
    515     psMetadataAddF32 (readout->analysis, PS_LIST_TAIL, "ANGLE",    PS_META_REPLACE, "PSF angle",           axes.theta);
     516      psLogMsg ("psphot", PS_LOG_DETAIL, "PSF extra parameter 2: %f +/- %f", stats->sampleMean, stats->sampleStdev);
     517    }
     518
     519    // psMetadataAddF32 (readout->analysis, PS_LIST_TAIL, "ANGLE",    PS_META_REPLACE, "PSF angle",           axes.theta);
    516520    psMetadataAddS32 (readout->analysis, PS_LIST_TAIL, "NPSFSTAR", PS_META_REPLACE, "Number of stars used to make PSF", psf->nPSFstars);
     521
     522    // psLogMsg ("psphot", PS_LOG_DETAIL, "PSF angle: %f, nstars: %d", axes.theta, psf->nPSFstars);
    517523
    518524    char *psfModelName = pmModelClassGetName(psf->type);
  • branches/eam_branches/ipp-20110505/psphot/src/psphotExtendedSourceFits.c

    r31452 r31546  
    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.