IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

converted pmPSF to use pmTrend2D to represent psf parameters; updated PSF I/O to handle full pmTrend2D

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20070921/psModules/src/objects/pmSourcePhotometry.c

    r14962 r14989  
    33 *  @author EAM, IfA; GLG, MHPCC
    44 *
    5  *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2007-09-21 02:46:46 $
     5 *  @version $Revision: 1.31.2.1 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2007-09-24 03:00:44 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    8181    // we must have a valid model
    8282    model = pmSourceGetModel (&isPSF, source);
    83     if (model == NULL)
    84         return false;
     83    if (model == NULL) {
     84        psTrace ("psModules.objects", 3, "fail mag : no valid model");
     85        return false;
     86    }
    8587
    8688    if (model->dparams->data.F32[PM_PAR_I0] > 0) {
     
    109111    // measure EXT model photometry
    110112    status = pmSourcePhotometryModel (&source->extMag, source->modelEXT);
     113
    111114    // for PSFs, correct both apMag and psfMag to same system, consistent with infinite flux star in aperture RADIUS
    112     if ((mode & PM_SOURCE_PHOT_APCORR) && isPSF && psf) {
    113         // convert to the equivalent 2D model?
     115    if ((mode & PM_SOURCE_PHOT_APCORR) && isPSF && psf && psf->ApTrend) {
    114116        source->psfMag += pmTrend2DEval (psf->ApTrend, x, y);
    115117    }
    116118
    117     if (!isfinite(SN) || (SN < AP_MIN_SN))
    118         return false;
     119    if (!isfinite(SN) || (SN < AP_MIN_SN)) {
     120        psTrace ("psModules.objects", 3, "fail mag : bad SN: %f (limit: %f)", SN, AP_MIN_SN);
     121        return false;
     122    }
    119123
    120124    // replace source flux
     
    209213    status = pmSourcePhotometryAper  (&source->apMag, model, flux, source->maskObj, maskVal);
    210214    if (!status) {
     215        psTrace ("psModules.objects", 3, "fail mag : bad Ap Mag");
    211216        psErrorCode last = psErrorCodeLast();
    212217        if (last == PM_ERR_PHOTOM) {
Note: See TracChangeset for help on using the changeset viewer.