Mercurial > hg > fxanalyse
diff 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 |
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);