comparison Allan.c @ 214:920ff733b43b

Fix Allan deviation plot
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Mon, 14 Apr 2014 12:45:23 +0200
parents be87c8e78266
children ddc8c47db3df
comparison
equal deleted inserted replaced
213:fcc988c6f841 214:920ff733b43b
122 122
123 DeleteGraphPlot(Instance->AllanPanel, ALLANPANEL_ALLANPLOT, -1, VAL_IMMEDIATE_DRAW); 123 DeleteGraphPlot(Instance->AllanPanel, ALLANPANEL_ALLANPLOT, -1, VAL_IMMEDIATE_DRAW);
124 PlotXY(Instance->AllanPanel, ALLANPANEL_ALLANPLOT, x, y, ALLAN_NUM_DATAPOINTS, 124 PlotXY(Instance->AllanPanel, ALLANPANEL_ALLANPLOT, x, y, ALLAN_NUM_DATAPOINTS,
125 VAL_DOUBLE, VAL_DOUBLE, VAL_SCATTER, VAL_SOLID_SQUARE, VAL_SOLID, 1, DATAPOINT_COLOR); 125 VAL_DOUBLE, VAL_DOUBLE, VAL_SCATTER, VAL_SOLID_SQUARE, VAL_SOLID, 1, DATAPOINT_COLOR);
126 126
127 for (i = 0; i < ALLAN_NUM_DATAPOINTS; i++) { 127 for (i = 0; (i < ALLAN_NUM_DATAPOINTS) & (Instance->BlocksNumber[i] > 0); i++) {
128 error = 1 / sqrt(Instance->BlocksNumber[i]); 128 error = 1 / sqrt(Instance->BlocksNumber[i]);
129 PlotLine(Instance->AllanPanel, ALLANPANEL_ALLANPLOT, 129 PlotLine(Instance->AllanPanel, ALLANPANEL_ALLANPLOT,
130 x[i], y[i] * (1 - error), x[i], y[i] * (1 + error), ERRORBAR_COLOR); 130 x[i], y[i] * (1 - error), x[i], y[i] * (1 + error), ERRORBAR_COLOR);
131 } 131 }
132 } 132 }