lidar_correction_ghk.py

changeset 26
28b5510492ba
parent 25
4c66b9ca23be
child 28
79fa4a41420f
--- a/lidar_correction_ghk.py	Mon Feb 20 15:16:58 2017 +0100
+++ b/lidar_correction_ghk.py	Wed Nov 15 12:34:36 2017 +0100
@@ -203,8 +203,17 @@
 # *******************************************************************************************************************************
 
 # --- Read actual lidar system parameters from optic_input.py  (should be in sub-directory 'system_settings')
-InputFile = 'optic_input_example_lidar.py'
-
+InputFile = 'optic_input_crossed_mirrors_test.py'
+InputFile = 'optic_input_crossed_mirrors_test_combined.py'
+InputFile = 'optic_input_ver8c_POLIS_355_Mar2017.py'
+# InputFile = 'optic_input_ver8c_POLIS_532_Mar2017.py'
+InputFile = 'optic_input_example_lidar_0.9.5.py'
+InputFile = 'optic_input_ver8c_PollyXT_532_Lacros.py'
+InputFile = 'optic_input_ver8c_CUT_532_May2017.py'
+InputFile = 'optic_input_ver8c_MUSA.py'
+InputFile = 'optic_input_ver10_RALI_JA.py'
+InputFile = 'optic_input_ver10_RALI_act.py'
+InputFile = 'optic_input_ver8c-IPRAL-170331.py'
 '''
 print("From ", dname)
 print("Running ", fname)
@@ -825,17 +834,20 @@
     LDRsim = Ir / It  # simulated uncorrected LDR with Y from input file
     # Corrected LDRsimCorr from forward simulated LDRsim (atrue)
     # LDRsimCorr = (1./Eta*LDRsim*(GT+HT)-(GR+HR))/((GR-HR)-1./Eta*LDRsim*(GT-HT))
-    if Y == -1.:
-        LDRsimx = 1. / LDRsim
+    '''
+    if ((Y == -1.) and (abs(RotL0) < 45)) or ((Y == +1.) and (abs(RotL0) > 45)):
+        LDRsimx = 1. / LDRsim / Etax
     else:
-        LDRsimx = LDRsim
+        LDRsimx = LDRsim / Etax
+    ''' 
+    LDRsimx = LDRsim
 
     # The following is correct without doubt
     # LDRCorr = (LDRsim*K/Etax*(GT+HT)-(GR+HR))/((GR-HR)-LDRsim*K/Etax*(GT-HT))
 
     # The following is a test whether the equations for calibration Etax and normal  signal (GHK, LDRsim) are consistent
     LDRCorr = (LDRsim / Eta * (GT + HT) - (GR + HR)) / ((GR - HR) - LDRsim * K / Etax * (GT - HT))
-
+    #LDRCorr = LDRsimx  # for test only
     TTa = TiT * TaT  # *ATP1
     TRa = TiR * TaR  # *ARP1
 
@@ -932,7 +944,7 @@
         print("{0:8.5f},{1:8.5f},{2:8.5f},{3:8.5f},{4:9.5f},{5:9.5f},{6:9.5f}".format(GR0, GT0, HR0, HT0, K0List[0],
                                                                                       K0List[1], K0List[2]))
         print('========================================================================')
-        print("{0:9},{1:9},{2:9}".format("  LDRtrue", "  LDRsimx", "  LDRCorr"))
+        print("{0:10},{1:10},{2:10},{3:10}".format("  LDRtrue", "  LDRsimx", "  1/LDRsimx", "  LDRCorr"))
 
         #LDRtrueList = 0.004, 0.02, 0.2, 0.45
         aF11sim0 = np.zeros(5)
@@ -951,9 +963,10 @@
                                                                                                    RS0, ERaT0, RotaT0,
                                                                                                    RetT0, ERaR0, RotaR0,
                                                                                                    RetR0, LDRCal0)
-            print("{0:9.5f},{1:9.5f},{2:9.5f}".format(LDRtrue, LDRsimx, LDRCorr))
+            print("{0:10.5f},{1:10.5f},{2:10.5f},{3:10.5f}".format(LDRtrue, LDRsimx, 1/LDRsimx, LDRCorr))
             aF11sim0[i] = F11sim0
             # the assumed true aF11sim0 results will be used below to calc the deviation from the real signals
+        print("Note: LDRsimx = LDR of the nominal system directly from measured signals without GHK-corrections")
 
 file = open('output_files\output_' + LID + '.dat', 'r')
 print(file.read())
@@ -1698,7 +1711,7 @@
                     # !!! see below line 1673ff
 
                     aF11corr[iLDR, iN] = F11corr
-                    aA[iLDR, iN] = LDRCorr
+                    aA[iLDR, iN] = LDRCorr # LDRCorr # LDRsim # for test only
 
                     aX[0, iN] = GR
                     aX[1, iN] = GT

mercurial