IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 24, 2007, 11:27:58 AM (19 years ago)
Author:
eugene
Message:

update from eam_branch_20070921

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSourcePhotometry.c

    r14962 r15000  
    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.32 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2007-09-24 21:27:58 $
    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) {
     
    102104            source->psfMag = NAN;
    103105        }
    104         fprintf (stderr, ".");
    105106    } else {
    106107        status = pmSourcePhotometryModel (&source->psfMag, source->modelPSF);
     
    109110    // measure EXT model photometry
    110111    status = pmSourcePhotometryModel (&source->extMag, source->modelEXT);
     112
    111113    // 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?
     114    if ((mode & PM_SOURCE_PHOT_APCORR) && isPSF && psf && psf->ApTrend) {
    114115        source->psfMag += pmTrend2DEval (psf->ApTrend, x, y);
    115116    }
    116117
    117     if (!isfinite(SN) || (SN < AP_MIN_SN))
    118         return false;
     118    if (!isfinite(SN) || (SN < AP_MIN_SN)) {
     119        psTrace ("psModules.objects", 3, "fail mag : bad SN: %f (limit: %f)", SN, AP_MIN_SN);
     120        return false;
     121    }
    119122
    120123    // replace source flux
     
    209212    status = pmSourcePhotometryAper  (&source->apMag, model, flux, source->maskObj, maskVal);
    210213    if (!status) {
     214        psTrace ("psModules.objects", 3, "fail mag : bad Ap Mag");
    211215        psErrorCode last = psErrorCodeLast();
    212216        if (last == PM_ERR_PHOTOM) {
Note: See TracChangeset for help on using the changeset viewer.