annotate Plot.c @ 156:4ab8099a18e2

Add beatnote frequency drift correction to N3 measurement
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Mon, 03 Feb 2014 12:30:39 +0100
parents be87c8e78266
children a3494d2806ee
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
1 #include <ansi_c.h>
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
2 #include <userint.h>
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
3
144
be87c8e78266 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 135
diff changeset
4 #include "utils.h"
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
5 #include "FXPlot.h"
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
6 #include "Plot.h"
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
7
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
8 void Plot_InitPanel(Plot_Data *Instance, const char *title, double ymin, double ymax, int parent, int control)
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
9 {
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
10 if ((Instance->PlotPanel = LoadPanel (0, "FXPlot.uir", PLOTPANEL)) < 0)
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
11 return;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
12
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
13 SetPanelAttribute(Instance->PlotPanel, ATTR_TITLE, title);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
14 SetPanelAttribute(Instance->PlotPanel, ATTR_CALLBACK_DATA, (void *)Instance);
134
bd28161e5ac2 Major code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 21
diff changeset
15 Instance->active = TRUE;
bd28161e5ac2 Major code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 21
diff changeset
16 Instance->parent = parent;
bd28161e5ac2 Major code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 21
diff changeset
17 Instance->control = control;
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
18 Instance->IndexPoint = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
19 Instance->Mean = 0;
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
20 Instance->Slope = 0;
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
21 Instance->ADev = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
22 Instance->Frequencies = calloc(MAXPOINTSNUMBER, sizeof(double));
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
23 DisplayPanel(Instance->PlotPanel);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
24
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
25 SetCtrlVal(Instance->PlotPanel, PLOTPANEL_MIN, ymin);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
26 SetCtrlVal(Instance->PlotPanel, PLOTPANEL_MAX, ymax);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
27
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
28 if ((ymin != 0.0) && (ymax != 0.0)) {
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
29 /* manual scaling */
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
30 SetCtrlVal(Instance->PlotPanel, PLOTPANEL_MIN, ymin);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
31 SetCtrlVal(Instance->PlotPanel, PLOTPANEL_MAX, ymax);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
32 SetAxisScalingMode(Instance->PlotPanel, PLOTPANEL_FREQPLOT, VAL_LEFT_YAXIS, VAL_MANUAL, ymin, ymax);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
33 } else {
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
34 /* auto scaling */
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
35 SetCtrlVal(Instance->PlotPanel, PLOTPANEL_CHECKBOX_AUTOSCALE, TRUE);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
36 SetAxisScalingMode(Instance->PlotPanel, PLOTPANEL_FREQPLOT, VAL_LEFT_YAXIS, VAL_AUTOSCALE, 0, 0);
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
37 }
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
38 }
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
39
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
40
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
41 void Plot_ClosePanel(Plot_Data * Instance)
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
42 {
134
bd28161e5ac2 Major code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 21
diff changeset
43 Instance->active = FALSE;
bd28161e5ac2 Major code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 21
diff changeset
44 free(Instance->Frequencies);
bd28161e5ac2 Major code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 21
diff changeset
45 SetCtrlVal(Instance->parent, Instance->control, FALSE);
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
46 DiscardPanel(Instance->PlotPanel);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
47 }
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
48
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
49
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
50 void Plot_AddFrequency(Plot_Data * Instance, double Freq)
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
51 {
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
52 double Drift = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
53 int DeDrift;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
54 int N = 0;
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
55
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
56 double Mean = Instance->Mean;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
57 double Slope = Instance->Slope;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
58 double ADev = Instance->ADev;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
59
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
60 /* Correct Freq with drift (feed forward) if dedrift is on */
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
61 GetCtrlVal(Instance->PlotPanel, PLOTPANEL_CHECKBOX_DEDRIFT, &DeDrift);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
62 if (DeDrift) {
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
63 GetCtrlVal(Instance->PlotPanel, PLOTPANEL_DEDRIFT, &Drift);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
64 Freq -= ((double) Instance->IndexPoint)*Drift;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
65 }
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
66
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
67 /* Add Freq to graph plot */
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
68 Instance->Frequencies[Instance->IndexPoint++] = Freq;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
69 N = Instance->IndexPoint;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
70
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
71 if (N > 1) {
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
72 /* adev and slope computation need at least 2 data points */
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
73 Instance->Slope = (Slope*(N-2) + 6*(Freq-Mean)/N)/(N+1);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
74 SetCtrlVal(Instance->PlotPanel, PLOTPANEL_SLOPE, Instance->Slope);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
75 Instance->ADev = sqrt( ( ADev*ADev*(N-2) + 0.5*pow(Freq-Instance->Frequencies[N-2],2) ) / (N-1));
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
76 SetCtrlVal(Instance->PlotPanel, PLOTPANEL_ADEV, Instance->ADev);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
77 }
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
78 Instance->Mean = (Mean*(N-1)+Freq)/N;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
79 SetCtrlVal(Instance->PlotPanel, PLOTPANEL_MEAN, Instance->Mean);
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
80
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
81 /* if too many points recorded restart */
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
82 if (N > MAXPOINTSNUMBER - 2) {
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
83 Instance->IndexPoint = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
84 Instance->Mean = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
85 Instance->Slope = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
86 Instance->ADev = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
87 SetCtrlVal(Instance->PlotPanel,PLOTPANEL_MEAN, 0.0);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
88 SetCtrlVal(Instance->PlotPanel,PLOTPANEL_SLOPE, 0.0);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
89 SetCtrlVal(Instance->PlotPanel,PLOTPANEL_ADEV, 0.0);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
90 }
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
91
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
92 DeleteGraphPlot(Instance->PlotPanel, PLOTPANEL_FREQPLOT, -1, VAL_IMMEDIATE_DRAW);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
93 PlotY(Instance->PlotPanel, PLOTPANEL_FREQPLOT, Instance->Frequencies, Instance->IndexPoint,
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
94 VAL_DOUBLE, VAL_THIN_LINE, VAL_EMPTY_SQUARE, VAL_SOLID, 1, VAL_BLUE);
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
95
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
96 int autoscale;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
97 GetCtrlVal(Instance->PlotPanel, PLOTPANEL_CHECKBOX_AUTOSCALE, &autoscale);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
98 if (autoscale) {
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
99 /* update plot limits */
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
100 double ymin, ymax;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
101 GetAxisScalingMode(Instance->PlotPanel, PLOTPANEL_FREQPLOT,VAL_LEFT_YAXIS, NULL, &ymin, &ymax);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
102 SetCtrlVal(Instance->PlotPanel, PLOTPANEL_MIN, ymin);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
103 SetCtrlVal(Instance->PlotPanel, PLOTPANEL_MAX, ymax);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
104 /* adjust control limits */
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
105 SetCtrlAttribute(Instance->PlotPanel, PLOTPANEL_MIN, ATTR_MAX_VALUE, ymax);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
106 SetCtrlAttribute(Instance->PlotPanel, PLOTPANEL_MAX, ATTR_MIN_VALUE, ymin);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
107 }
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
108 }
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
109
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
110
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
111 /* callbacks */
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
112
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
113 int CVICALLBACK CB_PlotEvent(int panel, int event,
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
114 void *callbackData, int eventData1, int eventData2)
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
115 {
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
116 switch (event)
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
117 {
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
118 case EVENT_CLOSE:
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
119 Plot_Data *data;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
120 GetPanelAttribute (panel, ATTR_CALLBACK_DATA, &data);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
121 Plot_ClosePanel(data);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
122 break;
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
123
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
124 case EVENT_KEYPRESS:
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
125 int keycode = GetKeyPressEventVirtualKey(eventData2);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
126 int index;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
127 double step;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
128 switch (keycode)
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
129 {
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
130 case 2304: /* right arrow */
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
131 GetCtrlIndex(panel, PLOTPANEL_SCALINGSTEP, &index);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
132 if (index < 10) {
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
133 SetCtrlIndex(panel, PLOTPANEL_SCALINGSTEP, ++index);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
134 GetCtrlVal(panel, PLOTPANEL_SCALINGSTEP, &step);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
135 SetCtrlAttribute(panel, PLOTPANEL_MIN, ATTR_INCR_VALUE, step);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
136 SetCtrlAttribute(panel, PLOTPANEL_MAX, ATTR_INCR_VALUE, step);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
137 }
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
138 break;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
139 case 2048: /* left arrow */
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
140 GetCtrlIndex(panel, PLOTPANEL_SCALINGSTEP, &index);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
141 if (index > 0) {
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
142 SetCtrlIndex(panel, PLOTPANEL_SCALINGSTEP, --index);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
143 GetCtrlVal(panel, PLOTPANEL_SCALINGSTEP, &step);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
144 SetCtrlAttribute(panel, PLOTPANEL_MIN, ATTR_INCR_VALUE, step);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
145 SetCtrlAttribute(panel, PLOTPANEL_MAX, ATTR_INCR_VALUE, step);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
146 }
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
147 break;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
148 }
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
149 break;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
150 }
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
151 return 0;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
152 }
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
153
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
154
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
155 int CVICALLBACK Plot_CB_ChangeYLim (int panel, int control, int event,
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
156 void *callbackData, int eventData1, int eventData2)
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
157 {
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
158 double ymin, ymax;
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
159
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
160 switch (event)
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
161 {
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
162 case EVENT_COMMIT:
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
163 GetCtrlVal(panel, PLOTPANEL_MIN, &ymin);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
164 GetCtrlVal(panel, PLOTPANEL_MAX, &ymax);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
165 /* adjust control limits */
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
166 SetCtrlAttribute(panel, PLOTPANEL_MIN, ATTR_MAX_VALUE, ymax);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
167 SetCtrlAttribute(panel, PLOTPANEL_MAX, ATTR_MIN_VALUE, ymin);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
168 /* disable autoscaling */
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
169 SetCtrlVal(panel, PLOTPANEL_CHECKBOX_AUTOSCALE, FALSE);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
170 SetAxisScalingMode(panel, PLOTPANEL_FREQPLOT, VAL_LEFT_YAXIS, VAL_MANUAL, ymin, ymax);
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
171 break;
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
172 }
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
173 return 0;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
174 }
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
175
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
176
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
177 int CVICALLBACK Plot_CB_ChangeAutoScale (int panel, int control, int event,
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
178 void *callbackData, int eventData1, int eventData2)
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
179 {
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
180 int autoscale = FALSE;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
181 double ymin, ymax;
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
182
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
183 switch (event)
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
184 {
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
185 case EVENT_COMMIT:
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
186 GetCtrlVal(panel, PLOTPANEL_CHECKBOX_AUTOSCALE, &autoscale);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
187 if (autoscale) {
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
188 SetAxisScalingMode(panel, PLOTPANEL_FREQPLOT, VAL_LEFT_YAXIS, VAL_AUTOSCALE, 0, 0);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
189 GetAxisScalingMode(panel, PLOTPANEL_FREQPLOT,VAL_LEFT_YAXIS, NULL, &ymin, &ymax);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
190 SetCtrlVal(panel, PLOTPANEL_MIN, ymin);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
191 SetCtrlVal(panel, PLOTPANEL_MAX, ymax);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
192 /* adjust control limits */
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
193 SetCtrlAttribute(panel, PLOTPANEL_MIN, ATTR_MAX_VALUE, ymax);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
194 SetCtrlAttribute(panel, PLOTPANEL_MAX, ATTR_MIN_VALUE, ymin);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
195 } else {
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
196 GetCtrlVal(panel, PLOTPANEL_MIN, &ymin);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
197 GetCtrlVal(panel, PLOTPANEL_MAX, &ymax);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
198 SetAxisScalingMode(panel, PLOTPANEL_FREQPLOT, VAL_LEFT_YAXIS, VAL_MANUAL, ymin, ymax);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
199 }
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
200 break;
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
201 }
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
202 return 0;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
203 }
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
204
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
205
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
206 int CVICALLBACK Plot_CB_ChangeScalingStep(int panel, int control, int event,
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
207 void *callbackData, int eventData1, int eventData2)
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
208 {
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
209 double step;
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
210
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
211 switch (event)
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
212 {
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
213 case EVENT_COMMIT:
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
214 GetCtrlVal(panel, PLOTPANEL_SCALINGSTEP, &step);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
215 SetCtrlAttribute(panel, PLOTPANEL_MIN, ATTR_INCR_VALUE, step);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
216 SetCtrlAttribute(panel, PLOTPANEL_MAX, ATTR_INCR_VALUE, step);
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
217 break;
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
218 }
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
219 return 0;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
220 }
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
221
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
222
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
223 int CVICALLBACK Plot_CB_Reset (int panel, int control, int event,
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
224 void *callbackData, int eventData1, int eventData2)
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
225 {
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
226 Plot_Data *data;
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
227 switch (event)
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
228 {
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
229 case EVENT_COMMIT:
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
230 GetPanelAttribute (panel, ATTR_CALLBACK_DATA, &data);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
231 data->IndexPoint = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
232 data->Mean = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
233 data->Slope = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
234 data->ADev = 0;
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
235 break;
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
236 }
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
237 return 0;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
238 }
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
239
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
240
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
241 int CVICALLBACK Plot_CB_GetDrift (int panel, int control, int event,
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
242 void *callbackData, int eventData1, int eventData2)
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
243 {
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
244 Plot_Data *data;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
245 int dedrift;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
246 double drift;
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
247
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
248 switch (event)
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
249 {
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
250 case EVENT_COMMIT:
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
251 GetPanelAttribute(panel, ATTR_CALLBACK_DATA, &data);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
252 GetCtrlVal(panel, PLOTPANEL_CHECKBOX_DEDRIFT, &dedrift);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
253 if (dedrift) {
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
254 GetCtrlVal(panel, PLOTPANEL_DEDRIFT, &drift);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
255 drift += data->Slope;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
256 SetCtrlVal(panel, PLOTPANEL_DEDRIFT, drift);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
257 data->IndexPoint = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
258 data->Mean = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
259 data->Slope = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
260 data->ADev = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
261 } else
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
262 SetCtrlVal(panel,PLOTPANEL_DEDRIFT, data->Slope);
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
263 break;
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
264 }
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
265 return 0;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
266 }
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
267
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
268
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
269 int CVICALLBACK Plot_CB_ChangeDrift (int panel, int control, int event,
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
270 void *callbackData, int eventData1, int eventData2)
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
271 {
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
272 int dedrift;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
273 Plot_Data *data;
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
274
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
275 switch (event)
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
276 {
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
277 case EVENT_COMMIT:
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
278 GetCtrlVal(panel, PLOTPANEL_CHECKBOX_DEDRIFT, &dedrift);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
279 if (dedrift) {
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
280 GetPanelAttribute (panel, ATTR_CALLBACK_DATA, &data);
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
281 data->IndexPoint = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
282 data->Mean = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
283 data->Slope = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
284 data->ADev = 0;
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
285 }
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
286 break;
135
77539f2597b1 Code cleanup
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 134
diff changeset
287 }
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
288 return 0;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
289 }
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
290