braindecode.modules.resolve_channel_positions#

braindecode.modules.resolve_channel_positions(chs_info, bank, montage=None, on_missing='error')[source]#

Positions of chs_info in a name -> position bank (REVE’s bank).

Each channel takes, in order: "<montage>_<name>" when montage is given ("biosemi128"), its name, its name ignoring case and an EEG prefix or -REF suffix, its legacy alias (T3 -> T7), or for a bipolar A-B the midpoint of A and B. Other channels follow on_missing: "error" raises, "drop" leaves them out, and "nearest" takes the bank entry closest to the channel’s loc (in the bank’s frame), or drops it when it has no loc. No position is invented.

Returns:

  • positions (numpy.ndarray) – (n_kept, 3) positions.

  • kept (list of int) – Indices of the channels of chs_info that got a position.