IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13374


Ignore:
Timestamp:
May 14, 2007, 3:55:17 AM (19 years ago)
Author:
rhl
Message:

Added argument to psphotRoughClass to indicate that the PSF clump's already known

Location:
trunk/psphot/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphot.h

    r13348 r13374  
    3333                                const psMetadata *recipe, psArray *footprints);
    3434psArray        *psphotSourceStats (pmReadout *readout, psMetadata *recipe, psArray *allpeaks);
    35 bool            psphotRoughClass (psArray *sources, psMetadata *recipe);
     35bool            psphotRoughClass (psArray *sources, psMetadata *recipe, const bool findPsfClump);
    3636bool            psphotBasicDeblend (psArray *sources, psMetadata *recipe);
    3737pmPSF          *psphotChoosePSF (pmReadout *readout, psArray *sources, psMetadata *recipe);
  • trunk/psphot/src/psphotReadout.c

    r13353 r13374  
    104104
    105105    // classify sources based on moments, brightness
    106     if (!psphotRoughClass (sources, recipe)) {
     106    if (!psphotRoughClass (sources, recipe, true)) {
    107107        psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image");
    108108        return psphotReadoutCleanup (config, readout, recipe, NULL, sources);
     
    201201
    202202    // set source type
    203     psphotRoughClass (newSources, recipe);
     203    psphotRoughClass (newSources, recipe, false);
    204204
    205205    // create full input models
  • trunk/psphot/src/psphotRoughClass.c

    r12792 r13374  
    22
    33// 2006.02.02 : no leaks
    4 bool psphotRoughClass (psArray *sources, psMetadata *recipe) {
     4bool psphotRoughClass (psArray *sources, psMetadata *recipe, const bool findPsfClump) {
    55
    6     pmPSFClump   psfClump;
     6    static pmPSFClump   psfClump;
     7    static bool havePsfClump = false;
    78
    89    psTimerStart ("psphot");
    910
    10     psfClump = pmSourcePSFClump (sources, recipe);
     11    if (findPsfClump) {
     12        psfClump = pmSourcePSFClump (sources, recipe);
     13    } else if (!havePsfClump) {
     14        psError(PSPHOT_ERR_PROG, false, "You must find the PSF clump before reusing it");
     15    } else {
     16        ;
     17    }
     18   
     19    havePsfClump = false;               // we don't know if it's valid
    1120    if (psfClump.X < 0) {
    1221        psError(PSPHOT_ERR_PROG, false, "programming error calling pmSourcePSFClump");
     
    3140    psLogMsg ("psphot.roughclass", PS_LOG_INFO, "rough classification: %f sec\n", psTimerMark ("psphot"));
    3241
     42    havePsfClump = true;                        // we have set psfClump
     43   
    3344    return true;
    3445}
Note: See TracChangeset for help on using the changeset viewer.