Skip to content

Maybe wfdb should not read .{dat,hea,...}, instead it should be possible to directly give file contents to wfdb. #73

Open
@Dubrzr

Description

@Dubrzr

The fact that wfdb read files for you and that you don't have to open the file is nice, but when your files are not on the local filesystem it is much more complicated to open those files with wfdb.
For example:
Let's say all my files are on Hadoop HDFS (which is actually the case), the only way to access them in python is using a library such as hdfs3 (https://github.com/dask/hdfs3):

with hdfs.open('/user/data/100.dat') as f:
    content = f.read()
# I am now forced by wfdb to write the contents to a temporary file in the local filesystem to then open it with wfdb...

I know it would be very annoying to modify the current implementation of wfdb but I have the feeling it would be better to let the user choose its own way to give .{dat, hea, ...} contents to wfdb.
The way I see this:

  1. You have the wfdb-python library that only takes contents as input
  2. You have helper functions (downloads from physionet and read the contents for you)

Do you see a better solution?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions