Changed description of y=+-1 orientation; 0.9.6

Wed, 15 Nov 2017 12:34:36 +0100

author
Volker Freudenthaler <volker.freudenthaler@lmu.de>
date
Wed, 15 Nov 2017 12:34:36 +0100
changeset 26
28b5510492ba
parent 25
4c66b9ca23be
child 27
e7b3f4bf631d

Changed description of y=+-1 orientation;
Corrected calculation of LDRsimx

lidar_correction_ghk.py file | annotate | diff | comparison | revisions
system_settings/Polarisation-orientation-2.png file | annotate | diff | comparison | revisions
system_settings/Polarisation-orientation.png file | annotate | diff | comparison | revisions
system_settings/optic_input_example_lidar.py file | annotate | diff | comparison | revisions
--- 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
Binary file system_settings/Polarisation-orientation-2.png has changed
Binary file system_settings/Polarisation-orientation.png has changed
--- a/system_settings/optic_input_example_lidar.py	Mon Feb 20 15:16:58 2017 +0100
+++ b/system_settings/optic_input_example_lidar.py	Wed Nov 15 12:34:36 2017 +0100
@@ -25,19 +25,19 @@
 RotE, dRotE, nRotE 	= 0., 	1.0, 	0	# beta: Rotation of optical element in degrees
 
 # +++ MO Receiver optics including telescope 
-DiO,  dDiO, nDiO 	= 0.0, 	0.1,    1
-TiO 				= 1.0 				
-RetO, dRetO, nRetO 	= 0., 	180., 	0 
-RotO, dRotO, nRotO 	= 0., 	0.5, 	0	#gamma: Rotation of optical element in degrees
+DiO,  dDiO, nDiO 	= 0.0, 	0.1,    1	# Diattenuation
+TiO 				= 1.0   	# Unpolarized transmittance 				
+RetO, dRetO, nRetO 	= 0., 	180., 	0	# Retardance in degrees  
+RotO, dRotO, nRotO 	= 0., 	0.5, 	0	#gamma: Rotation of the optical element in degrees
  
 # +++++ PBS MT Transmitting path defined with TS, TP, PolFilter extinction ratio ERaT, and +-Uncertainty
 #   --- Polarizing beam splitter transmitting path
-TP,   dTP, nTP	 	= 0.95,	0.01,   1
-TS,   dTS, nTS	 	= 0.02,	0.01,   1
+TP,   dTP, nTP	 	= 0.95,	0.01,   1 # transmittance of the PBS for parallel polarized light
+TS,   dTS, nTS	 	= 0.02,	0.01,   1 # transmittance of the PBS for cross polarized light
 RetT, dRetT, nRetT	 = 0.0,	180., 	0 # Retardance in degrees
 #   --- Pol.Filter behind transmitted path of PBS
 ERaT, dERaT, nERaT	 = 0.001, 0.001, 1 # Extinction ratio
-RotaT, dRotaT, nRotaT = 0.,   1.,    1 # Rotation of the Pol.-filter in degrees; usually 0° because TP >> TS, but for PollyXTs it can also be 90°
+RotaT, dRotaT, nRotaT = 0.,   1.,    1 # Rotation of the Pol.-filter in degrees; usually close to 0° because TP >> TS, but for PollyXTs it can also be close to 90°
 #   --
 TiT = 0.5 * (TP + TS)
 DiT = (TP-TS)/(TP+TS)
@@ -52,9 +52,9 @@
     RP, dRP, nRP        = 1-TP,  0.00, 0    # do not change this
     RS, dRS, nRS        = 1-TS,  0.00, 0    # do not change this
 else:
-    RP, dRP, nRP        = 0.05,  0.01, 1    # change this if RS_RP_depend_on_TS_TP = False
-    RS, dRS, nRS        = 0.98,  0.01, 1    # change this if RS_RP_depend_on_TS_TP = False
-RetR, dRetR, nRetR	    = 0.0,   180., 0
+    RP, dRP, nRP        = 0.05,  0.01, 1    # change this if RS_RP_depend_on_TS_TP = False; reflectance of the PBS for parallel polarized light
+    RS, dRS, nRS        = 0.98,  0.01, 1    # change this if RS_RP_depend_on_TS_TP = False; reflectance of the PBS for cross polarized light
+RetR, dRetR, nRetR	    = 0.0,   180., 0    # Retardance in degrees
 #   --- Pol.Filter behind reflected path of PBS
 ERaR, dERaR, nERaR	  = 0.001, 0.001, 1 # Extinction ratio
 RotaR, dRotaR, nRotaR = 90.,   1.,    1  # Rotation of the Pol.-filter in degrees; usually 90° because RS >> RP, but for PollyXTs it can also be 0°
@@ -64,7 +64,9 @@
 DaR = (1-ERaR)/(1+ERaR)
 TaR = 0.5*(1+ERaR)
 
-# +++ Parallel signal detected in the transmitted channel => Y = +1, or in the reflected channel => Y = -1
+# +++ Orientation of the PBS with respect to the reference plane (see Polarisation-orientation.png and Polarisation-orientation-2.png in /system_settings)
+#    Y = +1: polarisation in reference plane is transmitted, 
+#    Y = -1: polarisation in reference plane is reflected. 
 Y = +1.
 
 # +++ Calibrator Location
@@ -73,37 +75,37 @@
 TypeC = 3	#Type of calibrator: 1 = mechanical rotator; 2 = hwp rotator (fixed retardation); 3 = linear polarizer; 4 = qwp; 5 = circular polarizer; 6 = real HWP calibration +-22.5°
 # --- MC Calibrator parameters
 if TypeC == 1:  #mechanical rotator
-	DiC, dDiC, nDiC 	= 0., 	0., 	0
+	DiC, dDiC, nDiC 	= 0., 	0., 	0	# Diattenuation
 	TiC = 1.
-	RetC, dRetC, nRetC 	= 0., 	0., 	0
-	RotC, dRotC, nRotC 	= 0., 	0.1, 	1	#constant calibrator offset epsilon
+	RetC, dRetC, nRetC 	= 0., 	0., 	0	# Retardance in degrees
+	RotC, dRotC, nRotC 	= 0., 	0.1, 	1	#constant calibrator rotation offset epsilon
 	# Rotation error without calibrator: if False, then epsilon = 0 for normal measurements	
 	RotationErrorEpsilonForNormalMeasurements = True	# 	is in general True for TypeC == 1 calibrator
-elif TypeC == 2:   # HWP rotator
-	DiC, dDiC, nDiC 	= 0., 	0., 	0
+elif TypeC == 2:   # HWP rotator without retardance!
+	DiC, dDiC, nDiC 	= 0., 	0., 	0	# Diattenuation; ideal 0.0
 	TiC = 1.
-	RetC, dRetC, nRetC 	= 180., 0., 	0
+	RetC, dRetC, nRetC 	= 180., 0., 	0	# Retardance in degrees
 	#NOTE: use here twice the HWP-rotation-angle
-	RotC, dRotC, nRotC 	= 0.0, 	0.1, 	1	#constant calibrator offset epsilon
+	RotC, dRotC, nRotC 	= 0.0, 	0.1, 	1	#constant calibrator rotation offset epsilon
 	RotationErrorEpsilonForNormalMeasurements = True	# 	is in general True for TypeC == 2 calibrator
 elif TypeC == 3:   # linear polarizer calibrator. Diattenuation DiC = (1-ERC)/(1+ERC); ERC = extinction ratio of calibrator
-	DiC, dDiC, nDiC 	= 0.9998, 0.0001, 1	# ideal 1.0
+	DiC, dDiC, nDiC 	= 0.9998, 0.0001, 1	# Diattenuation; ideal 1.0
 	TiC = 0.4	# ideal 0.5
-	RetC, dRetC, nRetC 	= 0., 	0., 	0
-	RotC, dRotC, nRotC 	= 0.0, 	0.1, 	0	#constant calibrator offset epsilon
+	RetC, dRetC, nRetC 	= 0., 	0., 	0	# Retardance in degrees
+	RotC, dRotC, nRotC 	= 0.0, 	0.1, 	0	#constant calibrator rotation offset epsilon
 	RotationErrorEpsilonForNormalMeasurements = False	# 	is in general False for TypeC == 3 calibrator
 elif TypeC == 4:   # QWP calibrator
-	DiC, dDiC, nDiC 	= 0.0, 	0., 	0	# ideal 1.0
+	DiC, dDiC, nDiC 	= 0.0, 	0., 	0	# Diattenuation; ideal 0.0
 	TiC = 1.0	# ideal 0.5
-	RetC, dRetC, nRetC 	= 90., 	0., 	0
-	RotC, dRotC, nRotC 	= 0.0, 	0.1, 	1	#constant calibrator offset epsilon
+	RetC, dRetC, nRetC 	= 90., 	0., 	0	# Retardance in degrees
+	RotC, dRotC, nRotC 	= 0.0, 	0.1, 	1	#constant calibrator rotation offset epsilon
 	RotationErrorEpsilonForNormalMeasurements = False	# 	is  False for TypeC == 4 calibrator
-elif TypeC == 6:   # real half-wave plate calibration at +-22.5°  => rotated_diattenuator_X22x5deg.odt
-	DiC, dDiC, nDiC 	= 0., 	0., 	0
+elif TypeC == 6:   # real half-wave plate rotator calibration at +-22.5°  => rotated_diattenuator_X22x5deg.odt
+	DiC, dDiC, nDiC 	= 0., 	0., 	0	# Diattenuation; ideal 0.0
 	TiC = 1.
-	RetC, dRetC, nRetC 	= 180., 0., 	0
+	RetC, dRetC, nRetC 	= 180., 0., 	0	# Retardance in degrees
     #Note: use real HWP angles here
-	RotC, dRotC, nRotC 	= 0.0, 	0.1, 	1	#constant calibrator offset epsilon
+	RotC, dRotC, nRotC 	= 0.0, 	0.1, 	1	#constant calibrator rotation offset epsilon
 	RotationErrorEpsilonForNormalMeasurements = True	# 	is in general True for TypeC == 6 calibrator
 else:
     print ('calibrator not implemented yet')

mercurial