Batch import electrode locations

Hi,

I have this large EEG dataset with 100s subjects with no electrode positions. I have a double question/bug here:

I managed to import standard positions in one subject/run with some tweaks that make it impractical to do for all subjects/runs with mouse clicks. So I exported the positions as a file (channels.pos). Importing from this .pos file fails for the next subject with the following error message:

Error using in_fopen_4d (line 50)
Error reading 4D/Bti recordings: No config file.

If you are trying to read recordings from another acquisition system,
please select the appropriate file format in the "Open file" dialog window.
Error in in_fopen (line 77)
        [sFile, ChannelMat] = in_fopen_4d(DataFile, ImportOptions);
Error in import_channel (line 118)
        [sFile, ChannelMat] = in_fopen(ChannelFile, FileFormat, ImportOptions);
Error in channel_add_loc (line 57)
    [LocChannelMat, ChannelFile, FileFormat] = import_channel(iStudies, [], [], 0, 0, 0, isFixUnits, isApplyVox2ras);
Error in tree_callbacks>@(h,ev)channel_add_loc(iAllStudies,[],1) (line 2736)
        gui_component('MenuItem', jMenu, [], 'Import from file', IconLoader.ICON_CHANNEL, [],
        @(h,ev)channel_add_loc(iAllStudies, [], 1)); 

Importing from the saved .mat file is possible if I first load it in my workspace then import it via rightclick>file>import from matlab. But I can't find a way to batch this process in brainstorm. Do you have a solution ?

Many thanks,
Max
@filipa

Argh! Silly me, I just saw that I could import EEG locations easily in the processor when pushing the raw data. I was trying that directly with the channel file earlier. Hope this can help someone in the future!

I'm not sure I followed everything, but if you're happy like that, c'est l'essentiel :slight_smile:

1 Like