-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I tried using UnfoldBIDS with our co-registered EEG + ET data and run_unfold throws the following error:

I looked into the stacktrace and the problem is that the internal function raw_to_data calls the MNE get_data function with "uV" as units argument.
Lines 30 to 37 in 3756e66
| raw_to_data(raw; channels::AbstractVector{<:Union{String,Integer}}=[]) | |
| Function to get data from MNE raw object. Can choose specific channels; default loads all channels. | |
| """ | |
| function raw_to_data(raw; channels::AbstractVector{<:Union{String,Integer}} = ["all"]) | |
| return pyconvert(Array, raw.get_data(picks = pylist(channels), units = "uV")) | |
| end |
However this does not work if there are not only eeg data channels.
Possible fixes could be:
- Use
pickon the Raw object beforehand to only chooseeegchannels. - Use
pickswithin theget_datafunction and set it by default to"eeg". - Inform the user that they have to remove other channels from their data (but I don't like this option).
Cheers,
Judith
P.S. I don't have time to do a PR right now, but I could do it in two weeks from now. But I wanted to hear your opinion about the issue first anyway :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request