generic.py

changeset 33
2984158468e6
parent 32
022f6f2bc09c
--- a/generic.py	Wed Apr 01 13:06:08 2015 +0300
+++ b/generic.py	Mon Feb 22 16:39:23 2016 +0200
@@ -26,7 +26,7 @@
     
     """
     
-    def __init__(self, filelist= None):
+    def __init__(self, filelist = None):
         self.info = {}
         self.dimensions = {}
         self.variables =  {}
@@ -34,10 +34,11 @@
         self.attributes = {}
         self.files = []
         self.dark_measurement = None
+        
         if filelist:
             self.import_files(filelist)
         
-    def import_files(self,filelist):
+    def import_files(self, filelist):
         for f in filelist:
             self.import_file(f)
         self.update()
@@ -114,7 +115,7 @@
         self.variables['id_timescale'] = dict(channel_timescales)
     
     def _get_duration(self, raw_start_in_seconds):
-        ''' Return the duration for a given time scale. In some files (ex. Licel) this
+        ''' Return the duration for a given time scale. In some files (e.g. Licel) this
         can be specified from the files themselves. In others this must be guessed.
          
         '''
@@ -414,7 +415,7 @@
         self.binwidth = float(channel_parameters['binwidth'])  # in microseconds
         self.data = {}
         self.resolution = self.binwidth * c / 2
-        self.z = np.arange(len(channel_parameters['data'])) * self.resolution + self.resolution/2.0 # Change: add half bin in the z 
+        self.z = np.arange(len(channel_parameters['data'])) * self.resolution + self.resolution / 2.0 # Change: add half bin in the z 
         self.points = len(channel_parameters['data'])
         self.rc = []
         self.duration  = 60

mercurial