Importing ECoG Channel Locations

When I right-click the channel file to the import the locations, I get this error immediately. This seems to only occur when I have more than 1 folder for a Subject. When I split a recording into folders by event type, I am no longer able to right-click and import channel locations for an subsequent folders.

=== Brainstorm ===
Version: 3.240808
Release: 240808
Variant: souce
Plugins: cat12 openmeeg fieldtrip spm12

=== Matlab ===
Matlab version: R2023b (23.02)
Java version: 1.8

=== System ===
OS name: Microsoft Windows 11 Enterprise (10.0.26100 N/A Build 26100)
OS type: win64
Mem total: 65168 MiB
Mem avail: 50602 MiB

Hi @ltaquet

What is the format of the channel file you are importing, and what steps are you taking in Brainstorm to do so?
Can you also share the error that you are getting?

Hi @tmedani

I am importing *.pos file that I created in Brainstorm, however I do not get to the point of selecting the import file option because the error pops up when right-clicking the "Channel file (4)". This happens after splitting a large ECOG session into event folders.

I import the ECoG data, edit channel file, import channel locations, import the events as *.mat files containing arrays of timestamps, import in database, and break up by events. If I was to repeat this for another recording montage in the same Subject it would not allow me to right-click the "Channel File" option for the new ECoG data.

Sorry, I attached a screenshot of the error message, but I can add the text here:

** Error: Line 2913: Index exceeds the number of array elements. Index must not exceed 3.
**
** Call stack:
** >tree_callbacks.m>fcnPopupImportChannel at 2913
** >tree_callbacks.m at 922
** >bst_call.m at 26
** >panel_protocols.m>CreatePanel/protocolTreeClicked_Callback at 156
** >bst_call.m at 28
** >panel_protocols.m>@(h,ev)bst_call(@protocolTreeClicked_Callback,h,ev) at 75
**

I do not understand exactly what happened, but can you remove the channel file and then import it back?

also, since this is the same data but different events, can you just use one channel file for all the events?