IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36623 for trunk/psphot/src


Ignore:
Timestamp:
Mar 31, 2014, 2:36:01 PM (12 years ago)
Author:
eugene
Message:

add lensing moments to psphot; allow up to 6x6 psf and aperture residuals in psphot

Location:
trunk
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/psphot/src

  • trunk/psphot/src/Makefile.am

    r36441 r36623  
    208208        psphotMakeGrowthCurve.c        \
    209209        psphotMagnitudes.c             \
     210        psphotLensing.c        \
    210211        psphotSetMaskBits.c            \
    211212        psphotSkyReplace.c             \
  • trunk/psphot/src/psphot.h

    r36441 r36623  
    144144bool            psphotMagnitudesReadout(pmConfig *config, psMetadata *recipe, const pmFPAview *view, pmReadout *readout, psArray *sources, pmPSF *psf);
    145145bool            psphotMagnitudes_Threaded (psThreadJob *job);
     146
     147bool            psphotLensing (pmConfig *config, const pmFPAview *view, const char *filerule);
     148bool            psphotLensingReadout(pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe);
     149bool            psphotLensingPSFtrendsReadout(pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe);
    146150
    147151bool            psphotEfficiency (pmConfig *config, const pmFPAview *view, const char *filerule);
  • trunk/psphot/src/psphotApResid.c

    r34404 r36623  
    214214
    215215        // XXX make this user-configurable?
    216         if (source->psfMagErr > 0.01) continue;
     216        if (source->psfMagErr > 0.03) continue;
    217217
    218218        // aperture residual for this source
     
    267267
    268268    // set the max order (0 = constant) which the number of psf stars can support:
    269     // rule of thumb: require 3 stars per 'cell' (order+1)^2
     269    // we require only 3 stars for n = 0, increase stars / cell for higher order
    270270    int MaxOrderForStars = 0;
    271     if (Npsf >= 12) MaxOrderForStars = 1; // 4 cells
    272     if (Npsf >= 27) MaxOrderForStars = 2; // 9 cells
    273     if (Npsf >= 48) MaxOrderForStars = 3; // 16 cells
    274     if (Npsf >  75) MaxOrderForStars = 4; // 25 cells
     271    if (Npsf >=  16) MaxOrderForStars = 1; // 4 cells
     272    if (Npsf >=  54) MaxOrderForStars = 2; // 9 cells
     273    if (Npsf >= 128) MaxOrderForStars = 3; // 16 cells
     274    if (Npsf >= 300) MaxOrderForStars = 4; // 25 cells
     275    if (Npsf >  576) MaxOrderForStars = 5; // 36 cells
    275276
    276277    pmTrend2DMode mode = PM_TREND_MAP;
  • trunk/psphot/src/psphotChoosePSF.c

    r35769 r36623  
    399399    char *modelName = pmModelClassGetName (psf->type);
    400400    psLogMsg ("psphot.pspsf", PS_LOG_WARN, "select psf model: %f sec\n", psTimerMark ("psphot.choose.psf"));
    401     psLogMsg ("psphot.pspsf", PS_LOG_INFO, "psf model %s, ApResid: %f +/- %f\n", modelName, psf->ApResid, psf->dApResid);
     401    psLogMsg ("psphot.pspsf", PS_LOG_INFO, "psf model %s, ApResid: %f +/- %f (%d x %d model)\n", modelName, psf->ApResid, psf->dApResid, psf->trendNx, psf->trendNy);
    402402
    403403    psFree (options);
  • trunk/psphot/src/psphotReadout.c

    r36375 r36623  
    340340    // calculate source magnitudes
    341341    if (!psphotMagnitudes(config, view, filerule)) { // pass 1 (detections->allSources)
    342       psErrorStackPrint(stderr, "Unable to do magnitudes.");
     342        psErrorStackPrint(stderr, "Unable to do magnitudes.");
    343343        psErrorClear();
    344344    }
     345
     346    // calculate lensing parameters
     347    if (!psphotLensing(config, view, filerule)) {
     348        psErrorStackPrint(stderr, "Unable to do lensing parameters.");
     349        psErrorClear();
     350    }
     351
    345352    if (!psphotEfficiency(config, view, filerule)) { // pass 1
    346353        psErrorStackPrint(stderr, "Unable to determine detection efficiencies from fake sources");
     
    353360    // replace background in residual image
    354361    if (!psphotSkyReplace (config, view, filerule)) { // pass 1
    355       psErrorStackPrint(stderr, "Unable to replace sky");
    356       psErrorClear();
     362        psErrorStackPrint(stderr, "Unable to replace sky");
     363        psErrorClear();
    357364    }
    358365
    359366    // drop the references to the image pixels held by each source
    360367    if (!psphotSourceFreePixels (config, view, filerule)) { // pass 1
    361       psErrorStackPrint(stderr, "Unable to free source pixels");
    362       psErrorClear();
     368        psErrorStackPrint(stderr, "Unable to free source pixels");
     369        psErrorClear();
    363370    }
    364371
  • trunk/psphot/src/psphotStackImageLoop.c

Note: See TracChangeset for help on using the changeset viewer.