IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14990


Ignore:
Timestamp:
Sep 23, 2007, 5:01:20 PM (19 years ago)
Author:
eugene
Message:

trace messages to specify reason star was dropped from ApResid

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20070921/psphot/src/psphotApResid.c

    r14965 r14990  
    11# include "psphotInternal.h"
    22
     3# define SKIPSTAR(MSG) { psTrace ("psphot", 3, "invalid : %s", MSG); continue; }
    34// measure the aperture residual statistics and 2D variations
    45bool psphotApResid (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf, psMaskType maskVal, psMaskType mark)
     
    6364        model = source->modelPSF;
    6465
    65         if (source->type != PM_SOURCE_TYPE_STAR) continue;
    66         if (source->mode &  PM_SOURCE_MODE_SATSTAR) continue;
    67         if (source->mode &  PM_SOURCE_MODE_BLEND) continue;
    68         if (source->mode &  PM_SOURCE_MODE_FAIL) continue;
    69         if (source->mode &  PM_SOURCE_MODE_POOR) continue;
     66        if (source->type != PM_SOURCE_TYPE_STAR) SKIPSTAR ("NOT STAR");
     67        if (source->mode &  PM_SOURCE_MODE_SATSTAR) SKIPSTAR ("SATSTAR");
     68        if (source->mode &  PM_SOURCE_MODE_BLEND) SKIPSTAR ("BLEND");
     69        if (source->mode &  PM_SOURCE_MODE_FAIL) SKIPSTAR ("FAIL STAR");
     70        if (source->mode &  PM_SOURCE_MODE_POOR) SKIPSTAR ("POOR STAR");
    7071
    7172        // get growth-corrected, apTrend-uncorrected magnitudes in scaled apertures
     
    7374        if (!pmSourceMagnitudes (source, psf, photMode, maskVal, mark)) {
    7475            Nskip ++;
     76            psTrace ("psphot", 3, "skip : bad source mag");
    7577            continue;
    7678        }
    7779
    78         if (!isfinite(source->apMag) || !isfinite(source->apMag)) {
     80        if (!isfinite(source->apMag) || !isfinite(source->psfMag)) {
    7981            Nfail ++;
     82            psTrace ("psphot", 3, "fail : nan mags : %f %f", source->apMag, source->psfMag);
    8083            continue;
    8184        }
     
    8790        if ((MAX_AP_OFFSET > 0) && (fabs(dap) > MAX_AP_OFFSET)) {
    8891            Nfail ++;
     92            psTrace ("psphot", 3, "fail : bad dap %f %f", dap, MAX_AP_OFFSET);
    8993            continue;
    9094        }
     
    146150    }
    147151
     152    // XXX catch error condition
    148153    psphotApResidTrend (readout, psf, Npsf, entryMin, &errorScale, &errorFloor, mask, xPos, yPos, apResid, dMag);
    149154
     
    170175    float xc = 0.5*readout->image->numCols + readout->image->col0 + 0.5;
    171176    float yc = 0.5*readout->image->numRows + readout->image->row0 + 0.5;
     177
    172178    psf->ApResid  = pmTrend2DEval (psf->ApTrend, xc, yc); // ap-fit at chip center
    173179    psf->dApResid = errorFloor;
Note: See TracChangeset for help on using the changeset viewer.