system_settings/optic_input_example_lidar.py

changeset 16
313ac320b970
parent 13
f08818615e3a
child 17
43fe065e63b6
equal deleted inserted replaced
15:94eac33c6e6e 16:313ac320b970
2 # Probably it will be better in the future to let the main script rather read a conguration file, 2 # Probably it will be better in the future to let the main script rather read a conguration file,
3 # which might improve the portability of the code within an executable. 3 # which might improve the portability of the code within an executable.
4 # Due to problems I had with some two letter variables, most variables are now with at least 4 # Due to problems I had with some two letter variables, most variables are now with at least
5 # three letters mixed small and capital. 5 # three letters mixed small and capital.
6 6
7 # Do you want to calculate the errors? If not, just the GHK-parameters are determined.
8 Error_Calc = True
9
7 # Header to identify the lidar system 10 # Header to identify the lidar system
8 # Values of DO, DT, and DR etc. from fit to lamp calibrations in Leipzig (LampCalib_2_invers_c_D0=0.opj) 11 # Values of DO, DT, and DR etc. from fit to lamp calibrations in Leipzig (LampCalib_2_invers_c_D0=0.opj)
9 EID = "xx" # Earlinet station ID 12 EID = "xx" # Earlinet station ID
10 LID = "example lidar" # Additional lidar ID (short descriptive text) 13 LID = "example lidar" # Additional lidar ID (short descriptive text)
11 # firet fit intern (FITLN1) => DO = 0, DT fixed -0.9998, eta and DR fitted,
12 # => internal calib with LinPol before the receiver
13 print(" Lidar system :", EID, ", ", LID) 14 print(" Lidar system :", EID, ", ", LID)
14 15
15 # +++ IL Laser and +-Uncertainty 16 # +++ IL Laser and +-Uncertainty
16 bL = 1. #degree of linear polarization; default 1 17 bL = 1. #degree of linear polarization; default 1
17 RotL, dRotL, nRotL = 0., 1., 1 #alpha; rotation of laser polarization in degrees; default 0 18 RotL, dRotL, nRotL = 0., 2., 1 #alpha; rotation of laser polarization in degrees; default 0
18 19
19 # +++ ME Emitter optics and +-Uncertainty; default = no emitter optics 20 # +++ ME Emitter optics and +-Uncertainty; default = no emitter optics
20 DiE, dDiE, nDiE = 0.0, 0.1, 0 # Diattenuation 21 DiE, dDiE, nDiE = 0.0, 0.1, 0 # Diattenuation
21 TiE = 1.0 # Unpolarized transmittance 22 TiE = 1.0 # Unpolarized transmittance
22 RetE, dRetE, nRetE = 0., 180., 0 # Retardance in degrees 23 RetE, dRetE, nRetE = 0., 180., 0 # Retardance in degrees
23 RotE, dRotE, nRotE = 0., 1.0, 0 # beta: Rotation of optical element in degrees 24 RotE, dRotE, nRotE = 0., 1.0, 0 # beta: Rotation of optical element in degrees
24 25
25 # +++ MO Receiver optics including telescope 26 # +++ MO Receiver optics including telescope
26 DiO, dDiO, nDiO = 0.0, 0.01, 1 27 DiO, dDiO, nDiO = 0.0, 0.1, 1
27 TiO = 1.0 28 TiO = 1.0
28 RetO, dRetO, nRetO = 0., 180., 2 29 RetO, dRetO, nRetO = 0., 180., 0
29 RotO, dRotO, nRotO = 0., 0.5, 0 #gamma: Rotation of optical element in degrees 30 RotO, dRotO, nRotO = 0., 0.5, 0 #gamma: Rotation of optical element in degrees
30 31
31 # +++++ PBS MT Transmitting path defined with TS, TP, PolFilter extinction ratio ERaT, and +-Uncertainty 32 # +++++ PBS MT Transmitting path defined with TS, TP, PolFilter extinction ratio ERaT, and +-Uncertainty
32 # --- Polarizing beam splitter transmitting path 33 # --- Polarizing beam splitter transmitting path
33 TP, dTP, nTP = 0.95, 0.01, 1 34 TP, dTP, nTP = 0.95, 0.01, 1
34 TS, dTS, nTS = 0.02, 0.01, 1 35 TS, dTS, nTS = 0.02, 0.01, 1
35 RetT, dRetT, nRetT = 0.0, 180., 0 # Retardance in degrees 36 RetT, dRetT, nRetT = 0.0, 180., 0 # Retardance in degrees
36 # --- Pol.Filter behind transmitted path of PBS 37 # --- Pol.Filter behind transmitted path of PBS
37 ERaT, dERaT, nERaT = 0.0001, 0.0001, 1 # Extinction ratio 38 ERaT, dERaT, nERaT = 0.001, 0.001, 1 # Extinction ratio
38 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° 39 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°
39 # -- 40 # --
40 TiT = 0.5 * (TP + TS) 41 TiT = 0.5 * (TP + TS)
41 DiT = (TP-TS)/(TP+TS) 42 DiT = (TP-TS)/(TP+TS)
42 DaT = (1-ERaT)/(1+ERaT) 43 DaT = (1-ERaT)/(1+ERaT)
43 TaT = 0.5*(1+ERaT) 44 TaT = 0.5*(1+ERaT)
44 45
45 # +++++ PBS MR Reflecting path defined with RS, RP, PolFilter extinction ratio ERaR and +-Uncertainty 46 # +++++ PBS MR Reflecting path defined with RS, RP, PolFilter extinction ratio ERaR and +-Uncertainty
46 # ---- for PBS without absorption the change of RS and RP must depend on the change of TP and TS. Hence the values and uncertainties are not independent. 47 # ---- for PBS without absorption the change of RS and RP must depend on the change of TP and TS. Hence the values and uncertainties are not independent.
47 RS_RP_depend_on_TS_TP = True 48 RS_RP_depend_on_TS_TP = False
48 # --- Polarizing beam splitter reflecting path 49 # --- Polarizing beam splitter reflecting path
49 if(RS_RP_depend_on_TS_TP): 50 if(RS_RP_depend_on_TS_TP):
50 RP, dRP, nRP = 1-TP, 0.00, 0 # do not change this 51 RP, dRP, nRP = 1-TP, 0.00, 0 # do not change this
51 RS, dRS, nRS = 1-TS, 0.00, 0 # do not change this 52 RS, dRS, nRS = 1-TS, 0.00, 0 # do not change this
52 else: 53 else:
53 RP, dRP, nRP = 0.05, 0.01, 1 # change this if RS_RP_depend_on_TS_TP = False 54 RP, dRP, nRP = 0.05, 0.01, 1 # change this if RS_RP_depend_on_TS_TP = False
54 RS, dRS, nRS = 0.98, 0.01, 1 # change this if RS_RP_depend_on_TS_TP = False 55 RS, dRS, nRS = 0.98, 0.01, 1 # change this if RS_RP_depend_on_TS_TP = False
55 RetR, dRetR, nRetR = 0.0, 180., 0 56 RetR, dRetR, nRetR = 0.0, 180., 0
56 # --- Pol.Filter behind reflected path of PBS 57 # --- Pol.Filter behind reflected path of PBS
57 ERaR, dERaR, nERaR = 0.0001, 0.0001, 1 # Extinction ratio 58 ERaR, dERaR, nERaR = 0.001, 0.001, 1 # Extinction ratio
58 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° 59 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°
59 # -- 60 # --
60 TiR = 0.5 * (RP + RS) 61 TiR = 0.5 * (RP + RS)
61 DiR = (RP-RS)/(RP+RS) 62 DiR = (RP-RS)/(RP+RS)
62 DaR = (1-ERaR)/(1+ERaR) 63 DaR = (1-ERaR)/(1+ERaR)
63 TaR = 0.5*(1+ERaR) 64 TaR = 0.5*(1+ERaR)
82 TiC = 1. 83 TiC = 1.
83 RetC, dRetC, nRetC = 180., 0., 0 84 RetC, dRetC, nRetC = 180., 0., 0
84 #NOTE: use here twice the HWP-rotation-angle 85 #NOTE: use here twice the HWP-rotation-angle
85 RotC, dRotC, nRotC = 0.0, 0.1, 1 #constant calibrator offset epsilon 86 RotC, dRotC, nRotC = 0.0, 0.1, 1 #constant calibrator offset epsilon
86 RotationErrorEpsilonForNormalMeasurements = True # is in general True for TypeC == 2 calibrator 87 RotationErrorEpsilonForNormalMeasurements = True # is in general True for TypeC == 2 calibrator
87 elif TypeC == 3: # linear polarizer calibrator 88 elif TypeC == 3: # linear polarizer calibrator. Diattenuation DiC = (1-ERC)/(1+ERC); ERC = extinction ratio of calibrator
88 DiC, dDiC, nDiC = 0.9998, 0.0001, 1 # ideal 1.0 89 DiC, dDiC, nDiC = 0.9998, 0.0001, 1 # ideal 1.0
89 TiC = 0.505 # ideal 0.5 90 TiC = 0.4 # ideal 0.5
90 RetC, dRetC, nRetC = 0., 0., 0 91 RetC, dRetC, nRetC = 0., 0., 0
91 RotC, dRotC, nRotC = 0.0, 0.1, 1 #constant calibrator offset epsilon 92 RotC, dRotC, nRotC = 0.0, 0.1, 0 #constant calibrator offset epsilon
92 RotationErrorEpsilonForNormalMeasurements = False # is in general False for TypeC == 3 calibrator 93 RotationErrorEpsilonForNormalMeasurements = False # is in general False for TypeC == 3 calibrator
93 elif TypeC == 4: # QWP calibrator 94 elif TypeC == 4: # QWP calibrator
94 DiC, dDiC, nDiC = 0.0, 0., 0 # ideal 1.0 95 DiC, dDiC, nDiC = 0.0, 0., 0 # ideal 1.0
95 TiC = 1.0 # ideal 0.5 96 TiC = 1.0 # ideal 0.5
96 RetC, dRetC, nRetC = 90., 0., 0 97 RetC, dRetC, nRetC = 90., 0., 0
99 elif TypeC == 6: # real half-wave plate calibration at +-22.5° => rotated_diattenuator_X22x5deg.odt 100 elif TypeC == 6: # real half-wave plate calibration at +-22.5° => rotated_diattenuator_X22x5deg.odt
100 DiC, dDiC, nDiC = 0., 0., 0 101 DiC, dDiC, nDiC = 0., 0., 0
101 TiC = 1. 102 TiC = 1.
102 RetC, dRetC, nRetC = 180., 0., 0 103 RetC, dRetC, nRetC = 180., 0., 0
103 #Note: use real HWP angles here 104 #Note: use real HWP angles here
104 RotC, dRotC, nRotC = 0.0, 0.1, 1 #constant calibrator offset epsilon -1.15 105 RotC, dRotC, nRotC = 0.0, 0.1, 1 #constant calibrator offset epsilon
105 RotationErrorEpsilonForNormalMeasurements = True # is in general True for TypeC == 6 calibrator 106 RotationErrorEpsilonForNormalMeasurements = True # is in general True for TypeC == 6 calibrator
106 else: 107 else:
107 print ('calibrator not implemented yet') 108 print ('calibrator not implemented yet')
108 sys.exit() 109 sys.exit()
109 110
110 # --- LDRCal assumed atmospheric linear depolarization ratio during the calibration measurements (first guess) 111 # --- LDRCal assumed atmospheric linear depolarization ratio during the calibration measurements in calibration range with almost clean air (first guess)
111 LDRCal,dLDRCal,nLDRCal= 0.008, 0.003, 0 112 LDRCal,dLDRCal,nLDRCal= 0.009, 0.005, 1 # spans the interference filter influence
112 113
113 # ==================================================== 114 # ====================================================
114 # NOTE: there is no need to change anything below. 115 # NOTE: there is no need to change anything below.
115 116
116 # --- LDRtrue for simulation of measurement => LDRsim 117 # --- LDRtrue for simulation of measurement => LDRsim

mercurial