Merge branch 'gdoxastakis-master-patch-40497' into 'master'

Thu, 19 Nov 2020 10:23:32 +0000

author
Ioannis Binietoglou <ulalume3@gmail.com>
date
Thu, 19 Nov 2020 10:23:32 +0000
changeset 208
686c1525ce36
parent 203
e7a6a5f6caca (current diff)
parent 207
53124a886152 (diff)
child 209
f3bec37bfcd0

Merge branch 'gdoxastakis-master-patch-40497' into 'master'

Added custom_info field support

See merge request ioannis_binietoglou/atmospheric-lidar!1

--- a/atmospheric_lidar/raymetrics.py	Mon Sep 07 17:11:58 2020 +0300
+++ b/atmospheric_lidar/raymetrics.py	Thu Nov 19 10:23:32 2020 +0000
@@ -57,7 +57,7 @@
 
     # Specifications of the header lines.
     licel_file_header_format = ['filename',
-                                'start_date start_time end_date end_time altitude longitude latitude zenith_angle azimuth_angle temperature pressure',
+                                'start_date start_time end_date end_time altitude longitude latitude zenith_angle azimuth_angle temperature pressure custom_info',
                                 # Appart from Site that is read manually
                                 'azimuth_start azimuth_stop azimuth_step zenith_start zenith_stop zenith_step azimuth_offset',
                                 'LS1 rate_1 LS2 rate_2 number_of_datasets', ]
@@ -132,6 +132,11 @@
             self.zenith_start = self.zenith_start_raw
             self.zenith_stop = self.zenith_stop_raw
 
+        try:
+            self.custom_info = self.raw_info['custom_info'].strip('"')
+        except KeyError:
+            self.custom_info = None
+
     def get_coordinates(self, channel_name):
         """
         Calculate the lat, lon, z coordinates for each measurement point.
@@ -731,7 +736,7 @@
     """
     # Specifications of the header lines.
     licel_file_header_format = ['filename',
-                                'start_date start_time end_date end_time altitude longitude latitude zenith_angle azimuth_angle temperature pressure',
+                                'start_date start_time end_date end_time altitude longitude latitude zenith_angle azimuth_angle temperature pressure custom_info',
                                 # Appart from Site that is read manually
                                 'LS1 rate_1 LS2 rate_2 number_of_datasets', ]
 
@@ -745,6 +750,11 @@
         self.pressure = float(self.raw_info['pressure'])
         self.azimuth_angle = float(self.raw_info['azimuth_angle'])
 
+        try:
+            self.custom_info = self.raw_info['custom_info'].strip('"')
+        except KeyError:
+            self.custom_info = None
+
 
 class FixedPointingChannel(LicelChannel):
     """ A class representing measurements of a specific lidar channel, during a fixed pointing measurement. """

mercurial