Changeset 12341
- Timestamp:
- Mar 8, 2007, 1:27:24 PM (19 years ago)
- File:
-
- 1 edited
-
branches/rel-1_0/psModules/src/objects/pmPSFtry.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/rel-1_0/psModules/src/objects/pmPSFtry.c
r11158 r12341 5 5 * @author EAM, IfA 6 6 * 7 * @version $Revision: 1.34 $ $Name: not supported by cvs2svn $8 * @date $Date: 2007-0 1-19 04:35:53$7 * @version $Revision: 1.34.2.1 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2007-03-08 23:27:24 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 215 215 bool result = psVectorClipFitPolynomial1D(psfTry->psf->ChiTrend, stats, mask, 1, chisq, NULL, flux); 216 216 psLogMsg ("pmPSFtry", 4, "chisq vs flux fit: %f +/- %f\n", stats->robustMedian, stats->robustStdev); 217 if (!result) { 218 result = psVectorFitPolynomial1D(psfTry->psf->ChiTrend, mask, 1, chisq, NULL, flux); 219 } 217 220 218 221 psFree (flux); … … 276 279 bool result = psVectorClipFitPolynomial1D (poly, stats, psfTry->mask, PSFTRY_MASK_ALL, psfTry->metric, psfTry->metricErr, r2rflux); 277 280 if (!result) { 278 psError(PS_ERR_UNKNOWN, false, "Failed to fit clipped poly"); 279 return false; 281 psLogMsg(__func__, 3, "Failed to fit clipped poly"); 282 if (!psVectorFitPolynomial1D(poly, psfTry->mask, PSFTRY_MASK_ALL, 283 psfTry->metric, psfTry->metricErr, r2rflux)) { 284 return false; 285 } 280 286 } 281 287 psLogMsg ("pmPSFtryMetric", 4, "fit stats: %f +/- %f\n", stats->robustMedian, stats->robustStdev); … … 361 367 // we are doing a robust fit. after each pass, we drop points which are 362 368 // more deviant than three sigma. 363 // mask is currently updated for each pass. this is inconsistent? 369 // mask is currently updated for each parameter, so potentially 370 // different sets of stars are used for SXX, SYY, SXY, ... 364 371 365 372 psStats *stats = psStatsAlloc (PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); … … 397 404 // the weight is either the parameter error or NULL, depending on 'applyWeights' 398 405 if (!psVectorClipFitPolynomial2D(psf->params_NEW->data[i], stats, psfTry->mask, 0xff, z, NULL, x, y)) { 399 psError(PS_ERR_UNKNOWN, false, "failed to build psf model for parameter %d", i); 400 return false; 406 // Should save error stack at this point, and add any new errors on the end if 407 // we still have problems; but we don't have an API to do this 408 psLogMsg ("pmPSFtry", 4, "failed to build psf model for parameter %d with clipping", i); 409 410 if (!psVectorFitPolynomial2D(psf->params_NEW->data[i], psfTry->mask, 0xff, z, NULL, x, y)) { 411 psError(PS_ERR_UNKNOWN, false, "failed to build unclipped psf model for parameter %d", i); 412 return false; 413 } 401 414 } 402 415 }
Note:
See TracChangeset
for help on using the changeset viewer.
