# HG changeset patch # User Iannis # Date 1543436848 -7200 # Node ID 9fed2446a59f038ebba7ff1c339d193037b37ff0 # Parent 0604a628fb1e4b106e2d2ae2ac9505b5e3f146d5 First attempt for python 3 compatibility. diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/__init__.py --- a/atmospheric_lidar/__init__.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/__init__.py Wed Nov 28 22:27:28 2018 +0200 @@ -1,1 +1,1 @@ -__version__ = '0.3.6' \ No newline at end of file +__version__ = '0.4.0' \ No newline at end of file diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/diva.py --- a/atmospheric_lidar/diva.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/diva.py Wed Nov 28 22:27:28 2018 +0200 @@ -108,10 +108,10 @@ pressure.standard_name = 'air_pressure' # Create a separate group for each channel - for channel_name, channel_parameters in channels.iteritems(): + for channel_name, channel_parameters in channels.items(): - if channel_name not in self.channels.keys(): - raise ValueError('Channel name not one of {0}: {1}'.format(self.channels.keys(), channel_name)) + if channel_name not in list(self.channels.keys()): + raise ValueError('Channel name not one of {0}: {1}'.format(list(self.channels.keys()), channel_name)) channel = self.channels[channel_name] @@ -328,8 +328,8 @@ 'non-paralyzable': 1, 'other': 2} - if model_str not in choices.keys(): - raise ValueError('Dead-time model is not one of {0}: {1}'.format(choices.keys(), model_str)) + if model_str not in list(choices.keys()): + raise ValueError('Dead-time model is not one of {0}: {1}'.format(list(choices.keys()), model_str)) return choices[model_str] @@ -350,8 +350,8 @@ 'circular': 1, 'total': 2} - if pol_str not in choices.keys(): - raise ValueError('Detection polarization is not one of {0}: {1}'.format(choices.keys(), pol_str)) + if pol_str not in list(choices.keys()): + raise ValueError('Detection polarization is not one of {0}: {1}'.format(list(choices.keys()), pol_str)) return choices[pol_str] @@ -371,8 +371,8 @@ choices = {'analog': 0, 'photon-counting': 1,} - if mode_str not in choices.keys(): - raise ValueError('Detection mode is not one of {0}: {1}'.format(choices.keys(), mode_str)) + if mode_str not in list(choices.keys()): + raise ValueError('Detection mode is not one of {0}: {1}'.format(list(choices.keys()), mode_str)) return choices[mode_str] @@ -392,8 +392,8 @@ choices = {'PMT': 0, 'APD': 1,} - if type_string not in choices.keys(): - raise ValueError('Detector type is not one of {0}: {1}'.format(choices.keys(), type_string)) + if type_string not in list(choices.keys()): + raise ValueError('Detector type is not one of {0}: {1}'.format(list(choices.keys()), type_string)) return choices[type_string] @@ -414,8 +414,8 @@ 'circular': 1, 'none': 2} - if pol_string not in choices.keys(): - raise ValueError('Emission polarization not one of {0}: {1}'.format(choices.keys(), pol_string)) + if pol_string not in list(choices.keys()): + raise ValueError('Emission polarization not one of {0}: {1}'.format(list(choices.keys()), pol_string)) return choices[pol_string] @@ -480,7 +480,7 @@ self.air_pressure_hpa = ancillary.variable['air_pressure'][:] self.available_channels = [] - for group_name, group in input_file.groups.items(): + for group_name, group in list(input_file.groups.items()): channel_name = group_name[8:] # Remove 'channel_' prefix self.available_channels.append(channel_name) diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/generic.py --- a/atmospheric_lidar/generic.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/generic.py Wed Nov 28 22:27:28 2018 +0200 @@ -117,7 +117,7 @@ channel_timescales = {} timescale_channels = dict((ts, []) for ts in time_scales) for (channel_name, current_time_scale) in zip(channel_names, all_time_scales): - for (ts, n) in zip(time_scales, range(len(time_scales))): + for (ts, n) in zip(time_scales, list(range(len(time_scales)))): if current_time_scale == ts: channel_timescales[channel_name] = n timescale_channels[ts].append(channel_name) @@ -186,12 +186,12 @@ if self.extra_netcdf_parameters is None: raise RuntimeError("Extra netCDF parameters not defined, cannot subset measurement.") - scc_channels = self.extra_netcdf_parameters.channel_parameters.keys() - common_channels = list(set(scc_channels).intersection(self.channels.keys())) + scc_channels = list(self.extra_netcdf_parameters.channel_parameters.keys()) + common_channels = list(set(scc_channels).intersection(list(self.channels.keys()))) if not common_channels: logger.debug("Config channels: %s." % ','.join(scc_channels)) - logger.debug("Measurement channels: %s." % ','.join(self.channels.keys())) + logger.debug("Measurement channels: %s." % ','.join(list(self.channels.keys()))) raise ValueError('No common channels between measurement and configuration files.') return self.subset_by_channels(common_channels) @@ -220,7 +220,7 @@ raise ValueError('The time interval specified is not part of the measurement') m = self.__class__() # Create an object of the same type as this one. - for (channel_name, channel) in self.channels.items(): + for channel_name, channel in self.channels.items(): m.channels[channel_name] = channel.subset_by_time(start_time, stop_time) m.update() @@ -250,7 +250,7 @@ """ m = self.__class__() # Create an object of the same type as this one. - for (channel_name, channel) in self.channels.items(): + for channel_name, channel in self.channels.items(): m.channels[channel_name] = channel.subset_by_bins(b_min, b_max) m.update() @@ -274,7 +274,7 @@ suffix : str The suffix to add to channel names. """ - channel_names = self.channels.keys() + channel_names = list(self.channels.keys()) for channel_name in channel_names: new_name = prefix + channel_name + suffix @@ -304,11 +304,11 @@ if not self.dark_measurement: raise IOError('No dark measurements have been imported yet.') - for (channel_name, dark_channel) in self.dark_measurement.channels.iteritems(): + for (channel_name, dark_channel) in self.dark_measurement.channels.items(): dark_profile = dark_channel.average_profile() channel = self.channels[channel_name] - for measurement_time, data in channel.data.iteritems(): + for measurement_time, data in channel.data.items(): channel.data[measurement_time] = data - dark_profile channel.update() @@ -389,7 +389,7 @@ 'Longitude_degrees_east': None, 'Altitude_meter_asl': None,} - channel_names = self.channels.keys() + channel_names = list(self.channels.keys()) input_values = dict(self.dimensions, **self.variables) @@ -416,19 +416,19 @@ with netcdf.Dataset(filename, 'w', format=NETCDF_FORMAT) as f: # Create the dimensions in the file - for (d, v) in dimensions.iteritems(): + for (d, v) in dimensions.items(): v = input_values.pop(d, v) f.createDimension(d, v) # Create global attributes - for (attrib, value) in global_attributes.iteritems(): + for (attrib, value) in global_attributes.items(): val = input_values.pop(attrib, value) if val: setattr(f, attrib, val) # Variables # Write either channel_id or string_channel_id in the file - first_channel_keys = parameters.channel_parameters.items()[0][1].keys() + first_channel_keys = list(parameters.channel_parameters.items())[0][1].keys() if "channel_ID" in first_channel_keys: channel_var = 'channel_ID' variable_type = 'i' @@ -462,7 +462,7 @@ continue if variable_name not in channel_variable_specs.keys(): - logger.warning("Provided variable {0} is not parts of the specs: {1}".format(variable_name, channel_variable_specs.keys())) + logger.warning("Provided variable {0} is not parts of the specs: {1}".format(variable_name, list(channel_variable_specs.keys()))) continue temp_v = f.createVariable(variable_name, @@ -477,7 +477,7 @@ # Write the id_timescale values temp_id_timescale = f.createVariable('id_timescale', 'i', ('channels',)) - for (channel, n) in zip(channel_names, range(len(channel_names))): + for (channel, n) in zip(channel_names, list(range(len(channel_names)))): temp_id_timescale[n] = self.variables['id_timescale'][channel] # Laser pointing angle @@ -491,7 +491,7 @@ # Laser pointing angles of profiles temp_v = f.createVariable('Laser_Pointing_Angle_of_Profiles', 'i', ('time', 'nb_of_time_scales')) for (time_scale, n) in zip(self.variables['Raw_Data_Start_Time'], - range(len(self.variables['Raw_Data_Start_Time']))): + list(range(len(self.variables['Raw_Data_Start_Time'])))): temp_v[:len(time_scale), n] = 0 # The lidar has only one laser pointing angle # Raw data start/stop time @@ -499,7 +499,7 @@ temp_raw_stop = f.createVariable('Raw_Data_Stop_Time', 'i', ('time', 'nb_of_time_scales')) for (start_time, stop_time, n) in zip(self.variables['Raw_Data_Start_Time'], self.variables['Raw_Data_Stop_Time'], - range(len(self.variables['Raw_Data_Start_Time']))): + list(range(len(self.variables['Raw_Data_Start_Time'])))): temp_raw_start[:len(start_time), n] = start_time temp_raw_stop[:len(stop_time), n] = stop_time @@ -509,7 +509,7 @@ logger.warning("Provided values of \"Laser_Shots\" were ignored because they were read from other source.") else: temp_v = f.createVariable('Laser_Shots', 'i', ('time', 'channels')) - for (channel, n) in zip(channel_names, range(len(channel_names))): + for (channel, n) in zip(channel_names, list(range(len(channel_names)))): time_length = len(self.variables['Raw_Data_Start_Time'][self.variables['id_timescale'][channel]]) # Array slicing stopped working as usual ex. temp_v[:10] = 100 does not work. ??? np.ones was added. temp_v[:time_length, n] = np.ones(time_length) * parameters.channel_parameters[channel][ @@ -522,7 +522,7 @@ # Raw lidar data temp_v = f.createVariable('Raw_Lidar_Data', 'd', ('time', 'channels', 'points')) - for (channel, n) in zip(channel_names, range(len(channel_names))): + for (channel, n) in zip(channel_names, list(range(len(channel_names)))): c = self.channels[channel] temp_v[:len(c.time), n, :c.points] = c.matrix @@ -564,11 +564,11 @@ # When looking for channel parameters, ignore the following parameter names: ignore = {'channel_ID', 'channel_string_ID', 'Depolarization_Factor', 'Laser_Shots'} # Set - channels = self.channels.keys() + channels = list(self.channels.keys()) channel_parameters = self.extra_netcdf_parameters.channel_parameters # Get all the provided parameters (both mandatory and optional): - all_provided_variables = [channel_parameters[channel].keys() for channel in channels] + all_provided_variables = [list(channel_parameters[channel].keys()) for channel in channels] provided_variables = set(itertools.chain.from_iterable(all_provided_variables)) # Discard certain parameter names: @@ -607,7 +607,7 @@ # Save the dark measurement data temp_v = f.createVariable('Background_Profile', 'd', ('time_bck', 'channels', 'points')) - for (channel, n) in zip(channels, range(len(channels))): + for (channel, n) in zip(channels, list(range(len(channels)))): c = dark_measurement.channels[channel] temp_v[:len(c.time), n, :c.points] = c.matrix @@ -616,7 +616,7 @@ temp_raw_stop = f.createVariable('Raw_Bck_Stop_Time', 'i', ('time_bck', 'nb_of_time_scales')) for (start_time, stop_time, n) in zip(dark_measurement.variables['Raw_Data_Start_Time'], dark_measurement.variables['Raw_Data_Stop_Time'], - range(len(dark_measurement.variables['Raw_Data_Start_Time']))): + list(range(len(dark_measurement.variables['Raw_Data_Start_Time'])))): temp_raw_start[:len(start_time), n] = start_time temp_raw_stop[:len(stop_time), n] = stop_time @@ -736,8 +736,8 @@ self.start_time = min(self.data.keys()) self.stop_time = max(self.data.keys()) + datetime.timedelta(seconds=self.duration[-1]) self.time = tuple(sorted(self.data.keys())) - sorted_data = sorted(self.data.iteritems(), key=itemgetter(0)) - self.matrix = np.array(map(itemgetter(1), sorted_data)) + sorted_data = sorted(iter(self.data.items()), key=itemgetter(0)) + self.matrix = np.array(list(map(itemgetter(1), sorted_data))) def _nearest_datetime(self, input_time): """ @@ -839,7 +839,7 @@ parameters_values = {'name': self.wavelength, 'binwidth': self.binwidth, 'data': subset_data[ - subset_data.keys()[0]], } # We just need any array with the correct length + list(subset_data.keys())[0]], } # We just need any array with the correct length c = LidarChannel(parameters_values) c.data = subset_data diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/licel.py --- a/atmospheric_lidar/licel.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/licel.py Wed Nov 28 22:27:28 2018 +0200 @@ -313,10 +313,10 @@ def _calculate_physical(self): """ Calculate physical quantities from raw data for all channels in the file. """ - for channel in self.channels.itervalues(): + for channel in self.channels.values(): channel.calculate_physical() - for photodiode in self.photodiodes.itervalues(): + for photodiode in self.photodiodes.values(): photodiode.calculate_physical() def duration(self): @@ -345,7 +345,7 @@ logging.debug("List 1: %s" % list1) logging.debug("List 2: %s" % list2) - combined = zip(list2, list1) + combined = list(zip(list2, list1)) combined = dict(combined) return combined @@ -416,7 +416,7 @@ return "" % self.name def __str__(self): - return unicode(self).encode('utf-8') + return str(self).encode('utf-8') class PhotodiodeChannel(LicelChannel): @@ -494,7 +494,7 @@ """ if len(raw_start_in_seconds) == 1: # If only one file imported - duration = self.durations.itervalues().next() # Get the first (and only) raw_info + duration = next(iter(self.durations.values())) # Get the first (and only) raw_info duration_sec = duration else: duration_sec = np.diff(raw_start_in_seconds)[0] diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/licel_depol.py --- a/atmospheric_lidar/licel_depol.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/licel_depol.py Wed Nov 28 22:27:28 2018 +0200 @@ -2,7 +2,7 @@ import numpy as np -from licel import LicelLidarMeasurement +from .licel import LicelLidarMeasurement logger = logging.getLogger(__name__) @@ -131,7 +131,7 @@ """ duration = self.info['duration'] for channel_name, channel in self.channels.items(): - base_time = channel.data.keys()[0] + base_time = list(channel.data.keys())[0] base_data = channel.data[base_time] for n in range(no_profiles): diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/scripts/licel2tc.py --- a/atmospheric_lidar/scripts/licel2tc.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/scripts/licel2tc.py Wed Nov 28 22:27:28 2018 +0200 @@ -72,7 +72,6 @@ if site in self.settings['sectors'].values(): current_file.import_file() # Import full data if current_file.site in self.file_sites.keys(): - self.file_sites[site].append(current_file) else: self.file_sites[site] = [current_file, ] @@ -122,7 +121,7 @@ logger.info('Creating {0} files.'.format(len(self.settings['channels']))) - for channel_id, channel_settings in self.settings['channels'].items(): + for channel_id, channel_settings in list(self.settings['channels'].items()): output_filename = '{call_sign}_tc_{date}_{name}.dat'.format(call_sign=self.settings['call_sign'], date=date.strftime('%Y%m%dT%H'), @@ -172,7 +171,7 @@ first_site = self.settings['sectors'][first_sector] first_file = self.file_sites[first_site][0] - channel_id = self.settings['channels'].keys()[0] + channel_id = list(self.settings['channels'].keys())[0] channel = first_file.channels[channel_id] return first_file.start_time, channel.z diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/systems/adam2016/adam2016_depol.py --- a/atmospheric_lidar/systems/adam2016/adam2016_depol.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/systems/adam2016/adam2016_depol.py Wed Nov 28 22:27:28 2018 +0200 @@ -1,5 +1,5 @@ from ...licel_depol import LicelCalibrationMeasurement -import adam2016_depolarization_parameters +from . import adam2016_depolarization_parameters class ADAM2017CalibrationMeasurement(LicelCalibrationMeasurement): extra_netcdf_parameters = adam2016_depolarization_parameters diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/systems/adam2017/adam2017.py --- a/atmospheric_lidar/systems/adam2017/adam2017.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/systems/adam2017/adam2017.py Wed Nov 28 22:27:28 2018 +0200 @@ -1,6 +1,6 @@ from ...licel import LicelLidarMeasurement -import adam2017_netcdf_parameters +from . import adam2017_netcdf_parameters class ADAM2017LidarMeasurement(LicelLidarMeasurement): extra_netcdf_parameters = adam2017_netcdf_parameters diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/systems/adam2017/adam2017_depol.py --- a/atmospheric_lidar/systems/adam2017/adam2017_depol.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/systems/adam2017/adam2017_depol.py Wed Nov 28 22:27:28 2018 +0200 @@ -1,5 +1,5 @@ from ...licel_depol import LicelCalibrationMeasurement -import adam2017_depolarization_parameters +from . import adam2017_depolarization_parameters class ADAM2017CalibrationMeasurement(LicelCalibrationMeasurement): extra_netcdf_parameters = adam2017_depolarization_parameters diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/systems/eole/eole.py --- a/atmospheric_lidar/systems/eole/eole.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/systems/eole/eole.py Wed Nov 28 22:27:28 2018 +0200 @@ -1,5 +1,5 @@ from ...licel import LicelLidarMeasurement -import eole_netcdf_parameters +from . import eole_netcdf_parameters class EoleLidarMeasurement(LicelLidarMeasurement): diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/systems/ipral/ipral.py --- a/atmospheric_lidar/systems/ipral/ipral.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/systems/ipral/ipral.py Wed Nov 28 22:27:28 2018 +0200 @@ -1,5 +1,5 @@ from ...licel import LicelLidarMeasurement -import ipral_netcdf_parameters +from . import ipral_netcdf_parameters class IpralLidarMeasurement(LicelLidarMeasurement): diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/systems/lamp_lidar/cf_raymetrics.py --- a/atmospheric_lidar/systems/lamp_lidar/cf_raymetrics.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/systems/lamp_lidar/cf_raymetrics.py Wed Nov 28 22:27:28 2018 +0200 @@ -1,6 +1,6 @@ from ...licel import LicelLidarMeasurement -import cf_netcdf_parameters +from . import cf_netcdf_parameters class CfLidarMeasurement(LicelLidarMeasurement): diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/systems/lilas/lilas.py --- a/atmospheric_lidar/systems/lilas/lilas.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/systems/lilas/lilas.py Wed Nov 28 22:27:28 2018 +0200 @@ -1,5 +1,5 @@ from ...licel import LicelLidarMeasurement -import lilas_netcdf_parameters +from . import lilas_netcdf_parameters class LilasLidarMeasurement(LicelLidarMeasurement): diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/systems/pearl/pearl.py --- a/atmospheric_lidar/systems/pearl/pearl.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/systems/pearl/pearl.py Wed Nov 28 22:27:28 2018 +0200 @@ -7,7 +7,7 @@ from ...generic import BaseLidarMeasurement, LidarChannel from ..ciao import CiaoMixin -import pearl_netcdf_parameters +from . import pearl_netcdf_parameters from report_file import Report_file @@ -22,12 +22,12 @@ ''' Import a pearl file. ''' if filename in self.files: - print "File has been imported already:" + filename + print("File has been imported already:" + filename) else: parameters, channels_dict = self.read_pearl_data(filename) start_time = self._get_time(parameters['Acq_date'], parameters['Acq_start_time']) - for channel_info in channels_dict.itervalues(): + for channel_info in channels_dict.values(): if channel_info['name'] == '1064ALR': name = '1064' @@ -67,7 +67,7 @@ len = 20*p['Channel_no'] s = f.read(len) channels = {} - for (c1,n) in zip(range(0,len, 20),range(p['Channel_no'])): + for (c1,n) in zip(list(range(0,len, 20)),list(range(p['Channel_no']))): channels[str(n)] = {'name' : s[c1+10:c1+20].strip(), 'binwidth' : s[c1:c1+10].strip()} @@ -75,7 +75,7 @@ data = np.fromfile(f,dtype = np.float32) #print filename + ': ' + str(data.size) +',' + str(p['Point_no']) +str(p['Channel_no']) data = data.reshape(p['Point_no'],p['Channel_no']) - for ch in channels.iterkeys(): + for ch in channels.keys(): channels[ch]['data'] = data[:,int(ch)] #Close the file f.close() diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/systems/rali/rali.py --- a/atmospheric_lidar/systems/rali/rali.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/systems/rali/rali.py Wed Nov 28 22:27:28 2018 +0200 @@ -1,6 +1,6 @@ from ...licel import LicelLidarMeasurement -import rali_netcdf_parameters +from . import rali_netcdf_parameters class RaliLidarMeasurement(LicelLidarMeasurement): diff -r 0604a628fb1e -r 9fed2446a59f atmospheric_lidar/systems/rali/rali_depol.py --- a/atmospheric_lidar/systems/rali/rali_depol.py Fri Nov 02 16:24:47 2018 +0200 +++ b/atmospheric_lidar/systems/rali/rali_depol.py Wed Nov 28 22:27:28 2018 +0200 @@ -1,5 +1,5 @@ from ...licel_depol import LicelCalibrationMeasurement -import rali_depolarization_parameters +from . import rali_depolarization_parameters class RALICalibrationMeasurement(LicelCalibrationMeasurement): extra_netcdf_parameters = rali_depolarization_parameters diff -r 0604a628fb1e -r 9fed2446a59f docs/conf.py --- a/docs/conf.py Fri Nov 02 16:24:47 2018 +0200 +++ b/docs/conf.py Wed Nov 28 22:27:28 2018 +0200 @@ -70,18 +70,18 @@ master_doc = 'index' # General information about the project. -project = u'Atmospheric lidar' -copyright = u'2017, Ioannis Binietoglou, Victor Nicolae' -author = u'Ioannis Binietoglou, Victor Nicolae' +project = 'Atmospheric lidar' +copyright = '2017, Ioannis Binietoglou, Victor Nicolae' +author = 'Ioannis Binietoglou, Victor Nicolae' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = u'0.2.11' +version = '0.2.11' # The full version, including alpha/beta/rc tags. -release = u'0.2.11' +release = '0.2.11' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -164,8 +164,8 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'Atmosphericlidar.tex', u'Atmospheric lidar Documentation', - u'Ioannis Binietoglou, Victor Nicolae', 'manual'), + (master_doc, 'Atmosphericlidar.tex', 'Atmospheric lidar Documentation', + 'Ioannis Binietoglou, Victor Nicolae', 'manual'), ] @@ -174,7 +174,7 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'atmosphericlidar', u'Atmospheric lidar Documentation', + (master_doc, 'atmosphericlidar', 'Atmospheric lidar Documentation', [author], 1) ] @@ -185,7 +185,7 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'Atmosphericlidar', u'Atmospheric lidar Documentation', + (master_doc, 'Atmosphericlidar', 'Atmospheric lidar Documentation', author, 'Atmosphericlidar', 'One line description of project.', 'Miscellaneous'), ] diff -r 0604a628fb1e -r 9fed2446a59f example_scripts/convert_ipral.py --- a/example_scripts/convert_ipral.py Fri Nov 02 16:24:47 2018 +0200 +++ b/example_scripts/convert_ipral.py Wed Nov 28 22:27:28 2018 +0200 @@ -62,13 +62,13 @@ if files: # Read the files - print "Reading {0} files from {1}".format(len(files), args.directory) + print("Reading {0} files from {1}".format(len(files), args.directory)) measurement = ipral.IpralLidarMeasurement(files) #Save the netcdf - print "Saving netcdf." + print("Saving netcdf.") measurement.set_measurement_id(args.measurement_id, args.measurement_number) measurement.save_as_SCC_netcdf() - print "Created file ", measurement.scc_filename + print("Created file ", measurement.scc_filename) else: - print "No files found when searching for ", search_str \ No newline at end of file + print("No files found when searching for ", search_str) \ No newline at end of file diff -r 0604a628fb1e -r 9fed2446a59f example_scripts/convert_lilas.py --- a/example_scripts/convert_lilas.py Fri Nov 02 16:24:47 2018 +0200 +++ b/example_scripts/convert_lilas.py Wed Nov 28 22:27:28 2018 +0200 @@ -62,13 +62,13 @@ if files: # Read the files - print "Reading {0} files from {1}".format(len(files), args.directory) + print("Reading {0} files from {1}".format(len(files), args.directory)) measurement = lilas.LilasLidarMeasurement(files) #Save the netcdf - print "Saving netcdf." + print("Saving netcdf.") measurement.set_measurement_id(args.measurement_id, args.measurement_number) measurement.save_as_SCC_netcdf() - print "Created file ", measurement.scc_filename + print("Created file ", measurement.scc_filename) else: - print "No files found when searching for ", search_str \ No newline at end of file + print("No files found when searching for ", search_str) \ No newline at end of file diff -r 0604a628fb1e -r 9fed2446a59f setup.py --- a/setup.py Fri Nov 02 16:24:47 2018 +0200 +++ b/setup.py Wed Nov 28 22:27:28 2018 +0200 @@ -43,6 +43,7 @@ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 3', 'Intended Audience :: Science/Research', 'Topic :: Scientific/Engineering :: Atmospheric Science', ],