rali.py

changeset 22
a2355e871b23
parent 20
18a77f8065c1
equal deleted inserted replaced
21:406eb996a9cd 22:a2355e871b23
1 general_parameters = \ 1 import radiometer
2 {'System': '\'RALI\'',
3 'Laser_Pointing_Angle': 0,
4 'Molecular_Calc': 0,
5 'Latitude_degrees_north': 44.348,
6 'Longitude_degrees_east': 26.029,
7 'Altitude_meter_asl': 93.0} # This should be float
8 2
9 channel_parameters = \ 3 from licel import LicelLidarMeasurement
10 {'01064.o_an': {'channel_ID': 89,
11 'Background_Low': 50000,
12 'Background_High': 60000,
13 'Laser_Shots': 600,
14 'LR_Input': 1,
15 'DAQ_Range': 100.0,
16 'Depolarization_Factor': 0,},
17 '00355.o_an': {'channel_ID': 98,
18 'Background_Low': 50000,
19 'Background_High': 60000,
20 'Laser_Shots': 600,
21 'LR_Input': 1,
22 'DAQ_Range': 100.0,
23 'Depolarization_Factor': 0,},
24 '00355.o_ph': {'channel_ID': 99,
25 'Background_Low': 50000,
26 'Background_High': 60000,
27 'Laser_Shots': 600,
28 'LR_Input': 1,
29 'DAQ_Range': 0,
30 'Depolarization_Factor': 0,},
31 '00387.o_an': {'channel_ID': 90,
32 'Background_Low': 50000,
33 'Background_High': 60000,
34 'Laser_Shots': 600,
35 'LR_Input': 1,
36 'DAQ_Range': 20.0,
37 'Depolarization_Factor': 0,},
38 '00387.o_ph': {'channel_ID': 91,
39 'Background_Low': 50000,
40 'Background_High': 60000,
41 'Laser_Shots': 600,
42 'LR_Input': 1,
43 'DAQ_Range': 0,
44 'Depolarization_Factor': 0,},
45 '00532.p_an': {'channel_ID': 94,
46 'Background_Low': 50000,
47 'Background_High': 60000,
48 'Laser_Shots': 600,
49 'LR_Input': 1,
50 'DAQ_Range': 100.0,
51 'Depolarization_Factor': 0,},
52 '00532.p_ph': {'channel_ID': 95,
53 'Background_Low': 50000,
54 'Background_High': 60000,
55 'Laser_Shots': 600,
56 'LR_Input': 1,
57 'DAQ_Range': 0,
58 'Depolarization_Factor': 0,},
59 '00532.s_an': {'channel_ID': 96,
60 'Background_Low': 50000,
61 'Background_High': 60000,
62 'Laser_Shots': 600,
63 'LR_Input': 1,
64 'DAQ_Range': 20.0,
65 'Depolarization_Factor': 0.0441,},
66 '00532.s_ph': {'channel_ID': 97,
67 'Background_Low': 50000,
68 'Background_High': 60000,
69 'Laser_Shots': 600,
70 'LR_Input': 1,
71 'DAQ_Range': 0,
72 'Depolarization_Factor': 0.0441,},
73 '00607.o_an': {'channel_ID': 92,
74 'Background_Low': 50000,
75 'Background_High': 60000,
76 'Laser_Shots': 600,
77 'LR_Input': 1,
78 'DAQ_Range': 20.0,
79 'Depolarization_Factor': 0,},
80 '00607.o_pc': {'channel_ID': 93,
81 'Background_Low': 50000,
82 'Background_High': 60000,
83 'Laser_Shots': 600,
84 'LR_Input':1,
85 'DAQ_Range':20.0,
86 'Depolarization_Factor': 0,},
87 }
88 4
5 import rali_netcdf_parameters
6
7 class RaliLidarMeasurement(LicelLidarMeasurement):
8 extra_netcdf_parameters = rali_netcdf_parameters
9
10 def get_PT(self):
11 ''' Gets the pressure and temperature from Radiometer data.
12 If no data file is found, mean values from past measurements are
13 used.
14 '''
15
16 start_time = self.info['start_time']
17 stop_time = self.info['stop_time']
18 dt = stop_time - start_time
19 mean_time = start_time + dt/2
20
21 meteo_triplet = radiometer.get_mean_PT(mean_time)
22
23 if meteo_triplet:
24 pressure, temperature, humidity = meteo_triplet
25 else:
26 print "Radiometer meteo data not available. Using past values."
27 pressure = radiometer.P_mean[mean_time.month - 1, mean_time.hour]
28 temperature = radiometer.T_mean[mean_time.month - 1, mean_time.hour]
29
30 self.info['Temperature'] = temperature - 273.15
31 self.info['Pressure'] = pressure
32
33

mercurial