55 Ambient pressure (hPa) |
55 Ambient pressure (hPa) |
56 """ |
56 """ |
57 |
57 |
58 # Specifications of the header lines. |
58 # Specifications of the header lines. |
59 licel_file_header_format = ['filename', |
59 licel_file_header_format = ['filename', |
60 'start_date start_time end_date end_time altitude longitude latitude zenith_angle azimuth_angle temperature pressure', |
60 'start_date start_time end_date end_time altitude longitude latitude zenith_angle azimuth_angle temperature pressure custom_info', |
61 # Appart from Site that is read manually |
61 # Appart from Site that is read manually |
62 'azimuth_start azimuth_stop azimuth_step zenith_start zenith_stop zenith_step azimuth_offset', |
62 'azimuth_start azimuth_stop azimuth_step zenith_start zenith_stop zenith_step azimuth_offset', |
63 'LS1 rate_1 LS2 rate_2 number_of_datasets', ] |
63 'LS1 rate_1 LS2 rate_2 number_of_datasets', ] |
64 |
64 |
65 # Specifications of the channel lines in the header |
65 # Specifications of the channel lines in the header |
129 self.zenith_start = self._correct_zenith_angle(self.zenith_start_raw) |
129 self.zenith_start = self._correct_zenith_angle(self.zenith_start_raw) |
130 self.zenith_stop = self._correct_zenith_angle(self.zenith_stop_raw) |
130 self.zenith_stop = self._correct_zenith_angle(self.zenith_stop_raw) |
131 else: |
131 else: |
132 self.zenith_start = self.zenith_start_raw |
132 self.zenith_start = self.zenith_start_raw |
133 self.zenith_stop = self.zenith_stop_raw |
133 self.zenith_stop = self.zenith_stop_raw |
|
134 |
|
135 try: |
|
136 self.custom_info = self.raw_info['custom_info'].strip('"') |
|
137 except KeyError: |
|
138 self.custom_info = None |
134 |
139 |
135 def get_coordinates(self, channel_name): |
140 def get_coordinates(self, channel_name): |
136 """ |
141 """ |
137 Calculate the lat, lon, z coordinates for each measurement point. |
142 Calculate the lat, lon, z coordinates for each measurement point. |
138 |
143 |
732 `pressure` |
737 `pressure` |
733 Ambient pressure (hPa) |
738 Ambient pressure (hPa) |
734 """ |
739 """ |
735 # Specifications of the header lines. |
740 # Specifications of the header lines. |
736 licel_file_header_format = ['filename', |
741 licel_file_header_format = ['filename', |
737 'start_date start_time end_date end_time altitude longitude latitude zenith_angle azimuth_angle temperature pressure', |
742 'start_date start_time end_date end_time altitude longitude latitude zenith_angle azimuth_angle temperature pressure custom_info', |
738 # Appart from Site that is read manually |
743 # Appart from Site that is read manually |
739 'LS1 rate_1 LS2 rate_2 number_of_datasets', ] |
744 'LS1 rate_1 LS2 rate_2 number_of_datasets', ] |
740 |
745 |
741 fix_zenith_angle = True |
746 fix_zenith_angle = True |
742 |
747 |
759 # Add a option to manually define an azimuth offset, but still work if you don't |
764 # Add a option to manually define an azimuth offset, but still work if you don't |
760 if azimuth_offset is not None: |
765 if azimuth_offset is not None: |
761 self.azimuth_angle = (self.azimuth_angle_raw + azimuth_offset) % 360 |
766 self.azimuth_angle = (self.azimuth_angle_raw + azimuth_offset) % 360 |
762 else: |
767 else: |
763 self.azimuth_angle = self.azimuth_angle_raw |
768 self.azimuth_angle = self.azimuth_angle_raw |
|
769 |
|
770 try: |
|
771 self.custom_info = self.raw_info['custom_info'].strip('"') |
|
772 except KeyError: |
|
773 self.custom_info = None |
764 |
774 |
765 |
775 |
766 class FixedPointingChannel(LicelChannel): |
776 class FixedPointingChannel(LicelChannel): |
767 """ A class representing measurements of a specific lidar channel, during a fixed pointing measurement. """ |
777 """ A class representing measurements of a specific lidar channel, during a fixed pointing measurement. """ |
768 |
778 |