Changeset 36834 for trunk/psModules/src/astrom/pmAstrometryVisual.c
- Timestamp:
- Jun 7, 2014, 6:37:32 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/astrom/pmAstrometryVisual.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/astrom/pmAstrometryVisual.c
r35768 r36834 946 946 KapaSendLabel (kapa2, "X (FP)", KAPA_LABEL_XM); 947 947 KapaSendLabel (kapa2, "Y (FP)", KAPA_LABEL_YM); 948 KapaSendLabel (kapa2, "pmAstromGridAngle re siduals. Box: Correlation Peak.", KAPA_LABEL_XP);948 KapaSendLabel (kapa2, "pmAstromGridAngle red: raw, black: ref.", KAPA_LABEL_XP); 949 949 950 950 // plot the REF data. (also calculate the plot ranges, accumulate the plot vectors) … … 966 966 KapaSetLimits(kapa2, &graphdata); 967 967 968 psStats *stats = psStatsAlloc(PS_STAT_SAMPLE_MEDIAN );968 psStats *stats = psStatsAlloc(PS_STAT_SAMPLE_MEDIAN | PS_STAT_MIN | PS_STAT_MAX ); 969 969 psVectorStats (stats, zPlot, NULL, NULL, 0); 970 float zero = stats->sampleMedian + 3.0; 971 float range = 6.0; 972 970 float range = stats->max - stats->min; 971 range = PS_MAX (0.5, PS_MIN (6.0, range)); 972 float zero = stats->sampleMedian + 0.25*range; 973 974 float maxZ = zPlot->data.F32[0], minZ = zPlot->data.F32[0]; 973 975 for (int i = 0; i < zPlot->n; i++) { 976 maxZ = PS_MAX (maxZ, zPlot->data.F32[i]); 977 minZ = PS_MIN (minZ, zPlot->data.F32[i]); 974 978 float value = (zero - zPlot->data.F32[i]) / range; 975 979 zPlot->data.F32[i] = PS_MAX(0.0, PS_MIN(1.0, value)); 976 980 } 981 fprintf (stderr, "ref mags: %f to %f (%f median)\n", minZ, maxZ, stats->sampleMedian); 977 982 978 983 // the point size will be scaled from the z vector … … 998 1003 psStatsInit(stats); 999 1004 psVectorStats (stats, zPlot, NULL, NULL, 0); 1000 zero = stats->sampleMedian + 3.0; 1001 range = 6.0; 1002 1005 range = stats->max - stats->min; 1006 range = PS_MAX (0.5, PS_MIN (6.0, range)); 1007 zero = stats->sampleMedian + 0.25*range; 1008 // zero = stats->sampleMedian + 1.0; 1009 // range = 6.0; 1010 1011 maxZ = zPlot->data.F32[0], minZ = zPlot->data.F32[0]; 1003 1012 for (int i = 0; i < zPlot->n; i++) { 1013 maxZ = PS_MAX (maxZ, zPlot->data.F32[i]); 1014 minZ = PS_MIN (minZ, zPlot->data.F32[i]); 1004 1015 float value = (zero - zPlot->data.F32[i]) / range; 1005 1016 zPlot->data.F32[i] = PS_MAX(0.0, PS_MIN(1.0, value)); 1006 1017 } 1018 fprintf (stderr, "raw mags: %f to %f (%f median)\n", minZ, maxZ, stats->sampleMedian); 1007 1019 1008 1020 // the point size will be scaled from the z vector
Note:
See TracChangeset
for help on using the changeset viewer.
