mne-python icon indicating copy to clipboard operation
mne-python copied to clipboard

Maint: Offload GDF reading duties to biosig?

Open scott-huberty opened this issue 3 months ago • 2 comments

The biosig-tools development team maintains a Python wrapper to their C++ library libbiosig, which can be used to read GDF files into Python as Numpy arrays (PyPI link).

Currently it requires the user to pre-install the libbiosig, which is not ideal. But if they ever get around to shipping libbiosig in platform-specific wheels, Then it might be worthwhile for MNE-Python to rely on this package for reading GDF files. The benefit would be that we offload GDF reading duties to the file-format experts, reduce our maintenance burden and (hopefully) cut down the LOC in MNE. The downside is that this new reader is not pure Python.

This would follow the approach we have taken with AntIO and EDFIO. I also think that MATLAB already relies on the libbiosig package for reading/writing GDF files.

scott-huberty avatar Sep 14 '25 19:09 scott-huberty

Okay with me if they release wheels with the library vendored like antio. If they don't do that then I don't like people having to mess with library paths and installs to get functionality

larsoner avatar Sep 14 '25 20:09 larsoner

Fair enough. I guess one alternative is for someone to add support for GDF to EDFIO (if the devs there are interested in it).

scott-huberty avatar Sep 14 '25 21:09 scott-huberty