Merge branch 'master' of gitlab_iannis:ioannis_binietoglou/atmospheric-lidar

Mon, 25 Jan 2021 23:34:21 +0200

author
Ioannis <ibinietoglou@raymetrics.com>
date
Mon, 25 Jan 2021 23:34:21 +0200
changeset 209
f3bec37bfcd0
parent 206
dfe6a8c99195 (diff)
parent 208
686c1525ce36 (current diff)
child 210
b08b40c62027

Merge branch 'master' of gitlab_iannis:ioannis_binietoglou/atmospheric-lidar

atmospheric_lidar/raymetrics.py file | annotate | diff | comparison | revisions
--- a/atmospheric_lidar/__init__.py	Thu Nov 19 10:23:32 2020 +0000
+++ b/atmospheric_lidar/__init__.py	Mon Jan 25 23:34:21 2021 +0200
@@ -1,1 +1,1 @@
-__version__ = '0.5.2'
\ No newline at end of file
+__version__ = '0.5.3'
\ No newline at end of file
--- a/atmospheric_lidar/raymetrics.py	Thu Nov 19 10:23:32 2020 +0000
+++ b/atmospheric_lidar/raymetrics.py	Mon Jan 25 23:34:21 2021 +0200
@@ -728,6 +728,9 @@
     """ Raymetrics is using a custom version of licel file format to store
     vertical lidar measurements.
 
+    `azimuth_angle`
+        The angle from North
+
     `temperature`
         Ambient temperature (degrees C)
 
@@ -742,13 +745,27 @@
 
     fix_zenith_angle = True
 
+    def __init__(self, file_path, use_id_as_name=False, get_name_by_order=False, licel_timezone="UTC", import_now=True, azimuth_offset=0):
+        self.azimuth_offset = azimuth_offset
+
+        super().__init__(file_path, use_id_as_name=use_id_as_name, get_name_by_order=get_name_by_order,
+                         licel_timezone=licel_timezone, import_now=import_now)
+
     def _assign_properties(self):
         """ Assign scanning-specific parameters found in the header as object properties."""
         super(FixedPointingFile, self)._assign_properties()
 
         self.temperature = float(self.raw_info['temperature'])
         self.pressure = float(self.raw_info['pressure'])
-        self.azimuth_angle = float(self.raw_info['azimuth_angle'])
+        self.azimuth_angle_raw = float(self.raw_info['azimuth_angle'])
+
+        azimuth_offset = getattr(self, 'azimuth_offset', None)
+
+        # Add a option to manually define an azimuth offset, but still work if you don't
+        if azimuth_offset is not None:
+            self.azimuth_angle = (self.azimuth_angle_raw + azimuth_offset) % 360
+        else:
+            self.azimuth_angle = self.azimuth_angle_raw
 
         try:
             self.custom_info = self.raw_info['custom_info'].strip('"')
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/atmospheric_lidar/systems/kit/kit_depolarization_parameters.py	Mon Jan 25 23:34:21 2021 +0200
@@ -0,0 +1,57 @@
+general_parameters =  \
+{'System': '\'KASCAL\'',
+ 'Laser_Pointing_Angle': 0,
+ 'Molecular_Calc': 0,
+ 'Call sign': 'imk', }
+
+channel_parameters = \
+{'BT0_p45': {'channel_ID': 1567,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'LR_Input': 1,
+         'Pol_Calib_Range_Min': 1000,
+         'Pol_Calib_Range_Max': 3000},
+ 'BC0_p45': {'channel_ID': 1568,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'LR_Input': 1,
+         'Pol_Calib_Range_Min': 1000,
+         'Pol_Calib_Range_Max': 3000},
+ 'BT1_p45': {'channel_ID': 1569,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'LR_Input': 1,
+         'Pol_Calib_Range_Min': 1000,
+         'Pol_Calib_Range_Max': 3000},
+ 'BC1_p45': {'channel_ID': 1570,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'LR_Input': 1,
+         'Pol_Calib_Range_Min': 1000,
+         'Pol_Calib_Range_Max': 3000},
+ 'BT0_m45': {'channel_ID': 1571,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'LR_Input': 1,
+         'Pol_Calib_Range_Min': 1000,
+         'Pol_Calib_Range_Max': 3000},
+ 'BC0_m45': {'channel_ID': 1572,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'LR_Input': 1,
+         'Pol_Calib_Range_Min': 1000,
+         'Pol_Calib_Range_Max': 3000},
+ 'BT1_m45': {'channel_ID': 1573,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'LR_Input': 1,
+         'Pol_Calib_Range_Min': 1000,
+         'Pol_Calib_Range_Max': 3000},
+ 'BC1_m45': {'channel_ID': 1574,
+         'Background_Low': 50000,
+         'Background_High': 60000,
+         'LR_Input': 1,
+         'Pol_Calib_Range_Min': 1000,
+         'Pol_Calib_Range_Max': 3000},
+         }
+

mercurial