bsl.utils.find_event_channel

bsl.utils.find_event_channel(inst=None, ch_names=None)[source]

Find the event channel using heuristics.

Warning

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'.

Parameters:
instNone | Raw | Epochs | array

Data instance. If a array is provided, the shape must be (n_channels, n_samples).

ch_namesNone | list

Channels name list.

Returns:
event_channelint | list | None

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