IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 6, 2005, 11:20:45 PM (21 years ago)
Author:
eugene
Message:

further basic concepts

Location:
trunk/psphot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot

    • Property svn:ignore set to
      bin
  • trunk/psphot/src/pspsf.c

    r4116 r4129  
    6868    }
    6969    psLogMsg ("psphot.psftest", 4, "fit flt:   %f sec for %d sources\n", psTimerMark ("fit"), sources->n);
     70    psTrace ("psphot.psftest", 3, "keeping %d of %d PSF candidates (FLT)\n", Nflt, sources->n);
    7071    DumpModelFits (test->modelFLT, "modelsFLT.dat");
    7172
    7273    // stage 2: construct a psf (pmPSF) from this collection of model fits
    7374    pmPSFFromModels (test->psf, test->modelFLT, test->mask);
     75   
     76    // count valid sources
     77    int Nkeep = 0;
     78    for (int i = 0; i < sources->n; i++) {
     79      if (test->mask->data.U8[i]) continue;
     80      Nkeep++;
     81    }
     82    psTrace ("psphot.psftest", 3, "keeping %d of %d PSF candidates\n", Nkeep, sources->n);
    7483
    7584    // stage 3: refit with fixed shape parameters
     
    96105    }
    97106    psLogMsg ("psphot.psftest", 4, "fit psf:   %f sec for %d sources\n", psTimerMark ("fit"), sources->n);
     107    psTrace ("psphot.psftest", 3, "keeping %d of %d PSF candidates (PSF)\n", Npsf, sources->n);
    98108    DumpModelFits (test->modelPSF, "modelsPSF.dat");
    99109
     
    152162bool pmPSFFromModels (pmPSF *psf, psArray *models, psVector *mask) {
    153163
    154     int n;
    155 
    156164    // construct the fit vectors from the collection of objects
    157165    // use the mask to ignore missing fits
     
    187195        psf->params->data[i] = RobustFit2D (psf->params->data[i], mask, x, y, z, dz);
    188196        // psPolynomial2DDump (psf->params->data[i]);
     197
     198        // count valid sources
     199        int Nkeep = 0;
     200        for (int j = 0; j < mask->n; j++) {
     201          if (mask->data.U8[j]) continue;
     202          Nkeep++;
     203        }
     204        psTrace ("psphot.psftest", 3, "keeping %d of %d PSF candidates (PSF param %d)\n", Nkeep, mask->n, i);
     205
    189206    }
    190207    return (true);
Note: See TracChangeset for help on using the changeset viewer.