Merge from 3:a52ac06e9fc4

Tue, 09 Oct 2012 11:13:42 +0200

author
ulalume3 <binietoglou@imaa.cnr.it>
date
Tue, 09 Oct 2012 11:13:42 +0200
changeset 4
7f9450f40b1e
parent 3
42dbb0451ebd (current diff)
parent 2
b11082bfcb4a (diff)
child 5
c13d23a6289c

Merge from 3:a52ac06e9fc4

--- a/licel.py	Tue Oct 09 11:13:18 2012 +0200
+++ b/licel.py	Tue Oct 09 11:13:42 2012 +0200
@@ -30,7 +30,7 @@
         channels = {}
         channel_info = []
 
-        f = open(filename, 'r')
+        f = open(filename, 'rb')
 
         #Read the first 3 lines of the header
         raw_info = {}
@@ -57,6 +57,7 @@
             raw_data = np.fromfile(f, 'l', int(current_channel_info['DataPoints']))
             a = np.fromfile(f, 'b', 1)
             b = np.fromfile(f, 'b', 1)
+
             if (a[0] != 13) | (b[0] != 10):
                 print "Warning: No end of line found after record. File could be corrupt"
             channel = LicelFileChannel(current_channel_info, raw_data)

mercurial