Changeset 23989 for trunk/psastro
- Timestamp:
- Apr 28, 2009, 11:21:56 AM (17 years ago)
- Location:
- trunk/psastro/src
- Files:
-
- 5 edited
-
psastroAstromGuess.c (modified) (1 diff)
-
psastroFixChipsTest.c (modified) (3 diffs)
-
psastroModelAnalysis.c (modified) (1 diff)
-
psastroModelFitBoresite.c (modified) (1 diff)
-
psastroZeroPoint.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroAstromGuess.c
r21422 r23989 382 382 psStats *statsQ = psStatsAlloc (PS_STAT_SAMPLE_MEAN | PS_STAT_SAMPLE_STDEV); 383 383 384 psVectorStats (statsP, cornerPd, NULL, cornerMK, 1); 385 psVectorStats (statsQ, cornerQd, NULL, cornerMK, 1); 384 if (!psVectorStats (statsP, cornerPd, NULL, cornerMK, 1)) { 385 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 386 return false; 387 } 388 if (!psVectorStats (statsQ, cornerQd, NULL, cornerMK, 1)) { 389 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 390 return false; 391 } 386 392 387 393 float angle = atan2 (map->y->coeff[1][0], map->x->coeff[1][0]); -
trunk/psastro/src/psastroFixChipsTest.c
r21409 r23989 140 140 psStats *stats; 141 141 stats = psStatsAlloc (PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); 142 psVectorStats (stats, dX, NULL, NULL, 0); 142 if (!psVectorStats (stats, dX, NULL, NULL, 0)) { 143 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 144 return false; 145 } 143 146 Xo = stats->robustMedian; 144 147 fprintf (stderr, "offset x: %f +/- %f\n", stats->robustMedian, stats->robustStdev); … … 146 149 147 150 stats = psStatsAlloc (PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); 148 psVectorStats (stats, dY, NULL, NULL, 0); 151 if (!psVectorStats (stats, dY, NULL, NULL, 0)) { 152 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 153 return false; 154 } 149 155 Yo = stats->robustMedian; 150 156 fprintf (stderr, "offset y: %f +/- %f\n", stats->robustMedian, stats->robustStdev); … … 168 174 } 169 175 stats = psStatsAlloc (PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); 170 psVectorStats (stats, dT, NULL, NULL, 0); 176 if (!psVectorStats (stats, dT, NULL, NULL, 0)) { 177 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 178 return false; 179 } 171 180 float To = stats->robustMedian; 172 181 fprintf (stderr, "offset t: %f +/- %f\n", stats->robustMedian, stats->robustStdev); -
trunk/psastro/src/psastroModelAnalysis.c
r21409 r23989 153 153 154 154 psStats *stats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV); 155 psVectorStats (stats, posZero, NULL, NULL, 0); 155 if (!psVectorStats (stats, posZero, NULL, NULL, 0)) { 156 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 157 return false; 158 } 156 159 157 160 fprintf (outfile, "# pos zero %f +/- %f\n", stats->sampleMedian, stats->sampleStdev); -
trunk/psastro/src/psastroModelFitBoresite.c
r21409 r23989 62 62 63 63 // center (Xo) = mean(Xo), RX = range / 2 64 psVectorStats (stats, Xo, NULL, NULL, 0); 64 if (!psVectorStats (stats, Xo, NULL, NULL, 0)) { 65 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 66 return NULL; 67 } 65 68 params->data.F32[PAR_X0] = stats->sampleMean; 66 69 params->data.F32[PAR_RX] = (stats->max - stats->min) / 2.0; 67 70 68 71 // center (Yo) = mean(Yo), RY = range / 2 69 psVectorStats (stats, Yo, NULL, NULL, 0); 72 if (!psVectorStats (stats, Yo, NULL, NULL, 0)) { 73 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 74 return NULL; 75 } 70 76 params->data.F32[PAR_Y0] = stats->sampleMean; 71 77 params->data.F32[PAR_RY] = (stats->max - stats->min) / 2.0; -
trunk/psastro/src/psastroZeroPoint.c
r21409 r23989 126 126 // this analysis has too few data points to use the robust median method 127 127 psStats *stats = psStatsAlloc (PS_STAT_CLIPPED_MEAN | PS_STAT_CLIPPED_STDEV); 128 psVectorStats (stats, dMag, NULL, NULL, 0); 128 if (!psVectorStats (stats, dMag, NULL, NULL, 0)) { 129 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 130 return false; 131 } 129 132 fprintf (stderr, "zero point %f +/- %f using %d stars; transparency %f\n", stats->clippedMean, stats->clippedStdev, Npts, zeropt - stats->clippedMean); 130 133
Note:
See TracChangeset
for help on using the changeset viewer.
