IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14962


Ignore:
Timestamp:
Sep 20, 2007, 4:46:46 PM (19 years ago)
Author:
eugene
Message:

use FluxScale for model photometry if available

File:
1 edited

Legend:

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

    r14938 r14962  
    33 *  @author EAM, IfA; GLG, MHPCC
    44 *
    5  *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2007-09-21 00:09:05 $
     5 *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2007-09-21 02:46:46 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    9494    y = model->params->data.F32[PM_PAR_YPOS];
    9595
    96     // measure object model photometry
    97     // XXX use the pmPSF.FluxScale to get this value
    98     status = pmSourcePhotometryModel (&source->psfMag, source->modelPSF);
     96    // measure PSF model photometry
     97    if (psf->FluxScale) {
     98        double fluxScale = pmTrend2DEval (psf->FluxScale, x, y);
     99        if (isfinite(fluxScale) && (fluxScale > 0.0)) {
     100            source->psfMag = -2.5*log10(fluxScale * source->modelPSF->params->data.F32[PM_PAR_I0]);
     101        } else {
     102            source->psfMag = NAN;
     103        }
     104        fprintf (stderr, ".");
     105    } else {
     106        status = pmSourcePhotometryModel (&source->psfMag, source->modelPSF);
     107    }
     108
     109    // measure EXT model photometry
    99110    status = pmSourcePhotometryModel (&source->extMag, source->modelEXT);
    100111    // for PSFs, correct both apMag and psfMag to same system, consistent with infinite flux star in aperture RADIUS
Note: See TracChangeset for help on using the changeset viewer.