This function reads full sta.txt files and returns a data-header (list of strings), a data description (dictionary) and the data columns (numpy array).
:param fileName: The file name/location on to be read
:type fileName: String
:return: Data header
:rtype: List of strings
:return: Description, the file information used to describe the DSC run
:rtype: Dictionary
:return: Data
:rtype: Numpy array
"""
# list container for the data and flag for when header is passed
valueList=[]
flagStart=0
Description=dict()
# Open the file
withopen(fileName,'r',errors='replace')asfile:
# Read all lines
lines=file.readlines()
fori,lineinenumerate(lines):
if"Time [s]"inline:
flagStart=i
header=line.split("]")
break
# Try to get the descriptions. There might not be any, which is why this is placed under a try-catch statement