changeset 125:37535873ee83

Rename variables from SigneX to SignX
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Fri, 13 Dec 2013 12:32:51 +0100
parents bdfc61a8ebee
children 5bba1d1c3b46
files FXAnalyse.c FXAnalyse.uir
diffstat 2 files changed, 24 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/FXAnalyse.c	Fri Dec 13 12:24:00 2013 +0100
+++ b/FXAnalyse.c	Fri Dec 13 12:32:51 2013 +0100
@@ -116,7 +116,7 @@
 double Frequencystep3=100000.0, tbegin3=0.0, Frepbefore3=0.0, Frequency3=0.0;
 
 volatile bool Getsign1=FALSE,Getsign2=FALSE,Getsign3=FALSE;
-double Signe1=1.0,Signe2=1.0,Signe3=0.0;
+double Sign1=1.0, Sign2=1.0, Sign3=0.0;
 
 // slope cancelling
 
@@ -287,9 +287,9 @@
 	mupDefineVar(parser, "Nu1", &Nu1);
 	mupDefineVar(parser, "Nu2", &Nu2);
 	mupDefineVar(parser, "DeltaDDS3", &DeltaDDS3);
-	mupDefineVar(parser, "Signe1", &Signe1);
-	mupDefineVar(parser, "Signe2", &Signe2);
-	mupDefineVar(parser, "Signe3", &Signe3);
+	mupDefineVar(parser, "Sign1", &Sign1);
+	mupDefineVar(parser, "Sign2", &Sign2);
+	mupDefineVar(parser, "Sign3", &Sign3);
 	mupDefineVar(parser, "Ndiv", &Ndiv);
 	mupDefinePostfixOprt(parser, "P", &Peta,  1);
 	mupDefinePostfixOprt(parser, "T", &Tera,  1);
@@ -880,7 +880,7 @@
 							n_1 = 0;
 							
 							// compute N1
-							N_1 = Signe1 * (2*Ndiv * DeltakHz_1 * 1000)/(Frepminus_1 - Frepplus_1 - Slope_1 * (t3_1 - t2_1));
+							N_1 = Sign1 * (2*Ndiv * DeltakHz_1 * 1000)/(Frepminus_1 - Frepplus_1 - Slope_1 * (t3_1 - t2_1));
 							SetCtrlVal(CalcNPanel, CALCN_N, N_1);
 						
 							t1_1 = 0.0;
@@ -946,7 +946,7 @@
 							DDS4xAD9912_SetFrequency(&DDS4xAD9912, 1, fDDS1);
 							
 							// adjust DDS3 to keep beatnote within the bandpass filter. prediction
-							double fDDS3 = FrequencyDDS3Init - DeltakHz_2*1000*(-Signe1/Signe2)*Ndiv*(Nu2)/(Nu1) - Beatslope_2*(utc-t1_2);
+							double fDDS3 = FrequencyDDS3Init - DeltakHz_2*1000*(-Sign1/Sign2)*Ndiv*(Nu2)/(Nu1) - Beatslope_2*(utc-t1_2);
 							DeltaDDS3 = fDDS3 - DDS4xAD9912.Frequency3;
 							printf("deltaDDS3 = %g\n", DeltaDDS3);
 							SetCtrlVal(MainPanel, PANEL_DDS3, fDDS3);
@@ -1012,7 +1012,7 @@
 							DDS4xAD9912_SetFrequency(&DDS4xAD9912, 1, fDDS1);
 							
 							// adjust DDS3 to keep beatnote within the bandpass filter. prediction
-							double fDDS3 = FrequencyDDS3Init + DeltakHz_2*1000*(-Signe1/Signe2)*Ndiv*(Nu2)/(Nu1);
+							double fDDS3 = FrequencyDDS3Init + DeltakHz_2*1000*(-Sign1/Sign2)*Ndiv*(Nu2)/(Nu1);
 							DeltaDDS3 = fDDS3 - DDS4xAD9912.Frequency3;
 							SetCtrlVal(MainPanel, PANEL_DDS3, fDDS3);
 							DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, fDDS3);
@@ -1046,7 +1046,7 @@
 							n_2 = 0;
 
 							// compute N2
-							N_2 = (Signe2)*(-DeltaDDS3+Delta10K_Plus-Delta10K_Minus-Beatslope_2*(t3_2-t2_2) )/(Frepminus_2-Frepplus_2-Slope_2*(t3_2-t2_2));
+							N_2 = Sign2*(-DeltaDDS3+Delta10K_Plus-Delta10K_Minus-Beatslope_2*(t3_2-t2_2) )/(Frepminus_2-Frepplus_2-Slope_2*(t3_2-t2_2));
 							SetCtrlVal(CalcNPanel, CALCN_N, N_2);
 							
 							// back to nominal frequency
@@ -1118,7 +1118,7 @@
 							SetCtrlVal(MainPanel, PANEL_DDS1, FrequDDS1 + DeltakHz_3 * 1000);
 							DDS4xAD9912_RampFrequency(&DDS4xAD9912, 1, FrequDDS1 + DeltakHz_3 * 1000, FREP_STEP_SIZE);
 							// compensate with DDS3 to keep measured beatnote in counter box range
-							double fDDS3 = FrequencyDDS3Init + Signe1 * Signe3 * N3/N1 * Ndiv * DeltakHz_3 * 1000;
+							double fDDS3 = FrequencyDDS3Init + Sign1 * Sign3 * N3/N1 * Ndiv * DeltakHz_3 * 1000;
 							SetCtrlVal(MainPanel, PANEL_DDS3, fDDS3);
 							DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, fDDS3);
 							
@@ -1175,7 +1175,7 @@
 							SetCtrlVal(MainPanel, PANEL_DDS1, FrequDDS1 - DeltakHz_3 * 1000);
 							DDS4xAD9912_RampFrequency(&DDS4xAD9912, 1, FrequDDS1 - DeltakHz_3 * 1000, FREP_STEP_SIZE);
 							// compensate with DDS3 to keep measured beatnote in counter box range
-							double fDDS3 = FrequencyDDS3Init - Signe1 * Signe3 * N3/N1 * Ndiv * DeltakHz_3 * 1000;
+							double fDDS3 = FrequencyDDS3Init - Sign1 * Sign3 * N3/N1 * Ndiv * DeltakHz_3 * 1000;
 							SetCtrlVal(MainPanel, PANEL_DDS3, fDDS3);
 							DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, fDDS3);
 							
@@ -1214,7 +1214,7 @@
 							logmsg("f_beat_Sr_plus =%.12e", f_beat_Sr_plus);
 							
 							// compute N3
-							double delta_f_beat_Sr = f_beat_Sr_plus - f_beat_Sr_minus + 2.0 * Signe1 * Signe3 * N3/N1 * Ndiv * DeltakHz_3 * 1000;
+							double delta_f_beat_Sr = f_beat_Sr_plus - f_beat_Sr_minus + 2.0 * Sign1 * Sign3 * N3/N1 * Ndiv * DeltakHz_3 * 1000;
 							double delta_f_beat_Sr_expected = delta_f_rep * N3;
 							logmsg("delta fbeat: measured=%.12e expected=%.12e", delta_f_beat_Sr, delta_f_beat_Sr_expected);
 							N_3 = delta_f_beat_Sr / delta_f_rep;
@@ -1242,49 +1242,49 @@
 						break;
 				}
 				
-				// Calcul du signe de fb
+				// beatnote sign determination
 				
 				if (Getsign1 == TRUE) {
 					if (utc > tbegin1+2) {
 						if (Math1 > Frepbefore1)
-							Signe1 = -1.0;
+							Sign1 = -1.0;
 						else
-							Signe1 = +1.0;
+							Sign1 = +1.0;
 						SetCtrlVal(MainPanel, PANEL_DDS1, Frequency1); 
 						DDS4xAD9912_SetFrequency(&DDS4xAD9912, 1, Frequency1);
 						Getsign1 = FALSE;
-						SetCtrlVal(MainPanel, PANEL_SIGN1, Signe1);
+						SetCtrlVal(MainPanel, PANEL_SIGN1, Sign1);
 					}
 				}
 				if (Getsign2 == TRUE) {
 					if (utc > tbegin2+2){
 						if (Math1 > Frepbefore2) { 
 							if (Ch2 > Ch2before)
-								Signe2 = +1.0;
+								Sign2 = +1.0;
 							else
-								Signe2 = -1.0;
+								Sign2 = -1.0;
 						} else {
 							if (Ch2 > Ch2before)
-								Signe2 = -1.0;
+								Sign2 = -1.0;
 							else 
-								Signe2 = +1.0;
+								Sign2 = +1.0;
 						}
 						SetCtrlVal(MainPanel, PANEL_DDS1, Frequency2); 
 						DDS4xAD9912_SetFrequency(&DDS4xAD9912, 1, Frequency2);
 						Getsign2 = FALSE;
-						SetCtrlVal(MainPanel, PANEL_SIGN2, Signe2);
+						SetCtrlVal(MainPanel, PANEL_SIGN2, Sign2);
 					}
 				}
 				if (Getsign3 == TRUE) {
 					if (utc > tbegin3+2){
 						if (Ch3 > Frepbefore3)
-							Signe3 = -1.0;
+							Sign3 = -1.0;
 						else
-							Signe3 = +1.0;
+							Sign3 = +1.0;
 						SetCtrlVal(MainPanel, PANEL_DDS3, Frequency3); 
 						DDS4xAD9912_SetFrequency(&DDS4xAD9912, 4, Frequency3);
 						Getsign3 = FALSE;
-						SetCtrlVal(MainPanel, PANEL_SIGN3, Signe3);
+						SetCtrlVal(MainPanel, PANEL_SIGN3, Sign3);
 					}
 				}
 				
@@ -2335,7 +2335,7 @@
 	switch (event)
 	{
 		case EVENT_COMMIT:
-			GetCtrlVal(panel, control, &Signe3);
+			GetCtrlVal(panel, control, &Sign3);
 			break;
 	}
 	return 0;
Binary file FXAnalyse.uir has changed