IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 26, 2010, 9:18:39 AM (16 years ago)
Author:
Serge CHASTEL
Message:

Merging trunk in branch

Location:
branches/sc_branches/trunkTest
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/sc_branches/trunkTest

  • branches/sc_branches/trunkTest/psphot

    • Property svn:mergeinfo deleted
  • branches/sc_branches/trunkTest/psphot/src/psphotSourceStats.c

    r28419 r29060  
    11# include "psphotInternal.h"
     2void pmSourceMomentsSetVerbose(bool state);
    23
    34// convert detections to sources and measure their basic properties (moments, local sky, sky
     
    369370    maskVal |= markVal;
    370371
     372    // XXX test : pmSourceMomentsSetVerbose(true);
     373
    371374    // threaded measurement of the sources moments
    372375    int Nfail = 0;
     
    408411        // measure basic source moments (no S/N clipping on input pixels)
    409412        status = pmSourceMoments (source, RADIUS, SIGMA, 0.0, maskVal);
     413        // XXX moments / aperture test:
     414        if (0) {
     415            // clear the mask bit and set the circular mask pixels
     416            psImageMaskPixels (source->maskObj, "AND", PS_NOT_IMAGE_MASK(markVal));
     417            psImageKeepCircle (source->maskObj, source->peak->x, source->peak->y, 4.0*source->moments->Mrf, "OR", markVal);
     418           
     419            float apMag = NAN;
     420            pmSourcePhotometryAper (&apMag, NULL, source->pixels, source->maskObj, maskVal);
     421            fprintf (stderr, "apMag: %f, kronMag: %f\n", apMag, -2.5*log10(source->moments->KronFlux));
     422
     423            // clear the mask bit
     424            psImageMaskPixels (source->maskObj, "AND", PS_NOT_IMAGE_MASK(markVal));
     425        }           
    410426        if (status) {
    411427            Nmoments ++;
     
    502518        psMetadataAddF32 (regionMD, PS_LIST_TAIL, "PSF.CLUMP.DX", PS_META_REPLACE, "psf clump center", psfClump.dX);
    503519        psMetadataAddF32 (regionMD, PS_LIST_TAIL, "PSF.CLUMP.DY", PS_META_REPLACE, "psf clump center", psfClump.dY);
    504         psphotVisualPlotMoments (recipe, analysis, sources);
     520        if (pmVisualTestLevel("psphot.moments.full", 2)) {
     521            psphotVisualPlotMoments (recipe, analysis, sources);
     522        }
    505523#endif
    506524
Note: See TracChangeset for help on using the changeset viewer.