I have a .edf file that I can read with "pyedflib" with the code given below. The code is basically taking .edf file and converting it to numpy array. The array shape is 65*20000.
file = pyedflib.EdfReader(file_name)
n = file.signals_in_file
signal_labels = file.getSignalLabels()
sigbufs = np.zeros((n,file.getNSamples()[0]))
for i in np.arange(n):
sigbufs[i,:]=file.readSignal(i)
return sigbufs
And also I have a .edf.event file which correspond with the information about the .edf file. The file text based content given in below.
"""Xü## time resolution: 160 ìÿÿÿÿ XüT0 duration: 4.2 ZüT2 duration: 4.1ZüT0 duration: 4.2 ZüT1 duration: 4.1ZüT0 duration: 4.2 ZüT1 duration: 4.1ZüT0 duration: 4.2 ZüT2 duration: 4.1ZüT0 duration: 4.2 ZüT2 duration: 4.1ZüT0 duration: 4.2 ZüT1 duration: 4.1ZüT0 duration: 4.2 ZüT1 duration: 4.1ZüT0 duration: 4.2 ZüT2 duration: 4.1ZüT0 duration: 4.2 ZüT1 duration: 4.1ZüT0 duration: 4.2 ZüT2 duration: 4.1ZüT0 duration: 4.2 ZüT2 duration: 4.1ZüT0 duration: 4.2 ZüT1 duration: 4.1ZüT0 duration: 4.2 ZüT1 duration: 4.1ZüT0 duration: 4.2 ZüT2 duration: 4.1ZüT0 duration: 4.2 ZüT1 duration: 4.1 """
T0, T1 and T2 are an experiment types and this file gives the duration of experiments.
My purpose is to extract these information to use for above data. I can do this with implementing some regular expression technique. But since there are a lot of data for my future implementations it's really time consuming to find the pattern.
Therefore, my question is: Is there any library or tool that can read the .edf.event file?
Also if you want to see the .edf.event files you can check the link below.