-
Notifications
You must be signed in to change notification settings - Fork 92
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
write_raw_bids does not produce a valid SET file #1122
Comments
it's likely a bug in https://github.com/jackz314/eeglabio
can you open an issue there?
… Message ID: ***@***.***>
|
cc @jackz314 |
I don't think @laemtl you might want to consider the |
Thanks @jackz314, I will give it a try! I believe the issue happens here, where savemat is used: mne-bids/mne_bids/copyfiles.py Line 556 in 213c378
I also tracked down the issue. The error I'm experiencing is caused by EEG.srate, EEG.xmin being uint16 and uint8. |
@sappelhoff @jackz314 What about using |
My principle with all the
Having that said ... if we don't find an easy fix for our @laemtl I'd be grateful if you could spend some time to see whether mne-bids/mne_bids/copyfiles.py Lines 498 to 573 in 0b1a61d
|
@sappelhoff My idea is to modify
So the logic in copyfiles.py will remain the same but the read/write logic will be more specific to the eeglab specs to prevent int conversion. |
Okay, I guess that would be better. Would you be willing to submit a pull request to implement this behavior? |
Sure :) |
who knows, maybe this will also fix #1120 |
@sappelhoff Given the side-effects of |
The fact that the file could not be copied indicates a problem with the original file, no? I think that's outside the purview of MNE-BIDS |
@jasmainak Are you talking about #1120? |
if an |
I commented in #1126 . Maybe |
@sappelhoff yes, loadmat converts non-decimal numbers to int. |
@jasmainak eeglabio implements the same logic that I did here, casting values in-between loadmat and savemat calls. The issue with eeglabio is that it requires the data to be loaded with |
okay I leave the decision to @sappelhoff ! Was just a drive-by comment :) |
@jasmainak I edited #1126 based on your comment. Thanks! |
Description of the problem
The function write_raw_bids does not produce a valid .set file that can be read by EEGLAB. When importing a .set file that was generated by write_raw_bids in EEGLAB, we systematically get the following error:
Steps to reproduce
Expected results
A valid EEGLAB file
Actual results
File can't be open, see above error.
Additional information
Platform: Windows-10-10.0.19041-SP0
Python: 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]
Executable: C:\Users\Lae\Documents\hbcd-eeg2bids\Scripts\python.exe
CPU: Intel64 Family 6 Model 142 Stepping 9, GenuineIntel: 4 cores
Memory: Unavailable (requires "psutil" package)
mne: 1.2.0
numpy: 1.20.3 {OpenBLAS 0.3.13.dev with 4 threads}
scipy: 1.9.2
matplotlib: 3.6.1 {backend=TkAgg}
sklearn: 1.1.2
numba: 0.56.2
nibabel: Not found
nilearn: Not found
dipy: Not found
openmeeg: Not found
cupy: Not found
pandas: 1.5.0
pyvista: Not found
pyvistaqt: Not found
ipyvtklink: Not found
vtk: Not found
qtpy: Not found
ipympl: Not found
pyqtgraph: Not found
pooch: v1.6.0
mne_bids: 0.12
mne_nirs: Not found
mne_features: 0.2.1
mne_qt_browser: Not found
mne_connectivity: Not found
mne_icalabel: Not found
The text was updated successfully, but these errors were encountered: