IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 21, 2009, 8:37:01 PM (17 years ago)
Author:
eugene
Message:

re-organize pmPSFtry (split into clearer files); modify 2D psf variation analysis to use psf-aper mags as the metric

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/psModules/src/objects/pmPSFtryFitPSF.c

    r25455 r25476  
    3939// stage 3: Refit with fixed shape parameters.  This function uses the LMM fitting, but could
    4040// be re-written to use the simultaneous linear fitting (see psphotFitSourcesLinear.c)
    41 bool pmPSFtryFitPSF (pmPSFtry *psfTry) {
     41bool pmPSFtryFitPSF (pmPSFtry *psfTry, pmPSFOptions *options, psImageMaskType maskVal, psImageMaskType markVal) {
     42
     43    bool status;
    4244
    4345    psTimerStart ("psf.fit");
     46
     47    // maskVal is used to test for rejected pixels, and must include markVal
     48    maskVal |= markVal;
     49
     50    int Npsf = 0;
    4451    for (int i = 0; i < psfTry->sources->n; i++) {
    4552
     
    98105    psfTry->psf->nPSFstars = Npsf;
    99106
    100     psLogMsg ("psphot.psftry", PS_LOG_MINUTIA, "fit psf:   %f sec for %d of %ld sources\n", psTimerMark ("psf.fit"), Npsf, sources->n);
    101     psTrace ("psModules.object", 3, "keeping %d of %ld PSF candidates (PSF)\n", Npsf, sources->n);
     107    psLogMsg ("psphot.psftry", PS_LOG_MINUTIA, "fit psf:   %f sec for %d of %ld sources\n", psTimerMark ("psf.fit"), Npsf, psfTry->sources->n);
     108    psTrace ("psModules.object", 3, "keeping %d of %ld PSF candidates (PSF)\n", Npsf, psfTry->sources->n);
    102109
    103110    if (Npsf == 0) {
    104111        psError(PS_ERR_UNKNOWN, false, "No sources with good PSF fits after model is built.");
    105         psFree(psfTry);
    106         return NULL;
     112        return false;
    107113    }
    108114
     115    return true;
     116}
Note: See TracChangeset for help on using the changeset viewer.