Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- import numpy as np
- from numpy import sqrt,sin,cos,log,exp
- import scipy
- import scipy.fftpack
- import scipy.odr
- import StringIO
- matplotlib.rc('font', size=15)
- def lese_lab_datei(dateiname):
- '''
- CASSY LAB Datei einlesen.
- Messdaten werden anhand von Tabulatoren identifiziert.
- Gibt ein numpy-Array zurueck.
- '''
- f = open(dateiname)
- dataSectionStarted = False
- dataSectionEnded = False
- data = ''
- for line in f:
- if '\t' in line and not dataSectionEnded:
- data += line
- dataSectionStarted = True
- if not '\t' in line and dataSectionStarted:
- dataSectionEnded = True
- f.close()
- return np.genfromtxt(StringIO.StringIO(data))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement