# HG changeset patch # User Iannis # Date 1543523054 -7200 # Node ID 9face926ccab06fca28bd959a38016488ef4dced # Parent eaac8bf97a5e755b3b2973dc7370f0bcdc0b4586 * Python 2 to 3 bug: licel header lines not decoded from bytes. * Fixed wrong number of timescales in SCC depol. diff -r eaac8bf97a5e -r 9face926ccab atmospheric_lidar/__init__.py --- a/atmospheric_lidar/__init__.py Wed Nov 28 22:27:54 2018 +0200 +++ b/atmospheric_lidar/__init__.py Thu Nov 29 22:24:14 2018 +0200 @@ -1,1 +1,1 @@ -__version__ = '0.4.0' \ No newline at end of file +__version__ = '0.4.1' \ No newline at end of file diff -r eaac8bf97a5e -r 9face926ccab atmospheric_lidar/licel.py --- a/atmospheric_lidar/licel.py Wed Nov 28 22:27:54 2018 +0200 +++ b/atmospheric_lidar/licel.py Thu Nov 29 22:24:14 2018 +0200 @@ -240,7 +240,7 @@ channel_info = [] # Read first line - raw_info['Filename'] = f.readline().strip() + raw_info['Filename'] = f.readline().decode().strip() raw_info.update(self._read_second_header_line(f)) @@ -270,7 +270,7 @@ # Read the rest of the header. for c1 in range(int(raw_info['number_of_datasets'])): - channel_info.append(self.match_lines(f.readline(), self.licel_file_channel_format)) + channel_info.append(self.match_lines(f.readline().decode(), self.licel_file_channel_format)) self.raw_info = raw_info self.channel_info = channel_info @@ -289,7 +289,7 @@ """ Read the second line of a licel file. """ raw_info = {} - second_line = f.readline() + second_line = f.readline().decode() # Many Licel files don't follow the licel standard. Specifically, the # measurement site is not always 8 characters, and can include white # spaces. For this, the site name is detect everything before the first @@ -307,7 +307,7 @@ def _read_rest_of_header(self, f): """ Read the rest of the header lines, after line 2. """ # Read third line - third_line = f.readline() + third_line = f.readline().decode() raw_dict = self.match_lines(third_line, self.licel_file_header_format[2]) return raw_dict diff -r eaac8bf97a5e -r 9face926ccab atmospheric_lidar/licel_depol.py --- a/atmospheric_lidar/licel_depol.py Wed Nov 28 22:27:54 2018 +0200 +++ b/atmospheric_lidar/licel_depol.py Thu Nov 29 22:24:14 2018 +0200 @@ -95,6 +95,8 @@ self.variables['Raw_Data_Stop_Time'] = [new_stop_time, ] self.reset_timescale_id() + self.dimensions['nb_of_time_scales'] = 1 + # def _get_custom_global_attributes(self): # """ # NetCDF global attributes that should be included in the final NetCDF file. diff -r eaac8bf97a5e -r 9face926ccab atmospheric_lidar/raymetrics.py --- a/atmospheric_lidar/raymetrics.py Wed Nov 28 22:27:54 2018 +0200 +++ b/atmospheric_lidar/raymetrics.py Thu Nov 29 22:24:14 2018 +0200 @@ -78,10 +78,10 @@ """ raw_info = {} - third_line = f.readline() + third_line = f.readline().decode() raw_info.update(self.match_lines(third_line, self.licel_file_header_format[2])) - fourth_line = f.readline() + fourth_line = f.readline().decode() raw_info.update(self.match_lines(fourth_line, self.licel_file_header_format[3])) return raw_info diff -r eaac8bf97a5e -r 9face926ccab atmospheric_lidar/scripts/licel2scc_depol.py --- a/atmospheric_lidar/scripts/licel2scc_depol.py Wed Nov 28 22:27:54 2018 +0200 +++ b/atmospheric_lidar/scripts/licel2scc_depol.py Thu Nov 29 22:24:14 2018 +0200 @@ -106,6 +106,7 @@ return CustomLidarMeasurement + def read_settings_file(settings_path): """ Read the settings file. diff -r eaac8bf97a5e -r 9face926ccab changelog.rst --- a/changelog.rst Wed Nov 28 22:27:54 2018 +0200 +++ b/changelog.rst Thu Nov 29 22:24:14 2018 +0200 @@ -3,10 +3,17 @@ Unreleased ---------- + +0.4.1 - 2018-11-29 +------------------ +Added +~~~~~ +- Support for Python 3 + Fixed ~~~~~ - Bug in Licel2depol script, wrong handling of dark measurements. - +- Wrong number of timescales in depolarization calibration netcdf files. 0.3.5 - 2018-10-10 ------------------