Merge from 79:1d3833c4d432

Thu, 05 Oct 2017 14:19:37 +0300

author
Iannis <ulalume3@yahoo.com>
date
Thu, 05 Oct 2017 14:19:37 +0300
changeset 80
48d5e9876708
parent 79
7261397d64dc (diff)
parent 76
e59cdc4fd4c0 (current diff)
child 82
01fdb725ca59

Merge from 79:1d3833c4d432

atmospheric_lidar/generic.py file | annotate | diff | comparison | revisions
--- a/atmospheric_lidar/adam2016_depolarization_parameters.py	Fri Sep 22 15:02:53 2017 +0300
+++ b/atmospheric_lidar/adam2016_depolarization_parameters.py	Thu Oct 05 14:19:37 2017 +0300
@@ -9,38 +9,38 @@
 
 # Change to channel_parameters to use all channels. For testing I define only photon counting channels below.
 channel_parameters = \
-{'00532.p_ph_p45': {'channel_ID': 647,
+{'BC1_p45': {'channel_ID': 647,
          'Background_Low': 45000,
          'Background_High': 60000,
          'Laser_Shots': 1501,
          'LR_Input': 1,
          'DAQ_Range': 0,
-         'Pol_Calib_Range_Min': 2000,
-         'Pol_Calib_Range_Max': 3000},
- '00532.s_ph_p45': {'channel_ID': 649,
+         'Pol_Calib_Range_Min': 2500,
+         'Pol_Calib_Range_Max': 4000},
+ 'BC2_p45': {'channel_ID': 649,
          'Background_Low': 45000,
          'Background_High': 60000,
          'Laser_Shots': 1501,
          'LR_Input': 1,
          'DAQ_Range': 0,
-         'Pol_Calib_Range_Min': 2000,
-         'Pol_Calib_Range_Max': 3000},
- '00532.p_ph_m45': {'channel_ID': 646,
+         'Pol_Calib_Range_Min': 2500,
+         'Pol_Calib_Range_Max': 4000},
+ 'BC1_m45': {'channel_ID': 646,
          'Background_Low': 45000,
          'Background_High': 60000,
          'Laser_Shots': 1501,
          'LR_Input': 1,
          'DAQ_Range': 0,
-         'Pol_Calib_Range_Min': 2000,
-         'Pol_Calib_Range_Max': 3000},
- '00532.s_ph_m45': {'channel_ID': 648,
+         'Pol_Calib_Range_Min': 2500,
+         'Pol_Calib_Range_Max': 4000},
+ 'BC2_m45': {'channel_ID': 648,
          'Background_Low': 45000,
          'Background_High': 60000,
          'Laser_Shots': 1501,
          'LR_Input': 1,
          'DAQ_Range': 0,
-         'Pol_Calib_Range_Min': 2000,
-         'Pol_Calib_Range_Max': 3000},
+         'Pol_Calib_Range_Min': 2500,
+         'Pol_Calib_Range_Max': 4000},
          }
          
 """
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/atmospheric_lidar/adam2017_netcdf_parameters_2.py	Thu Oct 05 14:19:37 2017 +0300
@@ -0,0 +1,89 @@
+general_parameters =  \
+{'System': '\'ADAM May 2017\'',
+ 'Call sign': 'is',
+ 'Laser_Pointing_Angle': 0,
+ 'Molecular_Calc': 0,
+ 'Latitude_degrees_north': 45.8,
+ 'Longitude_degrees_east': 8.6,
+ 'Altitude_meter_asl': 209.0}  # This should be float
+
+channel_parameters = \
+{'01064.o_an': {'channel_ID': 917,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'Laser_Shots': 3001,
+         'LR_Input': 1,
+         'DAQ_Range': 100.0,
+         'First_Signal_Rangebin': 9},
+ '00532.p_an': {'channel_ID': 918,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'Laser_Shots': 3001,
+         'LR_Input': 1,
+         'DAQ_Range': 100.0,
+         'First_Signal_Rangebin': 9},
+'00532.p_ph': {'channel_ID': 919,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'Laser_Shots': 3001,
+         'LR_Input': 1,
+         'DAQ_Range': 0,
+         'First_Signal_Rangebin': 0},
+ '00532.s_an': {'channel_ID': 920,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'Laser_Shots': 3001,
+         'LR_Input': 1,
+         'DAQ_Range': 100.0,
+         'First_Signal_Rangebin': 9},
+ '00532.s_ph': {'channel_ID': 921,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'Laser_Shots': 3001,
+         'LR_Input': 1,
+         'DAQ_Range': 0,
+         'First_Signal_Rangebin': 0},
+ '00607.o_an': {'channel_ID': 922,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'Laser_Shots': 3001,
+         'LR_Input': 1,
+         'DAQ_Range': 100.0,
+         'First_Signal_Rangebin': 9},
+ '00607.o_ph': {'channel_ID': 923,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'Laser_Shots': 3001,
+         'LR_Input':1,
+         'DAQ_Range':100.0,
+         'First_Signal_Rangebin': 0},
+ '00355.o_an': {'channel_ID': 924,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'Laser_Shots': 3001,
+         'LR_Input': 1,
+         'DAQ_Range': 100.0,
+         'First_Signal_Rangebin': 8},
+ '00355.o_ph': {'channel_ID': 925,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'Laser_Shots': 3001,
+         'LR_Input': 1,
+         'DAQ_Range': 0,
+         'First_Signal_Rangebin': 0},
+ '00387.o_an': {'channel_ID': 926,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'Laser_Shots': 3001,
+         'LR_Input': 1,
+         'DAQ_Range': 100.0,
+         'First_Signal_Rangebin': 9},
+ '00387.o_ph': {'channel_ID': 927,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'Laser_Shots': 3001,
+         'LR_Input': 1,
+         'DAQ_Range': 0,
+         'First_Signal_Rangebin': 0},
+}
+
--- a/atmospheric_lidar/generic.py	Fri Sep 22 15:02:53 2017 +0300
+++ b/atmospheric_lidar/generic.py	Thu Oct 05 14:19:37 2017 +0300
@@ -628,13 +628,14 @@
         prof = np.mean(self.matrix, axis=0)
         return prof
 
-    def plot(self, signal_type='rc', filename=None, zoom=[0, 12000, 0, -1], show_plot=True, cmap=plt.cm.jet, z0=None,
+    def plot(self, figsize=(8, 4), signal_type='rc', zoom=[0, 12000, 0, -1], show_plot=True, cmap=plt.cm.jet, z0=None,
              title=None, vmin=0, vmax=1.3 * 10 ** 7):
         # if filename is not None:
         #    matplotlib.use('Agg')
 
-        fig = plt.figure()
+        fig = plt.figure(figsize=figsize)
         ax1 = fig.add_subplot(111)
+
         self.draw_plot(ax1, cmap=cmap, signal_type=signal_type, zoom=zoom, z0=z0, vmin=vmin, vmax=vmax)
 
         if title:
@@ -642,13 +643,8 @@
         else:
             ax1.set_title("%s signal - %s" % (signal_type.upper(), self.name))
 
-        if filename is not None:
-            pass
-            # plt.savefig(filename)
-        else:
-            if show_plot:
-                plt.show()
-                # plt.close() ???
+        if show_plot:
+            plt.show()
 
     def draw_plot(self, ax1, cmap=plt.cm.jet, signal_type='rc',
                   zoom=[0, 12000, 0, -1], z0=None,

mercurial