# HG changeset patch # User Iannis # Date 1559303562 -10800 # Node ID 804313c093a8215f4223ebddd12395dde1eaf118 # Parent 580821c7487c2ae3de0da3697caffeeb1ac2e123 Added support for fixed point measuremtns of scanning files. diff -r 580821c7487c -r 804313c093a8 atmospheric_lidar/raymetrics.py --- 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