comparison Allan.h @ 0:d9aae7d7f2c6

Import
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Tue, 03 Jul 2012 10:38:59 +0200
parents
children bd28161e5ac2
comparison
equal deleted inserted replaced
-1:000000000000 0:d9aae7d7f2c6
1 #include "YLCStuff.h"
2
3 #define ALLAN_MAXPOINTSNUMBER 13 // can compute Allan dev for tau from 1s to 2^13 s =8192 s ~ 2h15' < 10000 s
4
5
6 // Allan_Data : the data of crypto class Allan
7
8 typedef struct {
9 PanelHandle AllanPanel ; // le handle sur le graphe
10 void (*OnClosePanel)(int); // pointer on a function to execute when the panel is closed (argument is the panel Handle)
11 double AllanVar[ALLAN_MAXPOINTSNUMBER] ; // the values of variances for each tau = 2^n.tau_0 (with n from 0 to ALLAN_MAXPOINTSNUMBER)
12 double FirstMean[ALLAN_MAXPOINTSNUMBER] ; // the means of the first block of 2^n data for which averaging was completed
13 double LastMean[ALLAN_MAXPOINTSNUMBER] ; // the means of the last block of 2^n data for which averaging was completed
14 int BlocksNumber[ALLAN_MAXPOINTSNUMBER] ; // the number of blocks of 2^n data (averaged) used for computing AVAR(2^ntau)
15 double CurrentAverage[ALLAN_MAXPOINTSNUMBER] ; // the sum of the last p data points retrieved (with p<2^2n). used for averaging as soon as p=2^n
16 int NbCurrentAverage[ALLAN_MAXPOINTSNUMBER] ; // number of data point being summed in CurrentAverage (from 0 up to 2^n)
17 double Drift, Mean ; // the drift rate of the data (in Hz/s), and the mean value (in Hz) : only usefull for dedrifting...
18 } Allan_Data ;
19
20
21 // The functions of crypto class Allan
22
23 int Allan_InitPanel(Allan_Data * Instance, char * title, double Normalizer, void (*OnCloseFunc)(int)) ;
24 int Allan_ClosePanel(Allan_Data * Instance) ;
25 int Allan_AddFrequency(Allan_Data * Instance, double Freq) ;
26
27 int Allan_Reset(Allan_Data * Instance) ;
28 int Allan_AddFrequency(Allan_Data * Instance, double Freq);
29 int Allan_Display(Allan_Data * Instance, int ColorPt, int ColorErrorBar);
30 int Allan_DisplayErrorBars(Allan_Data * Instance, int color);