changeset 214:920ff733b43b

Fix Allan deviation plot
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Mon, 14 Apr 2014 12:45:23 +0200
parents fcc988c6f841
children e925664b4b1b
files Allan.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Allan.c	Mon Apr 14 12:43:25 2014 +0200
+++ b/Allan.c	Mon Apr 14 12:45:23 2014 +0200
@@ -124,7 +124,7 @@
 	PlotXY(Instance->AllanPanel, ALLANPANEL_ALLANPLOT, x, y, ALLAN_NUM_DATAPOINTS,
 			VAL_DOUBLE, VAL_DOUBLE, VAL_SCATTER, VAL_SOLID_SQUARE, VAL_SOLID, 1, DATAPOINT_COLOR);
 	
-	for (i = 0; i < ALLAN_NUM_DATAPOINTS; i++) {
+	for (i = 0; (i < ALLAN_NUM_DATAPOINTS) & (Instance->BlocksNumber[i] > 0); i++) {
 		error = 1 / sqrt(Instance->BlocksNumber[i]);
 		PlotLine(Instance->AllanPanel, ALLANPANEL_ALLANPLOT,
 			x[i], y[i] * (1 - error), x[i], y[i] * (1 + error), ERRORBAR_COLOR);