diff --git a/src/fileio/bds_file_reader.py b/src/fileio/bds_file_reader.py index 4e2d8a9..e755133 100644 --- a/src/fileio/bds_file_reader.py +++ b/src/fileio/bds_file_reader.py @@ -8,13 +8,13 @@ class FileReader: def read_datafile( path ): # TODO analyze file (LF,MF, HF) and act accordingly print "Skipping first 4 lines!" - data = np.loadtxt(path, skiprows=4) + data = np.loadtxt(path, skiprows=4, comments="#") numpat = re.compile('\d+\.\d+') print "successfully read %s"%path try: Temp = None + print "Searching for temperature in %s (any line with 'Fixed or 'Temp', with float, i.e. 273.15K or 273.15)" % path for i,line in enumerate(open(path).readlines()): - print "Searching for temperature in %s (Line with 'Fixed or 'Temp', with float, i.e. 273.15K or 273.15)"%path if re.search("Fixed", line) or re.search("Temp", line): print "Found line containing 'Fixed' or 'Temp' (line %i):"%i print line