IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19908


Ignore:
Timestamp:
Oct 6, 2008, 3:08:55 AM (18 years ago)
Author:
eugene
Message:

added test function to count psf stars

File:
1 edited

Legend:

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

    r19881 r19908  
    11# include "psphotInternal.h"
     2
     3void psphotCountPSFStars (psArray *sources) {
     4
     5    int nPSF = 0;
     6
     7    // select the candidate PSF stars (pointers to original sources)
     8    for (int i = 0; i < sources->n; i++) {
     9        pmSource *source = sources->data[i];
     10        if (source->mode & PM_SOURCE_MODE_PSFSTAR) {
     11            nPSF ++;
     12        }
     13    }
     14
     15    fprintf (stderr, "N PSF: %d\n", nPSF);
     16}
    217
    318// try PSF models and select best option
     
    87102
    88103    psArray *stars = psArrayAllocEmpty (sources->n);
     104
     105    // psphotCountPSFStars (sources);
    89106
    90107    // select the candidate PSF stars (pointers to original sources)
     
    100117        }
    101118    }
     119
     120    // psphotCountPSFStars (sources);
     121
    102122    // check that the identified psf stars sufficiently cover the region; if not, extend the
    103123    // limits somewhat
    104124    psphotCheckStarDistribution (stars, sources, options);
     125
     126    // psphotCountPSFStars (sources);
    105127
    106128    psLogMsg ("psphot.pspsf", PS_LOG_DETAIL, "selected candidate %ld PSF objects\n", stars->n);
     
    295317    psMetadataAddF32 (recipe, PS_LIST_TAIL, "DSY_STDV", PS_META_REPLACE, "stdev of mean-corrected dSYY", nSy);
    296318
     319    // psphotCountPSFStars (sources);
     320
    297321    // unset the PSFSTAR flag for stars not used for PSF model
    298322    for (int i = 0; i < try->sources->n; i++) {
     
    302326        }
    303327    }
     328
     329    // psphotCountPSFStars (sources);
    304330
    305331    // build a PSF residual image
     
    402428    }
    403429
     430    // psphotCountPSFStars (sources);
     431
    404432    char *modelName = pmModelClassGetName (psf->type);
    405433    psLogMsg ("psphot.pspsf", PS_LOG_INFO, "select psf model: %f sec\n", psTimerMark ("psphot"));
Note: See TracChangeset for help on using the changeset viewer.