Bug fixes in reading LicelLidarMeasurements.

Sun, 23 Feb 2020 16:05:22 +0200

author
Iannis B <ioannis@inoe.ro>
date
Sun, 23 Feb 2020 16:05:22 +0200
changeset 189
e824878310ed
parent 188
cc55a1378370
child 190
1caf7bff473c

Bug fixes in reading LicelLidarMeasurements.

Use of pcolormehs as default ploting method.

atmospheric_lidar/generic.py file | annotate | diff | comparison | revisions
atmospheric_lidar/licel.py file | annotate | diff | comparison | revisions
--- a/atmospheric_lidar/generic.py	Fri Feb 14 12:40:28 2020 +0200
+++ b/atmospheric_lidar/generic.py	Sun Feb 23 16:05:22 2020 +0200
@@ -949,7 +949,7 @@
         profile = np.mean(self.matrix, axis=0)
         return profile
 
-    def plot(self, figsize=(8, 4), signal_type='rc', zoom=[0, 12000, 0, -1], show_plot=True,
+    def plot(self, figsize=(8, 4), signal_type='rc', zoom=[0, 12000, 0, None], show_plot=True,
              cmap=plt.cm.jet, z0=None, title=None, vmin=0, vmax=1.3 * 10 ** 7):
         """
         Plot of the channel data.
@@ -978,7 +978,7 @@
         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)
+        self.draw_plot_new(ax1, cmap=cmap, signal_type=signal_type, zoom=zoom, z0=z0, vmin=vmin, vmax=vmax)
 
         if title:
             ax1.set_title(title)
@@ -989,7 +989,7 @@
             plt.show()
 
     def draw_plot(self, ax1, cmap=plt.cm.jet, signal_type='rc',
-                  zoom=[0, 12000, 0, -1], z0=None,
+                  zoom=[0, 12000, 0, None], z0=None,
                   add_colorbar=True, cmap_label='a.u.', cb_format=None,
                   vmin=0, vmax=1.3 * 10 ** 7):
         """
@@ -1142,6 +1142,7 @@
         dt = datetime.timedelta(seconds=self.duration[-1])
 
         time_cut = self.time[zoom[2]:zoom[3]]
+
         time_last = time_cut[-1] + dt  # The last element needed for pcolormesh
         time_all = time_cut + (time_last,)
         t_axis = mpl.dates.date2num(time_all)
--- a/atmospheric_lidar/licel.py	Fri Feb 14 12:40:28 2020 +0200
+++ b/atmospheric_lidar/licel.py	Sun Feb 23 16:05:22 2020 +0200
@@ -160,6 +160,12 @@
         return self.analog_photon == '0'
 
 
+    @property
+    def laser_shots(self):
+        """ Alias for number_of_shots """
+        return self.number_of_shots
+
+
 class LicelFile(object):
     """ A class representing a single binary Licel file. """
 

mercurial