- Timestamp:
- Sep 23, 2007, 5:00:44 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20070921/psModules/src/objects/pmSourcePhotometry.c
r14962 r14989 3 3 * @author EAM, IfA; GLG, MHPCC 4 4 * 5 * @version $Revision: 1.31 $ $Name: not supported by cvs2svn $6 * @date $Date: 2007-09-2 1 02:46:46$5 * @version $Revision: 1.31.2.1 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2007-09-24 03:00:44 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 81 81 // we must have a valid model 82 82 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 } 85 87 86 88 if (model->dparams->data.F32[PM_PAR_I0] > 0) { … … 109 111 // measure EXT model photometry 110 112 status = pmSourcePhotometryModel (&source->extMag, source->modelEXT); 113 111 114 // 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) { 114 116 source->psfMag += pmTrend2DEval (psf->ApTrend, x, y); 115 117 } 116 118 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 } 119 123 120 124 // replace source flux … … 209 213 status = pmSourcePhotometryAper (&source->apMag, model, flux, source->maskObj, maskVal); 210 214 if (!status) { 215 psTrace ("psModules.objects", 3, "fail mag : bad Ap Mag"); 211 216 psErrorCode last = psErrorCodeLast(); 212 217 if (last == PM_ERR_PHOTOM) {
Note:
See TracChangeset
for help on using the changeset viewer.
