Added support for fixed point measuremtns of scanning files.

Fri, 31 May 2019 14:52:42 +0300

author
Iannis <i.binietoglou@impworks.gr>
date
Fri, 31 May 2019 14:52:42 +0300
changeset 178
804313c093a8
parent 177
580821c7487c
child 179
26551701d013

Added support for fixed point measuremtns of scanning files.

atmospheric_lidar/raymetrics.py file | annotate | diff | comparison | revisions
--- a/atmospheric_lidar/raymetrics.py	Thu Jan 10 17:16:39 2019 +0200
+++ b/atmospheric_lidar/raymetrics.py	Fri May 31 14:52:42 2019 +0300
@@ -598,7 +598,7 @@
     photodiode_class = PhotodiodeChannel
 
 
-class VerticalFile(LicelFile):
+class FixedPointingFile(LicelFile):
     """ Raymetrics is using a custom version of licel file format to store
     vertical lidar measurements.
 
@@ -614,6 +614,35 @@
                                 # Appart from Site that is read manually
                                 'LS1 rate_1 LS2 rate_2 number_of_datasets', ]
 
+    fix_zenith_angle = True
 
-class VerticalLidarMeasurement(LicelLidarMeasurement):
-    file_class = VerticalFile
+    def _assign_properties(self):
+        """ Assign scanning-specific parameters found in the header as object properties."""
+        super(FixedPointingFile, self)._assign_properties()
+        self.azimuth_angle = float(self.raw_info['azimuth_angle'])
+        self.temperature = float(self.raw_info['temperature'])
+        self.pressure = float(self.raw_info['pressure'])
+
+
+class FixedPointingChannel(LicelChannel):
+    """ A class representing measurements of a specific lidar channel, during a fixed pointing measurement. """
+
+    def __init__(self):
+        super(FixedPointingChannel, self).__init__()
+        self.zenith_angles = []
+        self.azimuth_angles = []
+        self.temperature = []
+        self.pressure = []
+
+    def append_file(self, current_file, file_channel):
+        """ Keep track of scanning-specific variable properties of each file. """
+        super(FixedPointingChannel, self).append_file(current_file, file_channel)
+        self.zenith_angles.append(current_file.zenith_angle)
+        self.azimuth_angles.append(current_file.azimuth_angle)
+        self.temperature.append(current_file.temperature)
+        self.pressure.append(current_file.pressure)
+
+
+class FixedPointingLidarMeasurement(LicelLidarMeasurement):
+    file_class = FixedPointingFile
+    channel_class = FixedPointingChannel
\ No newline at end of file

mercurial