Changeset 16069
- Timestamp:
- Jan 14, 2008, 4:49:45 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/astrom/pmAstrometryObjects.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/astrom/pmAstrometryObjects.c
r15960 r16069 8 8 * @author EAM, IfA 9 9 * 10 * @version $Revision: 1.3 6$ $Name: not supported by cvs2svn $11 * @date $Date: 200 7-12-31 03:03:02$10 * @version $Revision: 1.37 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2008-01-15 02:49:45 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 246 246 // need to use the stats lookups functions to get the width and center 247 247 for (int i = 0; i < nIter; i++) { 248 psVectorClipFitPolynomial2D (map->x, results->xStats, mask, 0xff, x, wt, X, Y); 249 // psTrace ("psModules.astrom", 3, "x resid: %f +/- %f (%ld of %ld)\n", results->xStats->robustMedian, results->xStats->robustStdev, results->xStats->clippedNvalues, x->n); 248 if (!psVectorClipFitPolynomial2D (map->x, results->xStats, mask, 0xff, x, wt, X, Y)) { 249 psError(PS_ERR_UNKNOWN, false, "failure in clip-fitting for x\n"); 250 psFree (x); 251 psFree (y); 252 psFree (X); 253 psFree (Y); 254 psFree (wt); 255 psFree (mask); 256 257 return results; 258 } 250 259 psTrace ("psModules.astrom", 3, "x resid: %f +/- %f (%ld of %ld)\n", results->xStats->clippedMean, results->xStats->clippedStdev, results->xStats->clippedNvalues, x->n); 251 260 252 psVectorClipFitPolynomial2D (map->y, results->yStats, mask, 0xff, y, wt, X, Y); 253 // psTrace ("psModules.astrom", 3, "y resid: %f +/- %f (%ld of %ld)\n", results->yStats->robustMedian, results->yStats->robustStdev, results->yStats->clippedNvalues, y->n); 261 if (!psVectorClipFitPolynomial2D (map->y, results->yStats, mask, 0xff, y, wt, X, Y)) { 262 psError(PS_ERR_UNKNOWN, false, "failure in clip-fitting for y\n"); 263 psFree (x); 264 psFree (y); 265 psFree (X); 266 psFree (Y); 267 psFree (wt); 268 psFree (mask); 269 270 return results; 271 } 254 272 psTrace ("psModules.astrom", 3, "y resid: %f +/- %f (%ld of %ld)\n", results->yStats->clippedMean, results->yStats->clippedStdev, results->yStats->clippedNvalues, y->n); 255 273 } … … 598 616 // only check bins with at least 1/2 of max bin 599 617 // XXX requiring at least 3 matches in bin 600 int minNpts = PS_MAX (0.5*imStats->max, 3);601 psTrace("psModule.astrom .grid.angle", 5, "minNpts: %d, max: %d", minNpts, (int)(imStats->max));618 int minNpts = PS_MAX (0.5*imStats->max, 5); 619 psTrace("psModule.astrom", 5, "minNpts: %d, min: %d, max: %d, median: %f, stdev: %f", minNpts, (int)(imStats->min), (int)(imStats->max), imStats->sampleMedian, imStats->sampleStdev); 602 620 603 621 // find the 'best' bin 604 for (int j = 0; j < gridNP->numRows; j++) 605 { 622 for (int j = 0; j < gridNP->numRows; j++) { 606 623 for (int i = 0; i < gridNP->numCols; i++) { 607 608 if (NP[j][i] < minNpts) 609 continue; 624 if (NP[j][i] < minNpts) continue; 610 625 611 626 // this metric emphasizes a narrow peak with lots of sources over one with few. … … 658 673 stats->nTest = sort->data.U32[sort->n - 5]; 659 674 stats->nSigma = (stats->nMatch - stats->nTest) / sqrt(stats->nTest); 675 // XXX this needs a better analysis of the image histogram.. 676 // fprintf (stderr, "sigma: nMatch: %d, nTest: %d, nTen: %d\n", stats->nMatch, stats->nTest, sort->data.U32[sort->n - 10]); 660 677 661 678 psFree (sort); … … 742 759 newStat->center = center; 743 760 744 if ( newStat->minMetric < minStat->minMetric) {761 if (isfinite(newStat->minMetric) && (newStat->minMetric < minStat->minMetric)) { 745 762 *minStat = *newStat; 746 763 psLogMsg ("psModule.astrom", 4, "grid test - offset: %7.2f,%7.2f @ %6.1f deg x %7.3f (%4d pts, %5.1f sig, %5.1f var, %6.3f log metric) *",
Note:
See TracChangeset
for help on using the changeset viewer.
