Changeset 15000 for trunk/psModules/src/objects/pmSourcePhotometry.c
- Timestamp:
- Sep 24, 2007, 11:27:58 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSourcePhotometry.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourcePhotometry.c
r14962 r15000 3 3 * @author EAM, IfA; GLG, MHPCC 4 4 * 5 * @version $Revision: 1.3 1$ $Name: not supported by cvs2svn $6 * @date $Date: 2007-09-2 1 02:46:46$5 * @version $Revision: 1.32 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2007-09-24 21:27:58 $ 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) { … … 102 104 source->psfMag = NAN; 103 105 } 104 fprintf (stderr, ".");105 106 } else { 106 107 status = pmSourcePhotometryModel (&source->psfMag, source->modelPSF); … … 109 110 // measure EXT model photometry 110 111 status = pmSourcePhotometryModel (&source->extMag, source->modelEXT); 112 111 113 // 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) { 114 115 source->psfMag += pmTrend2DEval (psf->ApTrend, x, y); 115 116 } 116 117 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 } 119 122 120 123 // replace source flux … … 209 212 status = pmSourcePhotometryAper (&source->apMag, model, flux, source->maskObj, maskVal); 210 213 if (!status) { 214 psTrace ("psModules.objects", 3, "fail mag : bad Ap Mag"); 211 215 psErrorCode last = psErrorCodeLast(); 212 216 if (last == PM_ERR_PHOTOM) {
Note:
See TracChangeset
for help on using the changeset viewer.
