bsl.utils.find_event_channel(inst=None, ch_names=None)#

Find the event channel using heuristics.


Not 100% guaranteed to find it. If inst is None, ch_names must be given. If inst is an MNE instance, ch_names is ignored if some channels types are 'stim'.

  • inst (None | Raw | Epochs | array) – Data instance. If a array is provided, the shape must be (n_channels, n_samples).

  • ch_names (None | list) – Channels name list.


event_channel – Event channel index, list of event channel indexes or None if not found.

Return type

int | list | None