You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling read_digital_signal from the first EdfReader instance is alright. However, if calling it from the following instances, it will return incorrect results. After looking at the _pyedflib.pyx, self.handle causes the problem. It has never been assigned to any value but is used in read_digital_signal. If I added
def check_open_ok(self, result):
if result == 0:
self.handle = self.hdr.handle <---- add this line
return True
else:
raise IOError, open_errors[self.hdr.filetype]
, everything seems to work correctly. I don't know why the code still needs self.handle. If removing "cdef int handle" and change self.handle to self.hdr.handle, I think _pyedflib.pyx should work as expected. Haven't tested though.
The text was updated successfully, but these errors were encountered:
pbunnun
changed the title
Incorrect results from calling read_digital_signal when opennig more than one file
Incorrect results from calling read_digital_signal when opening more than one file
Jan 21, 2017
Calling read_digital_signal from the first EdfReader instance is alright. However, if calling it from the following instances, it will return incorrect results. After looking at the _pyedflib.pyx, self.handle causes the problem. It has never been assigned to any value but is used in read_digital_signal. If I added
def check_open_ok(self, result):
if result == 0:
self.handle = self.hdr.handle <---- add this line
return True
else:
raise IOError, open_errors[self.hdr.filetype]
, everything seems to work correctly. I don't know why the code still needs self.handle. If removing "cdef int handle" and change self.handle to self.hdr.handle, I think _pyedflib.pyx should work as expected. Haven't tested though.
The text was updated successfully, but these errors were encountered: