IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 22, 2015, 3:23:53 PM (11 years ago)
Author:
bills
Message:

Handle pcm extended source models correctly in psphotSourceChildrenByReadout and psphotResetModels.
Avoid extra model convolutions.

File:
1 edited

Legend:

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

    r35769 r38515  
    316316    }
    317317
     318    pmSourceFitOptions *fitOptions = psMetadataLookupPtr (&status, readout->analysis, "PCM_FIT_OPTIONS");
     319    psAssert (fitOptions, "missing pcm fit options");
    318320
    319321    // XXX the sources have already been copied (merge into here?)
     
    368370            source->modelPSF = modelPSF;
    369371            source->modelPSF->fitRadius = radius;
    370             model = source->modelPSF;
     372            //  model = source->modelPSF;
    371373        }
    372374
    373375        if (model->isPCM) {
     376#if 0
    374377            psAssert(false, "this section is not complete");
    375378
     
    389392
    390393            psImageConvolveFFT (source->modelFlux, rawModelFlux, NULL, 0, psfKernel);
    391          
    392394            psFree (psfKernel);
    393395            psFree (rawModelFlux);
    394         }
    395 
    396         pmSourceCacheModel (source, maskVal);  // ALLOC x14 (!)
     396#endif
     397           pmPCMdata *pcm = pmPCMinit (source, fitOptions, model, maskVal, psfSize);
     398            if (pcm) {
     399                // pmPCMMakeModel (source, model, pcm->nsigma, maskVal, psfSize);
     400                pmPCMCacheModel (source, maskVal, psfSize, pcm->nsigma);
     401                psFree(pcm);
     402            } else {
     403                psAssert (pcm, "pmPCMinit failed!");
     404            }
     405         
     406        } else {
     407            pmSourceCacheModel (source, maskVal);  // ALLOC x14 (!)
     408        }
    397409    }
    398410
Note: See TracChangeset for help on using the changeset viewer.