-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add read_raw_xdf #12985
Comments
Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴 |
I noticed that there is an open PR for this from 2022 #10420 - What was/is the status on this? |
That might also be useful for |
Pinging @cbrnr - Do you know what happened to the old PR to implement this? |
Hi @MaxMascini! We never really decided what to do with it, and whether or not it is suitable for integration into MNE-Python. Currently, there is a bug with our resampling implementation (cbrnr/mnelab#385), which produces incorrect timings if the recording has gaps (this is hopefully a rare situation, but of course it can happen). So until this is fixed, it cannot be moved to MNE-Python. May I ask what the dependency issues of MNELAB with NumPy are? Incidentally, I've recently considered moving the XDF reader out of MNELAB into a lightweight package. This would make it easier for users to access the reader without the PySide6 dependencies. Migrating it to MNE-Python might be premature since various things (including the interface) might still be changing, and MNE-Python puts a strong emphasis on stability and backward compatibility, which I cannot (and don't want to) commit to yet. |
Thanks for getting back to me @cbrnr! I think it's an excellent middle-ground to move the XDF utilities to a lightweight module for now. Regarding the dependency issues we've encountered, we believe that the dependency issues are related to numba/numpy (which may just be a conda/mamba dependency solver issue). When creating an environment from scratch We get this when trying to import read_raw_xdf:
When trying to create an environment with numpy>=2.1, we get this environment solving error and tree:
Let me know if you have any ideas - or if you see something we've missed! |
Hmmm, I don't use conda/mamba, but MNELAB only requires |
Also, maybe |
Describe the new feature or enhancement
Port the xdf module (mnelab.io.xdf) from mnelab to mne-python. Currently, mnelab causes some dependency issues with numpy so we've had to copy and import the module separately.
The mnelab module already has an integrated mne class and read_raw_xdf:
Resolving streams, converting to mne RawArray, resampling streams, and functionality of converting an automatically-detected marker stream to raw annotations, among others.
Describe your proposed implementation
After basic testing on my end, the entire module appears already completely compatible with mne-python. Just integrating it into mne-python base package would be useful, and hopefully very easy.
Describe possible alternatives
Create a new module that handles converting xdf to mne Raw array. Resolve streams, resample data, and functionality of converting a marker stream to raw annotations would be incredibly useful (and are already implement in mnelab's xdf module)
Additional context
I would love to help, but I would not consider myself a weathered python developer. If someone can point me in the right direction with testing and where to plop the module, I would be than happy to make a pull request :)
The text was updated successfully, but these errors were encountered: