Wed, 11 Nov 2020 17:06:29 +0200
Added optional azimuth_offset argument in FixedPointing files.
atmospheric_lidar/raymetrics.py | file | annotate | diff | comparison | revisions | |
atmospheric_lidar/systems/kit/temp/kit_netcdf_parameters.py | file | annotate | diff | comparison | revisions |
--- a/atmospheric_lidar/raymetrics.py Mon Nov 09 09:22:18 2020 +0200 +++ b/atmospheric_lidar/raymetrics.py Wed Nov 11 17:06:29 2020 +0200 @@ -723,6 +723,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) @@ -737,13 +740,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 class FixedPointingChannel(LicelChannel):
--- a/atmospheric_lidar/systems/kit/temp/kit_netcdf_parameters.py Mon Nov 09 09:22:18 2020 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -general_parameters = \ -{'System': '\'KASCAL\'', - 'Laser_Pointing_Angle': 0, - 'Molecular_Calc': 0, - 'Call sign': 'imk', } - -channel_parameters = \ -{'BT0': {'channel_ID': 1561, - 'Background_Low': 50000, - 'Background_High': 60000, - 'LR_Input': 1,}, - 'BC0': {'channel_ID': 1562, - 'Background_Low': 50000, - 'Background_High': 60000, - 'LR_Input': 1,}, - 'BT1': {'channel_ID': 1563, - 'Background_Low': 50000, - 'Background_High': 60000, - 'LR_Input': 1,}, - 'BC1': {'channel_ID': 1564, - 'Background_Low': 50000, - 'Background_High': 60000, - 'LR_Input': 1,}, - 'BT2': {'channel_ID': 1565, - 'Background_Low': 50000, - 'Background_High': 60000, - 'LR_Input': 1,}, - 'BC2': {'channel_ID': 1566, - 'Background_Low': 50000, - 'Background_High': 60000, - 'LR_Input': 1,}, - } -